SkyPortal (0.9.dev0+git20191030.2f682f1)

Download OpenAPI specification:Download

SkyPortal API

Authentication

token

Header should be in the format 'token abcd-efgh-0000-1234'

Security scheme type: API Key
Header parameter name: Authorization

Retrieve a source's photometry

Retrieve a source's photometry

path Parameters
source_id
required
string

Responses

200
400
get /api/sources/source_id/photometry
/api/sources/source_id/photometry

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "data":
    [
    ],
  • "status": "success",
  • "message": "string"
}

Retrieve a source

Retrieve a source

path Parameters
source_id
required
integer

Responses

200
400
get /api/sources/source_id
/api/sources/source_id

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "data":
    {
    },
  • "status": "success",
  • "message": "string"
}

Update a source

Update a source

path Parameters
comments
required
Array of strings
users
required
Array of strings
photometry
required
Array of strings
dec_err
required
number <float> Nullable
ra_dis
required
number <float> Nullable
dec
required
number <float> Nullable
ra
required
number <float> Nullable
created_at
required
string <date-time>
simbad_class
required
string Nullable
sgmag1
required
number <float> Nullable
redshift
required
number <float> Nullable
varstar
required
boolean Nullable
transient
required
boolean Nullable
dec_dis
required
number <float> Nullable
dist_nearest_source
required
number <float> Nullable
simag1
required
number <float> Nullable
gaia_info
required
string Nullable
e_mag_nearest_source
required
number <float> Nullable
simbad_info
required
string Nullable
ra_err
required
number <float> Nullable
offset
required
number <float> Nullable
score
required
number <float> Nullable
tns_info
required
string Nullable
detect_photometry_count
required
integer <int32> Nullable
sgscore1
required
number <float> Nullable
objectidps1
required
integer <int32> Nullable
modified
required
string <date-time>
last_detected
required
string <date-time> Nullable
thumbnails
required
Array of strings
id
required
string
is_roid
required
boolean Nullable
altdata
required
string Nullable
spectra
required
Array of strings
srmag1
required
number <float> Nullable
tns_name
required
string Nullable
mag_nearest_source
required
number <float> Nullable
origin
required
string Nullable
distpsnr1
required
number <float> Nullable
groups
required
Array of strings

Responses

200
400
put /api/sources/source_id
/api/sources/source_id

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "status": "success",
  • "message": "string"
}

Delete a source

Delete a source

path Parameters
comments
required
Array of strings
users
required
Array of strings
photometry
required
Array of strings
dec_err
required
number <float> Nullable
ra_dis
required
number <float> Nullable
dec
required
number <float> Nullable
ra
required
number <float> Nullable
created_at
required
string <date-time>
simbad_class
required
string Nullable
sgmag1
required
number <float> Nullable
redshift
required
number <float> Nullable
varstar
required
boolean Nullable
transient
required
boolean Nullable
dec_dis
required
number <float> Nullable
dist_nearest_source
required
number <float> Nullable
simag1
required
number <float> Nullable
gaia_info
required
string Nullable
e_mag_nearest_source
required
number <float> Nullable
simbad_info
required
string Nullable
ra_err
required
number <float> Nullable
offset
required
number <float> Nullable
score
required
number <float> Nullable
tns_info
required
string Nullable
detect_photometry_count
required
integer <int32> Nullable
sgscore1
required
number <float> Nullable
objectidps1
required
integer <int32> Nullable
modified
required
string <date-time>
last_detected
required
string <date-time> Nullable
thumbnails
required
Array of strings
id
required
string
is_roid
required
boolean Nullable
altdata
required
string Nullable
spectra
required
Array of strings
srmag1
required
number <float> Nullable
tns_name
required
string Nullable
mag_nearest_source
required
number <float> Nullable
origin
required
string Nullable
distpsnr1
required
number <float> Nullable
groups
required
Array of strings

Responses

200
delete /api/sources/source_id
/api/sources/source_id

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "status": "success",
  • "message": "string"
}

Retrieve all sources

Retrieve all sources

Responses

200
400
get /api/sources
/api/sources

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "data":
    [
    ],
  • "status": "success",
  • "message": "string"
}

