SkyPortal (0.9.dev0+git20200401.f58e4ff)

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 comment

Retrieve a comment

path Parameters
comment_id
required
integer

Responses

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

Response samples

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

Update a comment

Update a comment

path Parameters
comment_id
required
integer
Request Body schema: application/json
source
any Nullable
text
required
string
ctype
string <= 14 characters Nullable
Enum: "text" "redshift" "classification"
attachment_name
string Nullable
attachment_type
string Nullable
attachment_bytes
string Nullable
origin
string Nullable
author
required
string

Responses

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

Request samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "source": null,
  • "text": "string",
  • "ctype": "text",
  • "attachment_name": "string",
  • "attachment_type": "string",
  • "attachment_bytes": "string",
  • "origin": "string",
  • "author": "string"
}

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

Request Body schema: application/json
source
any Nullable
text
required
string
ctype
string <= 14 characters Nullable
Enum: "text" "redshift" "classification"
attachment_name
string Nullable
attachment_type
string Nullable
attachment_bytes
string Nullable
origin
string Nullable
author
required
string

Responses

200
post /api/comment
/api/comment

Request samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "source": null,
  • "text": "string",
  • "ctype": "text",
  • "attachment_name": "string",
  • "attachment_type": "string",
  • "attachment_bytes": "string",
  • "origin": "string",
  • "author": "string"
}

Response samples

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

Download comment attachment

Download comment attachment

path Parameters
comment_id
required
integer

Responses

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

Add a group user

Add a group user

path Parameters
group_id
required
integer
username
required
string
Request Body schema: application/json
admin
required
boolean

Responses

200
post /api/groups/group_id/users/username
/api/groups/group_id/users/username

Request samples

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

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
{
  • "status": "success",
  • "message": "string",
  • "data":
    {
    }
}

Update a group

Update a group

path Parameters
group_id
required
integer
Request Body schema: application/json
sources
Array of any
streams
Array of any
telescopes
Array of any
group_users
Array of any
users
Array of any
name
required
string

Responses

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

Request samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "sources":
    [
    ],
  • "streams":
    [
    ],
  • "telescopes":
    [
    ],
  • "group_users":
    [
    ],
  • "users":
    [
    ],
  • "name": "string"
}

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
{
  • "status": "success",
  • "message": "string",
  • "data":
    [
    ]
}

Create a new group

Create a new group

Request Body schema: application/json
sources
Array of any
streams
Array of any
telescopes
Array of any
group_users
Array of any
users
Array of any
name
required
string

Responses

200
post /api/groups
/api/groups

Request samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "sources":
    [
    ],
  • "streams":
    [
    ],
  • "telescopes":
    [
    ],
  • "group_users":
    [
    ],
  • "users":
    [
    ],
  • "name": "string"
}

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
{
  • "status": "success",
  • "message": "string",
  • "data":
    {
    }
}

Update instrument

Update instrument

path Parameters
instrument_id
required
integer
Request Body schema: application/json
telescope
any Nullable
photometry
Array of any
spectra
Array of any
name
required
string
type
required
string
band
required
string

Responses

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

Request samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "telescope": null,
  • "photometry":
    [
    ],
  • "spectra":
    [
    ],
  • "name": "string",
  • "type": "string",
  • "band": "string"
}

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

Request Body schema: application/json
telescope
any Nullable
photometry
Array of any
spectra
Array of any
name
required
string
type
required
string
band
required
string

Responses

200
400
post /api/instrument
/api/instrument

Request samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "telescope": null,
  • "photometry":
    [
    ],
  • "spectra":
    [
    ],
  • "name": "string",
  • "type": "string",
  • "band": "string"
}

Response samples

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

Retrieve summary of recent activity

Retrieve summary of recent activity

Responses

200
400
get /api/newsfeed
/api/newsfeed

Response samples

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

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
{
  • "status": "success",
  • "message": "string",
  • "data":
    {
    }
}

Update photometry

Update photometry

path Parameters
photometry_id
required
integer
Request Body schema: application/json
source
any Nullable
instrument
any Nullable
thumbnails
Array of any
observed_at
string <date-time> Nullable
mjd
number <float> Nullable
time_format
string Nullable
time_scale
string Nullable
mag
number <float> Nullable
e_mag
number <float> Nullable
lim_mag
number <float> Nullable
filter
string Nullable
isdiffpos
boolean Nullable
var_mag
number <float> Nullable
var_e_mag
number <float> Nullable
dist_nearest_source
number <float> Nullable
mag_nearest_source
number <float> Nullable
e_mag_nearest_source
number <float> Nullable
score
number <float> Nullable
candid
integer <int32> Nullable
altdata
any Nullable
origin
string Nullable

Responses

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

