SkyPortal (0.9.dev0)

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

Retrieve a source

path Parameters
source_id
required
integer

Responses

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

Response samples

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

Update a source

Update a source

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

Responses

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

Response samples

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

Delete a source

Delete a source

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

Responses

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

Response samples

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

Retrieve all sources

Retrieve all sources

query Parameters
page
integer

Queries are limited to 100 per page. This selects the page to download.

Responses

200
400
get /api/sources
/api/sources

Response samples

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

Upload a source

Upload a source

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

Responses

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

Response samples

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

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

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

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

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

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

Update a group

Update a group

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

Responses

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

Response samples

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

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

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

Retrieve all groups

Retrieve all groups

Responses

200
400
get /api/groups
/api/groups

Response samples

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

Create a new group

Create a new group

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

Responses

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

Response samples

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

Retrieve a comment

Retrieve a comment

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

Responses

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

Response samples

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

Update a comment

Update a comment

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

Responses

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

Response samples

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

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

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

Post a comment

Post a comment

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

Responses

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

Response samples

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

Retrieve a comment

Retrieve a comment

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

Responses

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

Response samples

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

Update a comment

Update a comment

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

Responses

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

Response samples

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

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

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

Post a comment

Post a comment

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

Responses

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

Response samples

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

Upload photometry

Upload photometry

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

Responses

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

Response samples

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

Retrieve system info

Retrieve system info

Responses

200
get /api/sysinfo
/api/sysinfo

Response samples

application/json
Copy
Expand all Collapse all
{
  • "sources_table_empty": true,
  • "skyportal_version": "string"
}

Generate new token

Generate new token

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

Responses

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

Response samples

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

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

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

Retrieve user profile

Retrieve user profile

Responses

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

Response samples

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