Upload a source. If group_ids is not specified, th

Upload a source. If group_ids is not specified, the user or token's groups will be used.

path Parameters
comments
required
Array of strings
users
required
Array of strings
photometry
required
Array of strings
dec_err
required
number <float> Nullable
ra_dis
required
number <float> Nullable
dec
required
number <float> Nullable
ra
required
number <float> Nullable
created_at
required
string <date-time>
simbad_class
required
string Nullable
sgmag1
required
number <float> Nullable
redshift
required
number <float> Nullable
varstar
required
boolean Nullable
transient
required
boolean Nullable
dec_dis
required
number <float> Nullable
dist_nearest_source
required
number <float> Nullable
simag1
required
number <float> Nullable
gaia_info
required
string Nullable
e_mag_nearest_source
required
number <float> Nullable
simbad_info
required
string Nullable
ra_err
required
number <float> Nullable
offset
required
number <float> Nullable
score
required
number <float> Nullable
tns_info
required
string Nullable
detect_photometry_count
required
integer <int32> Nullable
sgscore1
required
number <float> Nullable
objectidps1
required
integer <int32> Nullable
modified
required
string <date-time>
last_detected
required
string <date-time> Nullable
thumbnails
required
Array of strings
id
required
string
is_roid
required
boolean Nullable
altdata
required
string Nullable
spectra
required
Array of strings
srmag1
required
number <float> Nullable
tns_name
required
string Nullable
mag_nearest_source
required
number <float> Nullable
origin
required
string Nullable
distpsnr1
required
number <float> Nullable
groups
required
Array of strings

Responses

200
post /api/sources/
/api/sources/

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "id": "string"
}

Update a group user

Update a group user

path Parameters
group_id
required
integer
username
required
string
admin
required
boolean

Responses

200
put /api/groups//group_id/users//username
/api/groups//group_id/users//username

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "group_id": 0,
  • "user_id": 0,
  • "admin": true
}

Delete a group user

Delete a group user

path Parameters
group_id
required
integer
username
required
string

Responses

200
delete /api/groups//group_id/users//username
/api/groups//group_id/users//username

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "status": "success",
  • "message": "string"
}

Retrieve a group

Retrieve a group

path Parameters
group_id
required
integer

Responses

200
400
get /api/groups/group_id
/api/groups/group_id

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "data":
    {
    },
  • "status": "success",
  • "message": "string"
}

Update a group

Update a group

path Parameters
group_users
required
Array of strings
users
required
Array of strings
created_at
required
string <date-time>
name
required
string
sources
required
Array of strings
streams
required
Array of strings
id
required
integer <int32>

Responses

200
400
put /api/groups/group_id
/api/groups/group_id

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "status": "success",
  • "message": "string"
}

Delete a group

Delete a group

path Parameters
group_id
required
integer

Responses

200
delete /api/groups/group_id
/api/groups/group_id

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "status": "success",
  • "message": "string"
}

Retrieve all groups

Retrieve all groups

Responses

200
400
get /api/groups
/api/groups

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "data":
    [
    ],
  • "status": "success",
  • "message": "string"
}

Create a new group

Create a new group

path Parameters
group_users
required
Array of strings
users
required
Array of strings
created_at
required
string <date-time>
name
required
string
sources
required
Array of strings
streams
required
Array of strings
id
required
integer <int32>

Responses

200
post /api/groups/
/api/groups/

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "id": 0
}

Retrieve a comment

Retrieve a comment

path Parameters
created_at
required
string <date-time>
text
required
string
attachment_name
required
string Nullable
ctype
required
string <= 14 characters Nullable
Enum: "text" "redshift" "classification"
origin
required
string Nullable
author
required
string
attachment_type
required
string Nullable
source
required
string Nullable
id
required
integer <int32>
attachment_bytes
required
string Nullable

Responses

200
get /api/comment/comment_id
/api/comment/comment_id

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "data":
    {
    },
  • "status": "success",
  • "message": "string"
}

Update a comment

Update a comment