Request samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "source": null,
  • "instrument": null,
  • "thumbnails":
    [
    ],
  • "observed_at": "2020-04-01T21:07:19Z",
  • "mjd": 0,
  • "time_format": "string",
  • "time_scale": "string",
  • "mag": 0,
  • "e_mag": 0,
  • "lim_mag": 0,
  • "filter": "string",
  • "isdiffpos": true,
  • "var_mag": 0,
  • "var_e_mag": 0,
  • "dist_nearest_source": 0,
  • "mag_nearest_source": 0,
  • "e_mag_nearest_source": 0,
  • "score": 0,
  • "candid": 0,
  • "altdata": null,
  • "origin": "string"
}

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

Request Body schema: application/json
source
any Nullable
instrument
any Nullable
thumbnails
Array of any
observed_at
string <date-time> Nullable
mjd
number <float> Nullable
time_format
string Nullable
time_scale
string Nullable
mag
number <float> Nullable
e_mag
number <float> Nullable
lim_mag
number <float> Nullable
filter
string Nullable
isdiffpos
boolean Nullable
var_mag
number <float> Nullable
var_e_mag
number <float> Nullable
dist_nearest_source
number <float> Nullable
mag_nearest_source
number <float> Nullable
e_mag_nearest_source
number <float> Nullable
score
number <float> Nullable
candid
integer <int32> Nullable
altdata
any Nullable
origin
string Nullable

Responses

200
post /api/photometry
/api/photometry

Request samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "source": null,
  • "instrument": null,
  • "thumbnails":
    [
    ],
  • "observed_at": "2020-04-01T21:07:19Z",
  • "mjd": 0,
  • "time_format": "string",
  • "time_scale": "string",
  • "mag": 0,
  • "e_mag": 0,
  • "lim_mag": 0,
  • "filter": "string",
  • "isdiffpos": true,
  • "var_mag": 0,
  • "var_e_mag": 0,
  • "dist_nearest_source": 0,
  • "mag_nearest_source": 0,
  • "e_mag_nearest_source": 0,
  • "score": 0,
  • "candid": 0,
  • "altdata": null,
  • "origin": "string"
}

Response samples

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

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
{
  • "status": "success",
  • "message": "string",
  • "data":
    [
    ]
}

Retrieve offset stars to aid in spectroscopy

Retrieve offset stars to aid in spectroscopy

path Parameters
source_id
required
string
query Parameters
facility
string
Enum: "Keck" "Shane" "P200"

Which facility to generate the starlist for

how_many
integer [ 0 .. 10 ]

Requested number of offset stars (set to zero to get starlist of just the source itself)

obstime
string

datetime of observation in isoformat (e.g. 2020-12-30T12:34:10)

Responses

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

Response samples

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

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
{
  • "status": "success",
  • "message": "string",
  • "data":
    {
    }
}

Update a source

Update a source

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

Responses

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

Request samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "groups":
    [
    ],
  • "comments":
    [
    ],
  • "photometry":
    [
    ],
  • "spectra":
    [
    ],
  • "thumbnails":
    [
    ],
  • "ra": 0,
  • "dec": 0,
  • "ra_dis": 0,
  • "dec_dis": 0,
  • "ra_err": 0,
  • "dec_err": 0,
  • "offset": 0,
  • "redshift": 0,
  • "altdata": null,
  • "last_detected": "2020-04-01T21:07:19Z",
  • "dist_nearest_source": 0,
  • "mag_nearest_source": 0,
  • "e_mag_nearest_source": 0,
  • "transient": true,
  • "varstar": true,
  • "is_roid": true,
  • "score": 0,
  • "sgmag1": 0,
  • "srmag1": 0,
  • "simag1": 0,
  • "objectidps1": 0,
  • "sgscore1": 0,
  • "distpsnr1": 0,
  • "origin": "string",
  • "modified": "2020-04-01T21:07:19Z",
  • "simbad_class": "string",
  • "simbad_info": null,
  • "gaia_info": null,
  • "tns_info": null,
  • "tns_name": "string",
  • "detect_photometry_count": 0,
  • "users":
    [
    ]
}

Response samples

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

Delete a source

Delete a source

path Parameters
source_id
required
string

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
{
  • "status": "success",
  • "message": "string",
  • "data":
    [
    ]
}

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.

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

Responses

200
post /api/sources
/api/sources