path Parameters
created_at
required
string <date-time>
text
required
string
attachment_name
required
string Nullable
ctype
required
string <= 14 characters Nullable
Enum: "text" "redshift" "classification"
origin
required
string Nullable
author
required
string
attachment_type
required
string Nullable
source
required
string Nullable
id
required
integer <int32>
attachment_bytes
required
string Nullable

Responses

200
400
put /api/comment/comment_id
/api/comment/comment_id

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "status": "success",
  • "message": "string"
}

Delete a comment

Delete a comment

path Parameters
comment_id
required
integer

Responses

200
delete /api/comment/comment_id
/api/comment/comment_id

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "status": "success",
  • "message": "string"
}

Post a comment

Post a comment

path Parameters
created_at
required
string <date-time>
text
required
string
attachment_name
required
string Nullable
ctype
required
string <= 14 characters Nullable
Enum: "text" "redshift" "classification"
origin
required
string Nullable
author
required
string
attachment_type
required
string Nullable
source
required
string Nullable
id
required
integer <int32>
attachment_bytes
required
string Nullable

Responses

200
post /api/comment/
/api/comment/

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "source_id": 0
}

Retrieve a comment

Retrieve a comment

path Parameters
created_at
required
string <date-time>
text
required
string
attachment_name
required
string Nullable
ctype
required
string <= 14 characters Nullable
Enum: "text" "redshift" "classification"
origin
required
string Nullable
author
required
string
attachment_type
required
string Nullable
source
required
string Nullable
id
required
integer <int32>
attachment_bytes
required
string Nullable

Responses

200
get /api/comment/comment_id//action
/api/comment/comment_id//action

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "data":
    {
    },
  • "status": "success",
  • "message": "string"
}

Update a comment

Update a comment

path Parameters
created_at
required
string <date-time>
text
required
string
attachment_name
required
string Nullable
ctype
required
string <= 14 characters Nullable
Enum: "text" "redshift" "classification"
origin
required
string Nullable
author
required
string
attachment_type
required
string Nullable
source
required
string Nullable
id
required
integer <int32>
attachment_bytes
required
string Nullable

Responses

200
400
put /api/comment/comment_id//
/api/comment/comment_id//

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "status": "success",
  • "message": "string"
}

Delete a comment

Delete a comment

path Parameters
comment_id
required
integer

Responses

200
delete /api/comment/comment_id//
/api/comment/comment_id//

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "status": "success",
  • "message": "string"
}

Post a comment

Post a comment

path Parameters
created_at
required
string <date-time>
text
required
string
attachment_name
required
string Nullable
ctype
required
string <= 14 characters Nullable
Enum: "text" "redshift" "classification"
origin
required
string Nullable
author
required
string
attachment_type
required
string Nullable
source
required
string Nullable
id
required
integer <int32>
attachment_bytes
required
string Nullable

Responses

200
post /api/comment///
/api/comment///

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "source_id": 0
}

Retrieve photometry

Retrieve photometry

path Parameters
photometry_id
required
integer

Responses

200
400
get /api/photometry/photometry_id
/api/photometry/photometry_id

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "data":
    {
    },
  • "status": "success",
  • "message": "string"
}

Update photometry

Update photometry

path Parameters
time_format
required
string Nullable
var_mag
required
number <float> Nullable
lim_mag
required
number <float> Nullable
created_at
required
string <date-time>
instrument
required
string Nullable
e_mag
required
number <float> Nullable
source
required
string Nullable
dist_nearest_source
required
number <float> Nullable
mag
required
number <float> Nullable
e_mag_nearest_source
required
number <float> Nullable
score
required
number <float> Nullable
candid
required
integer <int32> Nullable
time_scale
required
string Nullable
mjd
required
number <float> Nullable
thumbnails
required
Array of strings
id
required
integer <int32>
altdata
required
string Nullable
observed_at
required
string <date-time> Nullable
filter
required
string Nullable
mag_nearest_source
required
number <float> Nullable
origin
required
string Nullable
var_e_mag
required
number <float> Nullable
isdiffpos
required
boolean Nullable

Responses

200
400
put /api/photometry/photometry_id
/api/photometry/photometry_id

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "status": "success",
  • "message": "string"
}

Delete photometry

Delete photometry

path Parameters
photometry_id
required
integer

Responses

200
400
delete /api/photometry/photometry_id
/api/photometry/photometry_id

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "status": "success",
  • "message": "string"
}

Upload photometry

Upload photometry

path Parameters
time_format
required
string

Valid time formats are listed in astropy.time.Time.FORMATS (https://docs.astropy.org/en/stable/api/astropy.time.Time.html#astropy.time.Time.FORMATS)

time_scale
required
string

Valid time scales are listed in astropy.time.Time.SCALES (https://docs.astropy.org/en/stable/api/astropy.time.Time.html#astropy.time.Time.SCALES)

source_id
required
string
instrument_id
required
integer
time
required
string
mag
required
number
e_mag
required
number
filter
required
string
lim_mag
required
number
thumbnails
required
Array of objects

Responses

200
post /api/photometry/
/api/photometry/

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "ids": [ ]
}

Retrieve a spectrum

Retrieve a spectrum

path Parameters
spectrum_id
required
integer

Responses

200
400
get /api/spectrum/spectrum_id
/api/spectrum/spectrum_id

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "data":
    {
    },
  • "status": "success",
  • "message": "string"
}

Update spectrum

Update spectrum

path Parameters
created_at
required
string <date-time>
instrument
required
string Nullable
observed_at
required
string <date-time>
wavelengths
required
Array of numbers <float>
origin
required
string Nullable
fluxes
required
Array of numbers <float>
source
required
string Nullable
errors
required
Array of numbers <float> Nullable
id
required
integer <int32>

Responses

200
400
put /api/spectrum/spectrum_id
/api/spectrum/spectrum_id

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "status": "success",
  • "message": "string"
}

Delete a spectrum

Delete a spectrum

path Parameters
spectrum_id
required
integer

Responses

200
400
delete /api/spectrum/spectrum_id
/api/spectrum/spectrum_id

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "status": "success",
  • "message": "string"
}

Upload spectrum

Upload spectrum

path Parameters
created_at
required
string <date-time>
instrument
required
string Nullable
observed_at
required
string <date-time>
wavelengths
required
Array of numbers <float>
origin
required
string Nullable
fluxes
required
Array of numbers <float>
source
required
string Nullable
errors
required
Array of numbers <float> Nullable
id
required
integer <int32>

Responses

200
post /api/spectrum/
/api/spectrum/

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "id": 0
}

Retrieve a telescope

Retrieve a telescope

path Parameters
telescope_id
required
integer

Responses

200
400
get /api/telescope/telescope_id
/api/telescope/telescope_id

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "data":
    {
    },
  • "status": "success",
  • "message": "string"
}

Update telescope

Update telescope

path Parameters
created_at
required
string <date-time>
lon
required
number <float>
elevation
required
number <float>
name
required
string
lat
required
number <float>
instruments
required
Array of strings
nickname
required
string
diameter
required
number <float>
id
required
integer <int32>

Responses

200
400
put /api/telescope/telescope_id
/api/telescope/telescope_id

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "status": "success",
  • "message": "string"
}

Delete a telescope

Delete a telescope

path Parameters
telescope_id
required
integer

Responses

200
400
delete /api/telescope/telescope_id
/api/telescope/telescope_id

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "status": "success",
  • "message": "string"
}

Create telescopes

Create telescopes

path Parameters
created_at
required
string <date-time>
lon
required
number <float>
elevation
required
number <float>
name
required
string
lat
required
number <float>
instruments
required
Array of strings
nickname
required
string
diameter
required
number <float>
id
required
integer <int32>

Responses

200
post /api/telescope/
/api/telescope/

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "id": 0
}

Retrieve an instrument

Retrieve an instrument

path Parameters
instrument_id
required
integer

Responses

200
400
get /api/instrument/instrument_id
/api/instrument/instrument_id

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "data":
    {
    },
  • "status": "success",
  • "message": "string"
}

Update instrument

Update instrument