Request samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "groups":
    [
    ],
  • "comments":
    [
    ],
  • "photometry":
    [
    ],
  • "spectra":
    [
    ],
  • "thumbnails":
    [
    ],
  • "id": "string",
  • "ra": 0,
  • "dec": 0,
  • "ra_dis": 0,
  • "dec_dis": 0,
  • "ra_err": 0,
  • "dec_err": 0,
  • "offset": 0,
  • "redshift": 0,
  • "altdata": null,
  • "last_detected": "2020-04-01T21:07:19Z",
  • "dist_nearest_source": 0,
  • "mag_nearest_source": 0,
  • "e_mag_nearest_source": 0,
  • "transient": true,
  • "varstar": true,
  • "is_roid": true,
  • "score": 0,
  • "sgmag1": 0,
  • "srmag1": 0,
  • "simag1": 0,
  • "objectidps1": 0,
  • "sgscore1": 0,
  • "distpsnr1": 0,
  • "origin": "string",
  • "modified": "2020-04-01T21:07:19Z",
  • "simbad_class": "string",
  • "simbad_info": null,
  • "gaia_info": null,
  • "tns_info": null,
  • "tns_name": "string",
  • "detect_photometry_count": 0,
  • "users":
    [
    ]
}

Response samples

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

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
{
  • "status": "success",
  • "message": "string",
  • "data":
    {
    }
}

Update spectrum

Update spectrum

path Parameters
spectrum_id
required
integer
Request Body schema: application/json
source
any Nullable
instrument
any Nullable
wavelengths
required
Array of numbers <float>
fluxes
required
Array of numbers <float>
errors
Array of numbers <float> Nullable
observed_at
required
string <date-time>
origin
string Nullable

Responses

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

Request samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "source": null,
  • "instrument": null,
  • "wavelengths":
    [
    ],
  • "fluxes":
    [
    ],
  • "errors":
    [
    ],
  • "observed_at": "2020-04-01T21:07:19Z",
  • "origin": "string"
}

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

Request Body schema: application/json
source
any Nullable
instrument
any Nullable
wavelengths
required
Array of numbers <float>
fluxes
required
Array of numbers <float>
errors
Array of numbers <float> Nullable
observed_at
required
string <date-time>
origin
string Nullable

Responses

200
400
post /api/spectrum
/api/spectrum

Request samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "source": null,
  • "instrument": null,
  • "wavelengths":
    [
    ],
  • "fluxes":
    [
    ],
  • "errors":
    [
    ],
  • "observed_at": "2020-04-01T21:07:19Z",
  • "origin": "string"
}

Response samples

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

Retrieve system info

Retrieve system info

Responses

200
get /api/sysinfo
/api/sysinfo

Response samples

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

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
{
  • "status": "success",
  • "message": "string",
  • "data":
    {
    }
}

Update telescope

Update telescope

path Parameters
telescope_id
required
integer
Request Body schema: application/json
groups
Array of any
instruments
Array of any
name
required
string
nickname
required
string
lat
required
number <float>
lon
required
number <float>
elevation
required
number <float>
diameter
required
number <float>

Responses

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

Request samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "groups":
    [
    ],
  • "instruments":
    [
    ],
  • "name": "string",
  • "nickname": "string",
  • "lat": 0,
  • "lon": 0,
  • "elevation": 0,
  • "diameter": 0
}

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

Request Body schema: application/json
groups
Array of any
instruments
Array of any
name
required
string
nickname
required
string
lat
required
number <float>
lon
required
number <float>
elevation
required
number <float>
diameter
required
number <float>

Responses

200
400
post /api/telescope
/api/telescope

Request samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "groups":
    [
    ],
  • "instruments":
    [
    ],
  • "name": "string",
  • "nickname": "string",
  • "lat": 0,
  • "lon": 0,
  • "elevation": 0,
  • "diameter": 0
}

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
{
  • "status": "success",
  • "message": "string",
  • "data":
    {
    }
}

Update thumbnail

Update thumbnail

path Parameters
thumbnail_id
required
integer
Request Body schema: application/json
photometry
any Nullable
source
any Nullable
type
string <= 6 characters Nullable
Enum: "new" "ref" "sub" "sdss" "dr8" "new_gz" "ref_gz" "sub_gz"
file_uri
string Nullable
public_url
string Nullable
origin
string Nullable

Responses

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

Request samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "photometry": null,
  • "source": null,
  • "type": "new",
  • "file_uri": "string",
  • "public_url": "string",
  • "origin": "string"
}

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

Request Body schema: application/json
source_id
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
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
400
post /api/thumbnail
/api/thumbnail

Request samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "source_id": "string",
  • "photometry_id": 0,
  • "data": "string",
  • "ttype": "string"
}

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
{
  • "status": "success",
  • "message": "string",
  • "data":
    {
    }
}

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"
}

Generate new token

Generate new token

Request Body schema: application/json
created_by
any Nullable
acls
Array of any
id
string
name
string

Responses

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

Request samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "created_by": null,
  • "acls":
    [
    ],
  • "id": "string",
  • "name": "string"
}

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "token_id": "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
{
  • "status": "success",
  • "message": "string",
  • "data":
    {
    }
}

Update user preferences

Update user preferences

Request Body schema: application/json
preferences
object (UserPreferences)

Responses

200
400
put /api/internal/profile
/api/internal/profile

Request samples

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

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "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,
  • "postgres_version": "string"
}