path Parameters
created_at
required
string <date-time>
spectra
required
Array of strings
photometry
required
Array of strings
telescope
required
string Nullable
name
required
string
type
required
string
band
required
string
id
required
integer <int32>

Responses

200
400
put /api/instrument/instrument_id
/api/instrument/instrument_id

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "status": "success",
  • "message": "string"
}

Delete an instrument

Delete an instrument

path Parameters
instrument_id
required
integer

Responses

200
400
delete /api/instrument/instrument_id
/api/instrument/instrument_id

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "status": "success",
  • "message": "string"
}

Create instruments

Create instruments

path Parameters
created_at
required
string <date-time>
spectra
required
Array of strings
photometry
required
Array of strings
telescope
required
string Nullable
name
required
string
type
required
string
band
required
string
id
required
integer <int32>

Responses

200
post /api/instrument/
/api/instrument/

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "id": 0
}

Retrieve a thumbnail

Retrieve a thumbnail

path Parameters
thumbnail_id
required
integer

Responses

200
400
get /api/thumbnail/thumbnail_id
/api/thumbnail/thumbnail_id

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "data":
    {
    },
  • "status": "success",
  • "message": "string"
}

Update thumbnail

Update thumbnail

path Parameters
created_at
required
string <date-time>
photometry
required
string Nullable
type
required
string <= 6 characters Nullable
Enum: "new" "ref" "sub" "sdss" "dr8" "new_gz" "ref_gz" "sub_gz"
origin
required
string Nullable
public_url
required
string Nullable
source
required
string Nullable
id
required
integer <int32>
file_uri
required
string Nullable

Responses

200
400
put /api/thumbnail/thumbnail_id
/api/thumbnail/thumbnail_id

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "status": "success",
  • "message": "string"
}

Delete a thumbnail

Delete a thumbnail

path Parameters
thumbnail_id
required
integer

Responses

200
400
delete /api/thumbnail/thumbnail_id
/api/thumbnail/thumbnail_id

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "status": "success",
  • "message": "string"
}

Upload thumbnails

Upload thumbnails

path Parameters
source_id
required
string

ID of source associated with thumbnails. If specified, without photometry_id, the first photometry point associated with specified source will be associated with thumbnail(s).

photometry_id
required
integer

ID of photometry to be associated with thumbnails. If omitted, source_id must be specified, in which case the first photometry entry associated with source will be used.

data
required
string <byte>

base64-encoded PNG image file contents. Image size must be between 100px and 500px on a side.

ttype
required
string

Thumbnail type. Must be one of 'new', 'ref', 'sub', 'sdss', 'dr8', 'new_gz', 'ref_gz', 'sub_gz'

Responses

200
post /api/thumbnail/
/api/thumbnail/

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "id": null
}

Retrieve a user

Retrieve a user

path Parameters
user_id
required
integer

Responses

200
400
get /api/user/user_id
/api/user/user_id

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "data":
    {
    },
  • "status": "success",
  • "message": "string"
}

Delete a user

Delete a user

path Parameters
user_id
required
integer

Responses

200
400
delete /api/user/user_id
/api/user/user_id

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "status": "success",
  • "message": "string"
}

Retrieve system info

Retrieve system info

Responses

200
get /api/sysinfo
/api/sysinfo

Response samples

Content type
application/json
Copy
Expand all Collapse all
{ }

Generate new token

Generate new token

path Parameters
created_at
required
string <date-time>
acls
required
Array of strings
name
required
string
created_by
required
string Nullable
id
required
string

Responses

200
post /api/internal/tokens/
/api/internal/tokens/

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "status": "success",
  • "message": "string"
}

Delete a token

Delete a token

path Parameters
token_id
required
integer

Responses

200
400
delete /api/internal/tokens/token_id
/api/internal/tokens/token_id

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "status": "success",
  • "message": "string"
}

Retrieve user profile

Retrieve user profile

Responses

200
get /api/internal/profile
/api/internal/profile

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "data":
    {
    },
  • "status": "success",
  • "message": "string"
}

Determine whether sources table is empy.

Determine whether sources table is empy.

Responses

200
get /api/internal/dbinfo
/api/internal/dbinfo

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "source_table_empty": true
}