SkyPortal (0.9.dev0+git20201204.c57a92f)

Download OpenAPI specification:Download

SkyPortal provides an API to access most of its underlying functionality. To use it, you will need an API token. This can be generated via the web application from your profile page or, if you are an admin, you may use the system provisioned token stored inside of .tokens.yaml.

Accessing the SkyPortal API

Once you have a token, you may access SkyPortal programmatically as follows.

Python

import requests

token = 'ea70a5f0-b321-43c6-96a1-b2de225e0339'

def api(method, endpoint, data=None):
    headers = {'Authorization': f'token {token}'}
    response = requests.request(method, endpoint, json=data, headers=headers)
    return response

response = api('GET', 'http://localhost:5000/api/sysinfo')

print(f'HTTP code: {response.status_code}, {response.reason}')
if response.status_code in (200, 400):
    print(f'JSON response: {response.json()}')

Command line (curl)

curl -s -H 'Authorization: token ea70a5f0-b321-43c6-96a1-b2de225e0339' http://localhost:5000/api/sysinfo

Response

In the above examples, the SkyPortal server is located at http://localhost:5000. In case of success, the HTTP response is 200:

HTTP code: 200, OK
JSON response: {'status': 'success', 'data': {}, 'version': '0.9.dev0+git20200819.84c453a'}

On failure, it is 400; the JSON response has status="error" with the reason for the failure given in message:

{
  "status": "error",
  "message": "Invalid API endpoint",
  "data": {},
  "version": "0.9.1"
}

Authentication

token

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

Security Scheme Type API Key
Header parameter name: Authorization

Retrieve an allocation

Retrieve an allocation

path Parameters
allocation_id
required
integer

Responses

200
400
get/api/allocation/allocation_id
/api/allocation/allocation_id

Response samples

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

Update an allocation on a robotic instrument

Update an allocation on a robotic instrument

path Parameters
allocation_id
required
integer
Request Body schema: application/json
pi
string Nullable

The PI of the allocation's proposal.

proposal_id
string Nullable

The ID of the proposal associated with this allocation.

start_date
string <date-time> Nullable

The UTC start date of the allocation.

end_date
string <date-time> Nullable

The UTC end date of the allocation.

hours_allocated
required
number

The number of hours allocated.

group_id
required
integer

The ID of the Group the allocation is associated with.

instrument_id
required
integer

The ID of the Instrument the allocation is associated with.

Responses

200
400
put/api/allocation/allocation_id
/api/allocation/allocation_id

Request samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "pi": "string",
  • "proposal_id": "string",
  • "start_date": "2020-12-05T05:22:37Z",
  • "end_date": "2020-12-05T05:22:37Z",
  • "hours_allocated": 0,
  • "group_id": 0,
  • "instrument_id": 0
}

Response samples

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

Delete allocation.

Delete allocation.

path Parameters
allocation_id
required
string

Responses

200
delete/api/allocation/allocation_id
/api/allocation/allocation_id

Response samples

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

Retrieve all allocations

Retrieve all allocations

query Parameters
instrument_id
number

Instrument ID to retrieve allocations for

Responses

200
400
get/api/allocation
/api/allocation

Response samples

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

Post new allocation on a robotic instrument

Post new allocation on a robotic instrument

Request Body schema: application/json
pi
string Nullable

The PI of the allocation's proposal.

proposal_id
string Nullable

The ID of the proposal associated with this allocation.

start_date
string <date-time> Nullable

The UTC start date of the allocation.

end_date
string <date-time> Nullable

The UTC end date of the allocation.

hours_allocated
required
number

The number of hours allocated.

group_id
required
integer

The ID of the Group the allocation is associated with.

instrument_id
required
integer

The ID of the Instrument the allocation is associated with.

Responses

200
post/api/allocation
/api/allocation

Request samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "pi": "string",
  • "proposal_id": "string",
  • "start_date": "2020-12-05T05:22:37Z",
  • "end_date": "2020-12-05T05:22:37Z",
  • "hours_allocated": 0,
  • "group_id": 0,
  • "instrument_id": 0
}

Response samples

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

Retrieve an observing run assignment

Retrieve an observing run assignment

path Parameters
assignment_id
required
integer

Responses

200
400
get/api/assignment/assignment_id
/api/assignment/assignment_id

Response samples

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

Update an assignment

Update an assignment

path Parameters
assignment_id
required
integer
Request Body schema: application/json
requester_id
required
integer

The ID of the User who created this assignment.

obj_id
required
string

ID of the assigned Obj.

comment
string Nullable

A comment on the assignment. Typically a justification for the request, or instructions for taking the data.

status
string

Status of the assignment [done, not done, pending].

priority
required
string <= 1 characters
Enum: "1" "2" "3" "4" "5"

Priority of the request (1 = lowest, 5 = highest).

run_id
required
integer

ID of the ObservingRun this target was assigned to.

Responses

200
400
put/api/assignment/assignment_id
/api/assignment/assignment_id

Request samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "requester_id": 0,
  • "obj_id": "string",
  • "comment": "string",
  • "status": "string",
  • "priority": "1",
  • "run_id": 0
}

Response samples

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

Delete assignment.

Delete assignment.

path Parameters
assignment_id
required
string

Responses

200
delete/api/assignment/assignment_id
/api/assignment/assignment_id

Response samples

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

Retrieve all observing run assignments

Retrieve all observing run assignments

Responses

200
400
get/api/assignment
/api/assignment

Response samples

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

Post new target assignment to observing run

Post new target assignment to observing run

Request Body schema: application/json
obj_id
required
string

The ID of the object to observe.

comment
string

An optional comment describing the request.

priority
required
any
Enum: "1" "2" "3" "4" "5"

Priority of the request, (lowest = 1, highest = 5).

run_id
required
integer
status
string

The status of the request

Responses

200
post/api/assignment
/api/assignment

Request samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "obj_id": "string",
  • "comment": "string",
  • "priority": "1",
  • "run_id": 0,
  • "status": "string"
}

Response samples

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

Retrieve a candidate

Retrieve a candidate

path Parameters
obj_id
required
string

Responses

200
400
get/api/candidates/obj_id
/api/candidates/obj_id

Response samples

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

Check if a Candidate exists

Check if a Candidate exists

path Parameters
obj_id
required
string

Responses

200
404
head/api/candidates/obj_id
/api/candidates/obj_id

Response samples

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

Retrieve all candidates

Retrieve all candidates

query Parameters
numPerPage
integer

Number of candidates to return per paginated request. Defaults to 25

pageNumber
integer

Page number for paginated query results. Defaults to 1

totalMatches
integer

Used only in the case of paginating query results - if provided, this allows for avoiding a potentially expensive query.count() call.

unsavedOnly
boolean

Boolean indicating whether to return only unsaved candidates

startDate
string

Arrow-parseable date string (e.g. 2020-01-01). If provided, filter by Candidate.passed_at >= startDate

endDate
string

Arrow-parseable date string (e.g. 2020-01-01). If provided, filter by Candidate.passed_at <= endDate

groupIDs
Array of integers

Comma-separated string of group IDs (e.g. "1,2"). Defaults to all of user's groups if filterIDs is not provided.

filterIDs
Array of integers

Comma-separated string of filter IDs (e.g. "1,2"). Defaults to all of user's groups' filters if groupIDs is not provided.

sortByAnnotationOrigin
string

The origin of the Annotation to sort by

sortByAnnotationKey
string

The key of the Annotation data value to sort by

sortByAnnotationOrder
string

The sort order for annotations - either "asc" or "desc". Defaults to "asc".

annotationFilterList
Array of strings

Comma-separated string of JSON objects representing annotation filters. Filter objects are expected to have keys { origin, key, value } for non-numeric value types, or { origin, key, min, max } for numeric values.

includePhotometry
boolean

Boolean indicating whether to include associated photometry. Defaults to false.

Responses

200
400
get/api/candidates
/api/candidates

Response samples

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

Create new candidate(s) (one per filter).

Create new candidate(s) (one per filter).

Request Body schema: application/json
ra
number Nullable
dec
number Nullable
id
required
string

Name of the object.

ra_dis
number Nullable

J2000 Right Ascension at discovery time [deg].

dec_dis
number Nullable

J2000 Declination at discovery time [deg].

ra_err
number Nullable

Error on J2000 Right Ascension at discovery time [deg].

dec_err
number Nullable

Error on J2000 Declination at discovery time [deg].

offset
number Nullable

Offset from nearest static object [arcsec].

redshift
number Nullable

Redshift.

redshift_history
any Nullable

Record of who set which redshift values and when.

altdata
any Nullable

Misc. alternative metadata stored in JSON format, e.g. {'gaia': {'info': {'Teff': 5780}}}

dist_nearest_source
number Nullable

Distance to the nearest Obj [arcsec].

mag_nearest_source
number Nullable

Magnitude of the nearest Obj [AB].

e_mag_nearest_source
number Nullable

Error on magnitude of the nearest Obj [mag].

transient
boolean Nullable

Boolean indicating whether the object is an astrophysical transient.

varstar
boolean Nullable

Boolean indicating whether the object is a variable star.

is_roid
boolean Nullable

Boolean indicating whether the object is a moving object.

score
number Nullable

Machine learning score.

origin
string Nullable

Origin of the object.

internal_key
string

Internal key used for secure websocket messaging.

detect_photometry_count
integer Nullable

How many times the object was detected above :math:S/N = 5.

filter_ids
required
Array of integers

List of associated filter IDs

passing_alert_id
integer Nullable

ID of associated filter that created candidate

passed_at
required
string Nullable

Arrow-parseable datetime string indicating when passed filter.

Responses

200
post/api/candidates
/api/candidates

Request samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "ra": 0,
  • "dec": 0,
  • "id": "string",
  • "ra_dis": 0,
  • "dec_dis": 0,
  • "ra_err": 0,
  • "dec_err": 0,
  • "offset": 0,
  • "redshift": 0,
  • "redshift_history": null,
  • "altdata": null,
  • "dist_nearest_source": 0,
  • "mag_nearest_source": 0,
  • "e_mag_nearest_source": 0,
  • "transient": true,
  • "varstar": true,
  • "is_roid": true,
  • "score": 0,
  • "origin": "string",
  • "internal_key": "string",
  • "detect_photometry_count": 0,
  • "filter_ids":
    [
    ],
  • "passing_alert_id": 0,
  • "passed_at": "string"
}

Response samples

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

Delete a candidate

Delete a candidate

path Parameters
candidate_id
required
integer

Responses

200
delete/api/candidates/candidate_id
/api/candidates/candidate_id

Response samples

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

Retrieve a classification

Retrieve a classification

path Parameters
classification_id
required
integer

Responses

200
400
get/api/classification/classification_id
/api/classification/classification_id

Response samples

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

Update a classification

Update a classification

path Parameters
classification
required
integer
Request Body schema: application/json
classification
required
string

The assigned class.

taxonomy_id
required
integer

ID of the Taxonomy in which this Classification was made.

probability
number Nullable

User-assigned probability of belonging to this class

author_id
required
integer

ID of the User that made this Classification

author_name
required
string

User.username or Token.id of the Classification's author.

obj_id
required
string

ID of the Classification's Obj.

group_ids
Array of integers

List of group IDs corresponding to which groups should be able to view classification.

Responses

200
400
put/api/classification/classification_id
/api/classification/classification_id

Request samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "classification": "string",
  • "taxonomy_id": 0,
  • "probability": 0,
  • "author_id": 0,
  • "author_name": "string",
  • "obj_id": "string",
  • "group_ids":
    [
    ]
}

Response samples

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

Delete a classification

Delete a classification

path Parameters
classification_id
required
integer

Responses

200
delete/api/classification/classification_id
/api/classification/classification_id

Response samples

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

Post a classification

Post a classification

Request Body schema: application/json
obj_id
required
string
classification
required
string
taxonomy_id
required
integer
probability
float [ 0 .. 1 ] Nullable

User-assigned probability of this classification on this taxonomy. If multiple classifications are given for the same source by the same user, the sum of the classifications ought to equal unity. Only individual probabilities are checked.

group_ids
Array of integers

List of group IDs corresponding to which groups should be able to view classification. Defaults to all of requesting user's groups.

Responses

200
post/api/classification
/api/classification

Request samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "obj_id": "string",
  • "classification": "string",
  • "taxonomy_id": 0,
  • "probability": null,
  • "group_ids":
    [
    ]
}

Response samples

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

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

Update a comment

Update a comment

path Parameters
comment_id
required
integer
Request Body schema: application/json
text
required
string

Comment body.

ctype
string <= 8 characters Nullable
Enum: "text" "redshift"

Comment type. Can be one of 'text' or 'redshift'.

attachment_name
string Nullable

Filename of the attachment.

attachment_bytes
string Nullable

Binary representation of the attachment.

origin
string Nullable

Comment origin.

author_id
required
integer

ID of the Comment author's User instance.

obj_id
required
string

ID of the Comment's Obj.

group_ids
Array of integers

List of group IDs corresponding to which groups should be able to view comment.

Responses

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

Request samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "text": "string",
  • "ctype": "text",
  • "attachment_name": "string",
  • "attachment_bytes": "string",
  • "origin": "string",
  • "author_id": 0,
  • "obj_id": "string",
  • "group_ids":
    [
    ]
}

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
obj_id
required
string
text
required
string
group_ids
Array of integers

List of group IDs corresponding to which groups should be able to view comment. Defaults to all of requesting user's groups.

attachment
object

Responses

200
post/api/comment
/api/comment

Request samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "obj_id": "string",
  • "text": "string",
  • "group_ids":
    [
    ],
  • "attachment":
    {
    }
}

Response samples

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

Download comment attachment

Download comment attachment

path Parameters
comment_id
required
integer
query Parameters
download
boolean

If true, download the attachment; else return file data as text. True by default.

Responses

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

Response samples

Content type
No sample

Download comment attachment

Download comment attachment

path Parameters
comment_id
required
integer
query Parameters
download
boolean

If true, download the attachment; else return file data as text. True by default.

Responses

200
get/api/comment/comment_id/attachment.pdf
/api/comment/comment_id/attachment.pdf

Response samples

Content type
No sample

Retrieve an annotation

Retrieve an annotation

path Parameters
annotation_id
required
integer

Responses

200
400
get/api/annotation/annotation_id
/api/annotation/annotation_id

Response samples

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

Update an annotation

Update an annotation

path Parameters
annotation_id
required
integer
Request Body schema: application/json
data
any Nullable

Searchable data in JSON format

author_id
required
integer

ID of the Annotation author's User instance.

origin
required
string

What generated the annotation. This should generally map to a filter/group name. But since an annotation can be made accessible to multiple groups, the origin name does not necessarily have to map to a single group name. The important thing is to make the origin distinct and descriptive such that annotations from the same origin generally have the same metrics. One annotation with multiple fields from each origin is allowed.

obj_id
required
string

ID of the Annotation's Obj.

group_ids
Array of integers

List of group IDs corresponding to which groups should be able to view the annotation.

Responses

200
400
put/api/annotation/annotation_id
/api/annotation/annotation_id

Request samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "data": null,
  • "author_id": 0,
  • "origin": "string",
  • "obj_id": "string",
  • "group_ids":
    [
    ]
}

Response samples

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

Delete an annotation

Delete an annotation

path Parameters
annotation_id
required
integer

Responses

200
delete/api/annotation/annotation_id
/api/annotation/annotation_id

Response samples

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

Post an annotation

Post an annotation

Request Body schema: application/json
obj_id
required
string
origin
required
string

String describing the source of this information. Only one Annotation per origin is allowed, although each Annotation can have multiple fields. To add/change data, use the update method instead of trying to post another Annotation from this origin. Origin must be a non-empty string starting with an alphanumeric character or underscore. (it must match the regex: /^\w+/)

data
required
object
group_ids
Array of integers

List of group IDs corresponding to which groups should be able to view annotation. Defaults to all of requesting user's groups.

Responses

200
post/api/annotation
/api/annotation

Request samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "obj_id": "string",
  • "origin": "string",
  • "data": { },
  • "group_ids":
    [
    ]
}

Response samples

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

Post a message from a remote facility

Post a message from a remote facility

Request Body schema: application/json
One of
  • SEDMListener
new_status
required
string
followup_request_id
required
integer

Responses

200
400
post/api/facility
/api/facility

Request samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "new_status": "string",
  • "followup_request_id": 0
}

Response samples

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

Retrieve a filter

Retrieve a filter

path Parameters
filter_id
required
integer

Responses

200
400
get/api/filters/filter_id
/api/filters/filter_id

Response samples

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

Delete a filter

Delete a filter

path Parameters
filter_id
required
integer

Responses

200
delete/api/filters/filter_id
/api/filters/filter_id

Response samples

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

Update filter name

Update filter name

path Parameters
filter_id
required
integer
Request Body schema: application/json
name
required
string

Filter name.

stream_id
required
integer

ID of the Filter's Stream.

group_id
required
integer

ID of the Filter's Group.

Responses

200
400
patch/api/filters/filter_id
/api/filters/filter_id

Request samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "name": "string",
  • "stream_id": 0,
  • "group_id": 0
}

Response samples

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

Retrieve all filters

Retrieve all filters

Responses

200
400
get/api/filters
/api/filters

Response samples

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

POST a new filter.

POST a new filter.

Request Body schema: application/json
name
required
string

Filter name.

stream_id
required
integer

ID of the Filter's Stream.

group_id
required
integer

ID of the Filter's Group.

Responses

200
post/api/filters
/api/filters

Request samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "name": "string",
  • "stream_id": 0,
  • "group_id": 0
}

Response samples

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

Retrieve a followup request

Retrieve a followup request

path Parameters
followup_request_id
required
integer

Responses

200
400
get/api/followup_request/followup_request_id
/api/followup_request/followup_request_id

Response samples

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

Retrieve all followup requests

Retrieve all followup requests

Responses

200
400
get/api/followup_request
/api/followup_request

Response samples

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

Submit follow-up request.

Submit follow-up request.

Request Body schema: application/json
payload
any

Content of the followup request.

allocation_id
required
integer

Followup request allocation ID.

obj_id
required
string

ID of the target Obj.

target_group_ids
Array of integers

IDs of groups to share the results of the followup request with.

status
string
Default: "pending submission"

The status of the request.

Responses

200
post/api/followup_request
/api/followup_request

Request samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "payload": null,
  • "allocation_id": 0,
  • "obj_id": "string",
  • "target_group_ids":
    [
    ],
  • "status": "pending submission"
}

Response samples

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

Update a follow-up request

Update a follow-up request

path Parameters
request_id
required
string
Request Body schema: application/json
payload
any

Content of the followup request.

allocation_id
required
integer

Followup request allocation ID.

obj_id
required
string

ID of the target Obj.

target_group_ids
Array of integers

IDs of groups to share the results of the followup request with.

status
string
Default: "pending submission"

The status of the request.

Responses

200
400
put/api/followup_request/request_id
/api/followup_request/request_id

Request samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "payload": null,
  • "allocation_id": 0,
  • "obj_id": "string",
  • "target_group_ids":
    [
    ],
  • "status": "pending submission"
}

Response samples

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

Delete follow-up request.

Delete follow-up request.

path Parameters
request_id
required
string

Responses

200
delete/api/followup_request/request_id
/api/followup_request/request_id

Response samples

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

Retrieve the ID of the public group

Retrieve the ID of the public group

Responses

200
get/api/groups/public
/api/groups/public

Response samples

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

Add alert stream access to group

Add alert stream access to group

path Parameters
group_id
required
integer
Request Body schema: application/json
stream_id
required
integer

Responses

200
post/api/groups/group_id/streams/ignored_args
/api/groups/group_id/streams/ignored_args

Request samples

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

Response samples

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

Delete an alert stream from group

Delete an alert stream from group

path Parameters
group_id
required
integer
stream_id
required
integer

Responses

200
delete/api/groups/group_id/streams/stream_id
/api/groups/group_id/streams/stream_id

Response samples

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

Add a group user

Add a group user

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

Responses

200
post/api/groups/group_id/users/ignored_args
/api/groups/group_id/users/ignored_args

Request samples

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

Response samples

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

Update a group user's admin status

Update a group user's admin status

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

Responses

200
patch/api/groups/group_id/users/ignored_args
/api/groups/group_id/users/ignored_args

Request samples

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

Response samples

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

Delete a group user

Delete a group user

path Parameters
group_id
required
integer
user_id
required
integer

Responses

200
delete/api/groups/group_id/users/user_id
/api/groups/group_id/users/user_id

Response samples

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

Add users from other group(s) to specified group

Add users from other group(s) to specified group

path Parameters
group_id
required
integer
Request Body schema: application/json
fromGroupIDs
required
boolean

Responses

200
post/api/groups/group_id/usersFromGroups/ignored_args
/api/groups/group_id/usersFromGroups/ignored_args

Request samples

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

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
name
required
string

Name of the group.

nickname
string Nullable

Short group nickname.

single_user_group
boolean Nullable

Flag indicating whether this group is a singleton group for one user only.

Responses

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

Request samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "name": "string",
  • "nickname": "string",
  • "single_user_group": true
}

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

query Parameters
name
string

Fetch by name (exact match)

includeSingleUserGroups
boolean

Bool indicating whether to include single user groups. Defaults to false.

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
name
required
string

Name of the group.

nickname
string Nullable

Short group nickname.

single_user_group
boolean Nullable

Flag indicating whether this group is a singleton group for one user only.

group_admins
Array of integers

List of IDs of users to be group admins. Current user will automatically be added as a group admin.

Responses

200
post/api/groups
/api/groups

Request samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "name": "string",
  • "nickname": "string",
  • "single_user_group": true,
  • "group_admins":
    [
    ]
}

Response samples

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

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
instrument_id
required
integer
Request Body schema: application/json
name
required
string

Instrument name.

type
required
string <= 20 characters
Enum: "imager" "spectrograph" "imaging spectrograph"

Instrument type, one of Imager, Spectrograph, or Imaging Spectrograph.

band
string Nullable

The spectral band covered by the instrument (e.g., Optical, IR).

telescope_id
required
integer

The ID of the Telescope that hosts the Instrument.

filters
Array of any

List of filters on the instrument (if any).

api_classname
string <= 7 characters Nullable
Value: "SEDMAPI"

Name of the instrument's API class.

listener_classname
string <= 12 characters Nullable
Value: "SEDMListener"

Name of the instrument's listener class.

Responses

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

Request samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "name": "string",
  • "type": "imager",
  • "band": "string",
  • "telescope_id": 0,
  • "filters":
    [
    ],
  • "api_classname": "SEDMAPI",
  • "listener_classname": "SEDMListener"
}

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

Retrieve all instruments

Retrieve all instruments

query Parameters
name
string

Filter by name (exact match)

Responses

200
400
get/api/instrument
/api/instrument

Response samples

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

Add a new instrument

Add a new instrument

Request Body schema: application/json
name
required
string

Instrument name.

type
required
string <= 20 characters
Enum: "imager" "spectrograph" "imaging spectrograph"

Instrument type, one of Imager, Spectrograph, or Imaging Spectrograph.

band
string Nullable

The spectral band covered by the instrument (e.g., Optical, IR).

telescope_id
required
integer

The ID of the Telescope that hosts the Instrument.

filters
Array of strings
Default: []
Items Enum: "bessellux" "bessellb" "bessellv" "bessellr" "besselli" "standard::u" "standard::b" "standard::v" "standard::r" "standard::i" "desg" "desr" "desi" "desz" "desy" "sdssu" "sdssg" "sdssr" "sdssi" "sdssz" "f435w" "f475w" "f555w" "f606w" "f625w" "f775w" "f850lp" "nicf110w" "nicf160w" "f098m" "f105w" "f110w" "f125w" "f127m" "f139m" "f140w" "f153m" "f160w" "f218w" "f225w" "f275w" "f300x" "f336w" "f350lp" "f390w" "f689m" "f763m" "f845m" "f438w" "uvf475w" "uvf555w" "uvf606w" "uvf625w" "uvf775w" "uvf814w" "uvf850lp" "kepler" "cspb" "csphs" "csphd" "cspjs" "cspjd" "cspv3009" "cspv3014" "cspv9844" "cspys" "cspyd" "cspg" "cspi" "cspk" "cspr" "cspu" "f070w" "f090w" "f115w" "f150w" "f200w" "f277w" "f356w" "f444w" "f140m" "f162m" "f182m" "f210m" "f250m" "f300m" "f335m" "f360m" "f410m" "f430m" "f460m" "f480m" "f560w" "f770w" "f1000w" "f1130w" "f1280w" "f1500w" "f1800w" "f2100w" "f2550w" "f1065c" "f1140c" "f1550c" "f2300c" "lsstu" "lsstg" "lsstr" "lssti" "lsstz" "lssty" "keplercam::us" "keplercam::b" "keplercam::v" "keplercam::r" "keplercam::i" "4shooter2::us" "4shooter2::b" "4shooter2::v" "4shooter2::r" "4shooter2::i" "ztfg" "ztfr" "ztfi" "uvot::b" "uvot::u" "uvot::uvm2" "uvot::uvw1" "uvot::uvw2" "uvot::v" "uvot::white"

List of filters on the instrument (if any).

api_classname
string <= 7 characters Nullable
Value: "SEDMAPI"

Name of the instrument's API class.

listener_classname
string <= 12 characters Nullable
Value: "SEDMListener"

Name of the instrument's listener class.

Responses

200
400
post/api/instrument
/api/instrument

Request samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "name": "string",
  • "type": "imager",
  • "band": "string",
  • "telescope_id": 0,
  • "filters":
    [
    ],
  • "api_classname": "SEDMAPI",
  • "listener_classname": "SEDMListener"
}

Response samples

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

Retrieve invitations

Retrieve invitations

query Parameters
includeUsed
boolean

Bool indicating whether to include used invitations. Defaults to false.

numPerPage
integer

Number of candidates to return per paginated request. Defaults to 25

pageNumber
integer

Page number for paginated query results. Defaults to 1

email
string

Get invitations whose email contains this string.

group
string

Get invitations part of the group with name given by this parameter.

stream
string

Get invitations with access to the stream with name given by this parameter.

invitedBy
string

Get invitations invited by users whose username contains this string.

Responses

200
get/api/invitations
/api/invitations

Response samples

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

Invite a new user

Invite a new user

Request Body schema: application/json
userEmail
required
string
streamIDs
Array of integers

List of IDs of streams invited user will be given access to. If not provided, user will be granted access to all streams associated with the groups specified by groupIDs.

groupIDs
required
Array of integers

List of IDs of groups invited user will be added to. If streamIDs is not provided, invited user will be given accesss to all streams associated with the groups specified by this field.

groupAdmin
Array of booleans

List of booleans indicating whether user should be granted admin status for respective specified group(s).

Responses

200
post/api/invitations
/api/invitations

Request samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "userEmail": "string",
  • "streamIDs":
    [
    ],
  • "groupIDs":
    [
    ],
  • "groupAdmin":
    [
    ]
}

Response samples

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

Delete an invitation

Delete an invitation

path Parameters
invitation_id
required
integer

Responses

200
delete/api/invitations/invitation_id
/api/invitations/invitation_id

Response samples

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

Update a pending invitation

Update a pending invitation

Request Body schema: application/json
groupIDs
Array of integers
streamIDs
Array of integers

Responses

200
patch/api/invitations/invitation_id
/api/invitations/invitation_id

Request samples

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

Response samples

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

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

Retrieve an observing run

Retrieve an observing run

path Parameters
run_id
required
integer

Responses

200
400
get/api/observing_run/run_id
/api/observing_run/run_id

Response samples

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

Update observing run

Update observing run

path Parameters
run_id
required
integer
Request Body schema: application/json
pi
string

The PI of the observing run.

observers
string

The names of the observers

group_id
integer

The ID of the group this run is associated with.

calendar_date
required
string <date>

The local calendar date of the run.

instrument_id
required
integer

The ID of the instrument to be used in this run.

Responses

200
400
put/api/observing_run/run_id
/api/observing_run/run_id

Request samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "pi": "string",
  • "observers": "string",
  • "group_id": 0,
  • "calendar_date": "2020-12-05",
  • "instrument_id": 0
}

Response samples

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

Delete an observing run

Delete an observing run

path Parameters
run_id
required
integer

Responses

200
400
delete/api/observing_run/run_id
/api/observing_run/run_id

Response samples

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

Retrieve all observing runs

Retrieve all observing runs

Responses

200
400
get/api/observing_run
/api/observing_run

Response samples

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

Add a new observing run

Add a new observing run

Request Body schema: application/json
pi
string

The PI of the observing run.

observers
string

The names of the observers

group_id
integer

The ID of the group this run is associated with.

calendar_date
required
string <date>

The local calendar date of the run.

instrument_id
required
integer

The ID of the instrument to be used in this run.

Responses

200
400
post/api/observing_run
/api/observing_run

Request samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "pi": "string",
  • "observers": "string",
  • "group_id": 0,
  • "calendar_date": "2020-12-05",
  • "instrument_id": 0
}

Response samples

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

Retrieve photometry

Retrieve photometry

path Parameters
photometry_id
required
integer
query Parameters
format
string
Enum: "mag" "flux"

Return the photometry in flux or magnitude space? If a value for this query parameter is not provided, the result will be returned in magnitude space.

magsys
string
Enum: "jla1" "ab" "vega" "bd17" "csp" "ab-b12"

The magnitude or zeropoint system of the output. (Default AB)

Responses

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

Response samples

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

Update photometry

Update photometry

path Parameters
photometry_id
required
integer
Request Body schema: application/json
One of
  • PhotometryMag
  • PhotometryFlux
alert_id
integer Nullable
Default: null

Corresponding alert ID. If a record is already present with identical alert ID, only the groups list will be updated (other alert data assumed identical). Defaults to None.

ra_unc
number Nullable
Default: null

Uncertainty on RA [arcsec].

limiting_mag
required
number

Limiting magnitude of the image in the magnitude system magsys.

obj_id
required
string

ID of the Object to which the photometry will be attached.

ra
number Nullable
Default: null

ICRS Right Ascension of the centroid of the photometric aperture [deg].

mag
number Nullable
Default: null

Magnitude of the observation in the magnitude system magsys. Can be null in the case of a non-detection.

dec
number Nullable
Default: null

ICRS Declination of the centroid of the photometric aperture [deg].

magsys
required
any
Enum: "jla1" "ab" "vega" "bd17" "csp" "ab-b12"

The magnitude system to which the flux and the zeropoint are tied.

assignment_id
integer Nullable
Default: null

ID of the classical assignment which generated the photometry

altdata
object Nullable
Default: null

Misc. alternative metadata stored in JSON format, e.g. {'calibration': {'source': 'ps1', 'color_term': 0.012}, 'photometry_method': 'allstar', 'method_reference': 'Masci et al. (2015)'}

magerr
number Nullable
Default: null

Magnitude error of the observation in the magnitude system magsys. Can be null in the case of a non-detection.

mjd
required
number

MJD of the observation.

instrument_id
required
integer

ID of the instrument with which the observation was carried out.

dec_unc
number Nullable
Default: null

Uncertainty on dec [arcsec].

filter
required
any
Enum: "bessellux" "bessellb" "bessellv" "bessellr" "besselli" "standard::u" "standard::b" "standard::v" "standard::r" "standard::i" "desg" "desr" "desi" "desz" "desy" "sdssu" "sdssg" "sdssr" "sdssi" "sdssz" "f435w" "f475w" "f555w" "f606w" "f625w" "f775w" "f850lp" "nicf110w" "nicf160w" "f098m" "f105w" "f110w" "f125w" "f127m" "f139m" "f140w" "f153m" "f160w" "f218w" "f225w" "f275w" "f300x" "f336w" "f350lp" "f390w" "f689m" "f763m" "f845m" "f438w" "uvf475w" "uvf555w" "uvf606w" "uvf625w" "uvf775w" "uvf814w" "uvf850lp" "kepler" "cspb" "csphs" "csphd" "cspjs" "cspjd" "cspv3009" "cspv3014" "cspv9844" "cspys" "cspyd" "cspg" "cspi" "cspk" "cspr" "cspu" "f070w" "f090w" "f115w" "f150w" "f200w" "f277w" "f356w" "f444w" "f140m" "f162m" "f182m" "f210m" "f250m" "f300m" "f335m" "f360m" "f410m" "f430m" "f460m" "f480m" "f560w" "f770w" "f1000w" "f1130w" "f1280w" "f1500w" "f1800w" "f2100w" "f2550w" "f1065c" "f1140c" "f1550c" "f2300c" "lsstu" "lsstg" "lsstr" "lssti" "lsstz" "lssty" "keplercam::us" "keplercam::b" "keplercam::v" "keplercam::r" "keplercam::i" "4shooter2::us" "4shooter2::b" "4shooter2::v" "4shooter2::r" "4shooter2::i" "ztfg" "ztfr" "ztfi" "uvot::b" "uvot::u" "uvot::uvm2" "uvot::uvw1" "uvot::uvw2" "uvot::v" "uvot::white"

The bandpass of the observation.

Responses

200
400
patch/api/photometry/photometry_id
/api/photometry/photometry_id

Request samples

Content type
application/json
Example
Copy
Expand all Collapse all
{
  • "alert_id": null,
  • "ra_unc": null,
  • "limiting_mag": 0,
  • "obj_id": "string",
  • "ra": null,
  • "mag": null,
  • "dec": null,
  • "magsys": "jla1",
  • "assignment_id": null,
  • "altdata": null,
  • "magerr": null,
  • "mjd": 0,
  • "instrument_id": 0,
  • "dec_unc": null,
  • "filter": "bessellux"
}

Response samples

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

Update and/or upload photometry, resolving potenti

Update and/or upload photometry, resolving potential duplicates

Request Body schema: application/json
One of
  • PhotMagFlexible
  • PhotFluxFlexible
limiting_mag
required
any

Limiting magnitude of the image in the magnitude system magsys. Can be given as a scalar or a 1D list. If a scalar, will be broadcast to all values given as lists. Null values not allowed.

ra_unc
any Nullable
Default: null

Uncertainty on RA [arcsec]. Can be given as a scalar or a 1D list. If a scalar, will be broadcast to all values given as lists. Null values allowed.

obj_id
required
any

ID of the Obj(s) to which the photometry will be attached. Can be given as a scalar or a 1D list. If a scalar, will be broadcast to all values given as lists. Null values are not allowed.

group_ids
any
Default: []

List of group IDs to which photometry points will be visible. If 'all', will be shared with site-wide public group (visible to all users who can view associated source).

origin
any Nullable
Default: null

Provenance of the Photometry. If a record is already present with identical origin, only the groups list will be updated (other data assumed identical). Defaults to None.

ra
any Nullable
Default: null

ICRS Right Ascension of the centroid of the photometric aperture [deg]. Can be given as a scalar or a 1D list. If a scalar, will be broadcast to all values given as lists. Null values allowed.

mag
any Nullable
Default: null

Magnitude of the observation in the magnitude system magsys. Can be given as a scalar or a 1D list. If a scalar, will be broadcast to all values given as lists. Null values allowed for non-detections. If mag is null, the corresponding magerr must also be null.

dec
any Nullable
Default: null

ICRS Declination of the centroid of the photometric aperture [deg]. Can be given as a scalar or a 1D list. If a scalar, will be broadcast to all values given as lists. Null values allowed.

magsys
required
any

The magnitude system to which the magnitude, magnitude error, and limiting magnitude are tied. Can be given as a scalar or a 1D list. If a scalar, will be broadcast to all values given as lists. Null values not allowed. Allowed values: jla1, ab, vega, bd17, csp, ab-b12

limiting_mag_nsigma
any
Default: 5

Number of standard deviations above the background that the limiting magnitudes correspond to. Null values not allowed. Default = 5.

assignment_id
integer Nullable
Default: null

ID of the classical assignment which generated the photometry

altdata
any Nullable
Default: null

Misc. alternative metadata stored in JSON format, e.g. {'calibration': {'source': 'ps1', 'color_term': 0.012}, 'photometry_method': 'allstar', 'method_reference': 'Masci et al. (2015)'}

magerr
any Nullable
Default: null

Magnitude of the observation in the magnitude system magsys. Can be given as a scalar or a 1D list. If a scalar, will be broadcast to all values given as lists. Null values allowed for non-detections. If magerr is null, the corresponding mag must also be null.

mjd
required
any

MJD of the observation(s). Can be a given as a scalar or a 1D list. If a scalar, will be broadcast to all values given as lists. Null values not allowed.

instrument_id
required
any

ID of the Instrument(s) with which the photometry was acquired. Can be given as a scalar or a 1D list. If a scalar, will be broadcast to all values given as lists. Null values are not allowed.

dec_unc
any Nullable
Default: null

Uncertainty on dec [arcsec]. Can be given as a scalar or a 1D list. If a scalar, will be broadcast to all values given as lists. Null values allowed.

filter
required
any

The bandpass of the observation(s). Can be given as a scalar or a 1D list. If a scalar, will be broadcast to all values given as lists. Null values not allowed. Allowed values: bessellux, bessellb, bessellv, bessellr, besselli, standard::u, standard::b, standard::v, standard::r, standard::i, desg, desr, desi, desz, desy, sdssu, sdssg, sdssr, sdssi, sdssz, f435w, f475w, f555w, f606w, f625w, f775w, f850lp, nicf110w, nicf160w, f098m, f105w, f110w, f125w, f127m, f139m, f140w, f153m, f160w, f218w, f225w, f275w, f300x, f336w, f350lp, f390w, f689m, f763m, f845m, f438w, uvf475w, uvf555w, uvf606w, uvf625w, uvf775w, uvf814w, uvf850lp, kepler, cspb, csphs, csphd, cspjs, cspjd, cspv3009, cspv3014, cspv9844, cspys, cspyd, cspg, cspi, cspk, cspr, cspu, f070w, f090w, f115w, f150w, f200w, f277w, f356w, f444w, f140m, f162m, f182m, f210m, f250m, f300m, f335m, f360m, f410m, f430m, f460m, f480m, f560w, f770w, f1000w, f1130w, f1280w, f1500w, f1800w, f2100w, f2550w, f1065c, f1140c, f1550c, f2300c, lsstu, lsstg, lsstr, lssti, lsstz, lssty, keplercam::us, keplercam::b, keplercam::v, keplercam::r, keplercam::i, 4shooter2::us, 4shooter2::b, 4shooter2::v, 4shooter2::r, 4shooter2::i, ztfg, ztfr, ztfi, uvot::b, uvot::u, uvot::uvm2, uvot::uvw1, uvot::uvw2, uvot::v, uvot::white

Responses

200
put/api/photometry
/api/photometry

Request samples

Content type
application/json
Example
Copy
Expand all Collapse all
{
  • "limiting_mag": null,
  • "ra_unc": null,
  • "obj_id": null,
  • "group_ids": [ ],
  • "origin": null,
  • "ra": null,
  • "mag": null,
  • "dec": null,
  • "magsys": null,
  • "limiting_mag_nsigma": 5,
  • "assignment_id": null,
  • "altdata": null,
  • "magerr": null,
  • "mjd": null,
  • "instrument_id": null,
  • "dec_unc": null,
  • "filter": null
}

Response samples

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

Upload photometry

Upload photometry

Request Body schema: application/json
One of
  • PhotMagFlexible
  • PhotFluxFlexible
limiting_mag
required
any

Limiting magnitude of the image in the magnitude system magsys. Can be given as a scalar or a 1D list. If a scalar, will be broadcast to all values given as lists. Null values not allowed.

ra_unc
any Nullable
Default: null

Uncertainty on RA [arcsec]. Can be given as a scalar or a 1D list. If a scalar, will be broadcast to all values given as lists. Null values allowed.

obj_id
required
any

ID of the Obj(s) to which the photometry will be attached. Can be given as a scalar or a 1D list. If a scalar, will be broadcast to all values given as lists. Null values are not allowed.

group_ids
any
Default: []

List of group IDs to which photometry points will be visible. If 'all', will be shared with site-wide public group (visible to all users who can view associated source).

origin
any Nullable
Default: null

Provenance of the Photometry. If a record is already present with identical origin, only the groups list will be updated (other data assumed identical). Defaults to None.

ra
any Nullable
Default: null

ICRS Right Ascension of the centroid of the photometric aperture [deg]. Can be given as a scalar or a 1D list. If a scalar, will be broadcast to all values given as lists. Null values allowed.

mag
any Nullable
Default: null

Magnitude of the observation in the magnitude system magsys. Can be given as a scalar or a 1D list. If a scalar, will be broadcast to all values given as lists. Null values allowed for non-detections. If mag is null, the corresponding magerr must also be null.

dec
any Nullable
Default: null

ICRS Declination of the centroid of the photometric aperture [deg]. Can be given as a scalar or a 1D list. If a scalar, will be broadcast to all values given as lists. Null values allowed.

magsys
required
any

The magnitude system to which the magnitude, magnitude error, and limiting magnitude are tied. Can be given as a scalar or a 1D list. If a scalar, will be broadcast to all values given as lists. Null values not allowed. Allowed values: jla1, ab, vega, bd17, csp, ab-b12

limiting_mag_nsigma
any
Default: 5

Number of standard deviations above the background that the limiting magnitudes correspond to. Null values not allowed. Default = 5.

assignment_id
integer Nullable
Default: null

ID of the classical assignment which generated the photometry

altdata
any Nullable
Default: null

Misc. alternative metadata stored in JSON format, e.g. {'calibration': {'source': 'ps1', 'color_term': 0.012}, 'photometry_method': 'allstar', 'method_reference': 'Masci et al. (2015)'}

magerr
any Nullable
Default: null

Magnitude of the observation in the magnitude system magsys. Can be given as a scalar or a 1D list. If a scalar, will be broadcast to all values given as lists. Null values allowed for non-detections. If magerr is null, the corresponding mag must also be null.

mjd
required
any

MJD of the observation(s). Can be a given as a scalar or a 1D list. If a scalar, will be broadcast to all values given as lists. Null values not allowed.

instrument_id
required
any

ID of the Instrument(s) with which the photometry was acquired. Can be given as a scalar or a 1D list. If a scalar, will be broadcast to all values given as lists. Null values are not allowed.

dec_unc
any Nullable
Default: null

Uncertainty on dec [arcsec]. Can be given as a scalar or a 1D list. If a scalar, will be broadcast to all values given as lists. Null values allowed.

filter
required
any

The bandpass of the observation(s). Can be given as a scalar or a 1D list. If a scalar, will be broadcast to all values given as lists. Null values not allowed. Allowed values: bessellux, bessellb, bessellv, bessellr, besselli, standard::u, standard::b, standard::v, standard::r, standard::i, desg, desr, desi, desz, desy, sdssu, sdssg, sdssr, sdssi, sdssz, f435w, f475w, f555w, f606w, f625w, f775w, f850lp, nicf110w, nicf160w, f098m, f105w, f110w, f125w, f127m, f139m, f140w, f153m, f160w, f218w, f225w, f275w, f300x, f336w, f350lp, f390w, f689m, f763m, f845m, f438w, uvf475w, uvf555w, uvf606w, uvf625w, uvf775w, uvf814w, uvf850lp, kepler, cspb, csphs, csphd, cspjs, cspjd, cspv3009, cspv3014, cspv9844, cspys, cspyd, cspg, cspi, cspk, cspr, cspu, f070w, f090w, f115w, f150w, f200w, f277w, f356w, f444w, f140m, f162m, f182m, f210m, f250m, f300m, f335m, f360m, f410m, f430m, f460m, f480m, f560w, f770w, f1000w, f1130w, f1280w, f1500w, f1800w, f2100w, f2550w, f1065c, f1140c, f1550c, f2300c, lsstu, lsstg, lsstr, lssti, lsstz, lssty, keplercam::us, keplercam::b, keplercam::v, keplercam::r, keplercam::i, 4shooter2::us, 4shooter2::b, 4shooter2::v, 4shooter2::r, 4shooter2::i, ztfg, ztfr, ztfi, uvot::b, uvot::u, uvot::uvm2, uvot::uvw1, uvot::uvw2, uvot::v, uvot::white

Responses

200
post/api/photometry
/api/photometry

Request samples

Content type
application/json
Example
Copy
Expand all Collapse all
{
  • "limiting_mag": null,
  • "ra_unc": null,
  • "obj_id": null,
  • "group_ids": [ ],
  • "origin": null,
  • "ra": null,
  • "mag": null,
  • "dec": null,
  • "magsys": null,
  • "limiting_mag_nsigma": 5,
  • "assignment_id": null,
  • "altdata": null,
  • "magerr": null,
  • "mjd": null,
  • "instrument_id": null,
  • "dec_unc": null,
  • "filter": null
}

Response samples

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

Share data with additional groups/users

Share data with additional groups/users

Request Body schema: application/json
photometryIDs
Array of integers

IDs of the photometry data to be shared. If spectrumIDs is not provided, this is required.

spectrumIDs
Array of integers

IDs of the spectra to be shared. If photometryIDs is not provided, this is required.

groupIDs
required
Array of integers

List of IDs of groups data will be shared with. To share data with a single user, specify their single user group ID here.

Responses

200
post/api/sharing
/api/sharing

Request samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "photometryIDs":
    [
    ],
  • "spectrumIDs":
    [
    ],
  • "groupIDs":
    [
    ]
}

Response samples

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

Delete bulk-uploaded photometry set

Delete bulk-uploaded photometry set

path Parameters
upload_id
required
string

Responses

200
400
delete/api/photometry/bulk_delete/upload_id
/api/photometry/bulk_delete/upload_id

Response samples

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

Get photometry taken by specific instruments over

Get photometry taken by specific instruments over a date range

query Parameters
format
string
Enum: "mag" "flux"

Return the photometry in flux or magnitude space? If a value for this query parameter is not provided, the result will be returned in magnitude space.

magsys
string
Enum: "jla1" "ab" "vega" "bd17" "csp" "ab-b12"

The magnitude or zeropoint system of the output. (Default AB)

Request Body schema: application/json
instrument_ids
Array of integers Nullable
Default: null

IDs of the instruments to query for photometry from. If None, queries all instruments.

max_date
string <date-time> Nullable
Default: null

Query for photometry taken before this UT DateTime. For an open-ended interval use None.

min_date
string <date-time> Nullable
Default: null

Query for photometry taken after this UT DateTime. For an open-ended interval use None.

Responses

200
400
get/api/photometry/range
/api/photometry/range

Request samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "instrument_ids": null,
  • "max_date": null,
  • "min_date": null
}

Response samples

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

Retrieve all photometry associated with an Object

Retrieve all photometry associated with an Object

path Parameters
obj_id
required
string

ID of the object to retrieve photometry for

query Parameters
format
string
Enum: "mag" "flux"

Return the photometry in flux or magnitude space? If a value for this query parameter is not provided, the result will be returned in magnitude space.

magsys
string
Enum: "jla1" "ab" "vega" "bd17" "csp" "ab-b12"

The magnitude or zeropoint system of the output. (Default AB)

Responses

200
400
get/api/sources/obj_id/photometry
/api/sources/obj_id/photometry

Response samples

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

Retrieve all spectra associated with an Object

Retrieve all spectra associated with an Object

path Parameters
obj_id
required
string

ID of the object to retrieve spectra for

query Parameters
normalization
string

what normalization is needed for the spectra (e.g., "median"). If omitted, returns the original spectrum. Options for normalization are:

  • median: normalize the flux to have median==1

Responses

200
400
get/api/sources/obj_id/spectra
/api/sources/obj_id/spectra

Response samples

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

Retrieve offset stars to aid in spectroscopy

Retrieve offset stars to aid in spectroscopy

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

Which facility to generate the starlist for

num_offset_stars
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)

use_ztfref
boolean

Use ZTFref catalog for offset star positions, otherwise Gaia DR2

Responses

200
400
get/api/sources/obj_id/offsets
/api/sources/obj_id/offsets

Response samples

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

Generate a PDF/PNG finding chart to aid in spectro

Generate a PDF/PNG finding chart to aid in spectroscopy

path Parameters
obj_id
required
string
query Parameters
imsize
float [ 2 .. 15 ]

Image size in arcmin (square)

facility
string
Enum: "Keck" "Shane" "P200"
image_source
string
Enum: "desi" "dss" "ztfref"

Source of the image used in the finding chart

use_ztfref
boolean

Use ZTFref catalog for offset star positions, otherwise DR2

obstime
string

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

type
string
Enum: "png" "pdf"

output type

num_offset_stars
integer [ 0 .. 4 ]

output desired number of offset stars [0,5] (default: 3)

Responses

200

A PDF/PNG finding chart file

400
get/api/sources/obj_id/finder
/api/sources/obj_id/finder

Response samples

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

Retrieve an object's classifications

Retrieve an object's classifications

path Parameters
obj_id
required
integer

Responses

200
400
get/api/sources/obj_id/classifications
/api/sources/obj_id/classifications

Response samples

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

Retrieve a source

Retrieve a source

path Parameters
obj_id
required
string

Responses

200
400
get/api/sources/obj_id
/api/sources/obj_id

Response samples

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

Delete a source

Delete a source

path Parameters
obj_id
required
string
group_id
required
string

Responses

200
delete/api/sources/obj_id
/api/sources/obj_id

Response samples

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

Check if a Source exists

Check if a Source exists

path Parameters
obj_id
required
string

Responses

200
404
head/api/sources/obj_id
/api/sources/obj_id

Response samples

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

Update a source

Update a source

path Parameters
obj_id
required
string
Request Body schema: application/json
ra
number Nullable
dec
number Nullable
ra_dis
number Nullable

J2000 Right Ascension at discovery time [deg].

dec_dis
number Nullable

J2000 Declination at discovery time [deg].

ra_err
number Nullable

Error on J2000 Right Ascension at discovery time [deg].

dec_err
number Nullable

Error on J2000 Declination at discovery time [deg].

offset
number Nullable

Offset from nearest static object [arcsec].

redshift
number Nullable

Redshift.

redshift_history
any Nullable

Record of who set which redshift values and when.

altdata
any Nullable

Misc. alternative metadata stored in JSON format, e.g. {'gaia': {'info': {'Teff': 5780}}}

dist_nearest_source
number Nullable

Distance to the nearest Obj [arcsec].

mag_nearest_source
number Nullable

Magnitude of the nearest Obj [AB].

e_mag_nearest_source
number Nullable

Error on magnitude of the nearest Obj [mag].

transient
boolean Nullable

Boolean indicating whether the object is an astrophysical transient.

varstar
boolean Nullable

Boolean indicating whether the object is a variable star.

is_roid
boolean Nullable

Boolean indicating whether the object is a moving object.

score
number Nullable

Machine learning score.

origin
string Nullable

Origin of the object.

internal_key
string

Internal key used for secure websocket messaging.

detect_photometry_count
integer Nullable

How many times the object was detected above :math:S/N = 5.

Responses

200
400
patch/api/sources/obj_id
/api/sources/obj_id

Request samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "ra": 0,
  • "dec": 0,
  • "ra_dis": 0,
  • "dec_dis": 0,
  • "ra_err": 0,
  • "dec_err": 0,
  • "offset": 0,
  • "redshift": 0,
  • "redshift_history": null,
  • "altdata": null,
  • "dist_nearest_source": 0,
  • "mag_nearest_source": 0,
  • "e_mag_nearest_source": 0,
  • "transient": true,
  • "varstar": true,
  • "is_roid": true,
  • "score": 0,
  • "origin": "string",
  • "internal_key": "string",
  • "detect_photometry_count": 0
}

Response samples

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

Retrieve all sources

Retrieve all sources

query Parameters
ra
number

RA for spatial filtering

dec
number

Declination for spatial filtering

radius
number

Radius for spatial filtering if ra & dec are provided

sourceID
string

Portion of ID to filter on

simbadClass
string

Simbad class to filter on

hasTNSname
boolean

If true, return only those matches with TNS names

numPerPage
integer

Number of sources to return per paginated request. Defaults to 100. Max 1000.

pageNumber
integer

Page number for paginated query results. Defaults to 1

totalMatches
integer

Used only in the case of paginating query results - if provided, this allows for avoiding a potentially expensive query.count() call.

startDate
string

Arrow-parseable date string (e.g. 2020-01-01). If provided, filter by last_detected >= startDate

endDate
string

Arrow-parseable date string (e.g. 2020-01-01). If provided, filter by last_detected <= endDate

group_ids
list

If provided, filter only sources saved to one of these group IDs.

includePhotometry
boolean

Boolean indicating whether to include associated photometry. Defaults to false.

includeRequested
boolean

Boolean indicating whether to include requested saves. Defaults to false.

pendingOnly
boolean

Boolean indicating whether to only include requested/pending saves. Defaults to false.

savedBefore
string

Only return sources that were saved before this UTC datetime.

savedAfter
string

Only return sources that were saved after this UTC datetime.

saveSummary
boolean

Boolean indicating whether to only return the source save information in the response (defaults to false). If true, the response will contain a list of dicts with the following schema under response['data']['sources']:

    {
      "group_id": 2,
      "created_at": "2020-11-13T22:11:25.910271",
      "saved_by_id": 1,
      "saved_at": "2020-11-13T22:11:25.910271",
      "requested": false,
      "unsaved_at": null,
      "modified": "2020-11-13T22:11:25.910271",
      "obj_id": "16fil",
      "active": true,
      "unsaved_by_id": null
    }
sortBy
string

The field to sort by. Currently allowed options are ["id", "ra", "dec", "redshift", "saved_at"]

sortOrder
string

The sort order - either "asc" or "desc". Defaults to "asc"

includeComments
boolean

Boolean indicating whether to include comment metadata in response. Defaults to false.

includeSpectrumExists
boolean

Boolean indicating whether to return if a source has a spectra. Defaults to false.

Responses

200
400
get/api/sources
/api/sources

Response samples

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

Add a new source

Add a new source

Request Body schema: application/json
ra
number Nullable
dec
number Nullable
id
required
string

Name of the object.

ra_dis
number Nullable

J2000 Right Ascension at discovery time [deg].

dec_dis
number Nullable

J2000 Declination at discovery time [deg].

ra_err
number Nullable

Error on J2000 Right Ascension at discovery time [deg].

dec_err
number Nullable

Error on J2000 Declination at discovery time [deg].

offset
number Nullable

Offset from nearest static object [arcsec].

redshift
number Nullable

Redshift.

redshift_history
any Nullable

Record of who set which redshift values and when.

altdata
any Nullable

Misc. alternative metadata stored in JSON format, e.g. {'gaia': {'info': {'Teff': 5780}}}

dist_nearest_source
number Nullable

Distance to the nearest Obj [arcsec].

mag_nearest_source
number Nullable

Magnitude of the nearest Obj [AB].

e_mag_nearest_source
number Nullable

Error on magnitude of the nearest Obj [mag].

transient
boolean Nullable

Boolean indicating whether the object is an astrophysical transient.

varstar
boolean Nullable

Boolean indicating whether the object is a variable star.

is_roid
boolean Nullable

Boolean indicating whether the object is a moving object.

score
number Nullable

Machine learning score.

origin
string Nullable

Origin of the object.

internal_key
string

Internal key used for secure websocket messaging.

detect_photometry_count
integer Nullable

How many times the object was detected above :math:S/N = 5.

group_ids
Array of integers

List of associated group IDs. If not specified, all of the user or token's groups will be used.

Responses

200
post/api/sources
/api/sources

Request samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "ra": 0,
  • "dec": 0,
  • "id": "string",
  • "ra_dis": 0,
  • "dec_dis": 0,
  • "ra_err": 0,
  • "dec_err": 0,
  • "offset": 0,
  • "redshift": 0,
  • "redshift_history": null,
  • "altdata": null,
  • "dist_nearest_source": 0,
  • "mag_nearest_source": 0,
  • "e_mag_nearest_source": 0,
  • "transient": true,
  • "varstar": true,
  • "is_roid": true,
  • "score": 0,
  • "origin": "string",
  • "internal_key": "string",
  • "detect_photometry_count": 0,
  • "group_ids":
    [
    ]
}

Response samples

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

Send out a new source notification

Send out a new source notification

Request Body schema: application/json
additionalNotes
string

Notes to append to the message sent out

groupIds
required
Array of integers

List of IDs of groups whose members should get the notification (if they've opted in)

sourceId
required
string

The ID of the Source's Obj the notification is being sent about

level
required
string

Either 'soft' or 'hard', determines whether to send an email or email+SMS notification

Responses

200
post/api/source_notifications
/api/source_notifications

Request samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "additionalNotes": "string",
  • "groupIds":
    [
    ],
  • "sourceId": "string",
  • "level": "string"
}

Response samples

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

Save or request group(s) to save source, and optio

Save or request group(s) to save source, and optionally unsave from group(s).

Request Body schema: application/json
objId
required
string

ID of the object in question.

inviteGroupIds
required
Array of integers

List of group IDs to save or invite to save specified source.

unsaveGroupIds
Array of integers

List of group IDs from which specified source is to be unsaved.

Responses

200
post/api/source_groups
/api/source_groups

Request samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "objId": "string",
  • "inviteGroupIds":
    [
    ],
  • "unsaveGroupIds":
    [
    ]
}

Response samples

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

Update a Source table row

Update a Source table row

path Parameters
obj_id
required
integer
Request Body schema: application/json
groupID
required
integer
active
required
boolean
requested
required
boolean

Responses

200
patch/api/source_groups/obj_id
/api/source_groups/obj_id

Request samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "groupID": 0,
  • "active": true,
  • "requested": true
}

Response samples

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

Update spectrum

Update spectrum

path Parameters
spectrum_id
required
integer
Request Body schema: application/json
obj_id
required
string

ID of this Spectrum's Obj.

group_ids
any
Default: []

IDs of the Groups to share this spectrum with. Set to "all" to make this spectrum visible to all users.

origin
string

Origin of the spectrum.

followup_request_id
integer

ID of the Followup request that generated this spectrum, if any.

fluxes
required
Array of numbers

Flux of the Spectrum [F_lambda, arbitrary units].

wavelengths
required
Array of numbers

Wavelengths of the spectrum [Angstrom].

assignment_id
integer

ID of the classical assignment that generated this spectrum, if any.

observed_by
Array of integers
Default: []

IDs of the Users who observed this Spectrum.

altdata
any

Miscellaneous alternative metadata.

reduced_by
Array of integers
Default: []

IDs of the Users who reduced this Spectrum.

instrument_id
required
integer

ID of the Instrument that acquired the Spectrum.

observed_at
required
string <date-time>

The ISO UTC time the spectrum was taken.

errors
Array of numbers

Errors on the fluxes of the spectrum [F_lambda, same units as fluxes.]

Responses

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

Request samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "obj_id": "string",
  • "group_ids": [ ],
  • "origin": "string",
  • "followup_request_id": 0,
  • "fluxes":
    [
    ],
  • "wavelengths":
    [
    ],
  • "assignment_id": 0,
  • "observed_by": [ ],
  • "altdata": null,
  • "reduced_by": [ ],
  • "instrument_id": 0,
  • "observed_at": "2020-12-05T05:22:38Z",
  • "errors":
    [
    ]
}

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
obj_id
required
string

ID of this Spectrum's Obj.

group_ids
any
Default: []

IDs of the Groups to share this spectrum with. Set to "all" to make this spectrum visible to all users.

origin
string

Origin of the spectrum.

followup_request_id
integer

ID of the Followup request that generated this spectrum, if any.

fluxes
required
Array of numbers

Flux of the Spectrum [F_lambda, arbitrary units].

wavelengths
required
Array of numbers

Wavelengths of the spectrum [Angstrom].

assignment_id
integer

ID of the classical assignment that generated this spectrum, if any.

observed_by
Array of integers
Default: []

IDs of the Users who observed this Spectrum.

altdata
any

Miscellaneous alternative metadata.

reduced_by
Array of integers
Default: []

IDs of the Users who reduced this Spectrum.

instrument_id
required
integer

ID of the Instrument that acquired the Spectrum.

observed_at
required
string <date-time>

The ISO UTC time the spectrum was taken.

errors
Array of numbers

Errors on the fluxes of the spectrum [F_lambda, same units as fluxes.]

Responses

200
400
post/api/spectrum
/api/spectrum

Request samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "obj_id": "string",
  • "group_ids": [ ],
  • "origin": "string",
  • "followup_request_id": 0,
  • "fluxes":
    [
    ],
  • "wavelengths":
    [
    ],
  • "assignment_id": 0,
  • "observed_by": [ ],
  • "altdata": null,
  • "reduced_by": [ ],
  • "instrument_id": 0,
  • "observed_at": "2020-12-05T05:22:38Z",
  • "errors":
    [
    ]
}

Response samples

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

Parse spectrum from ASCII file

Parse spectrum from ASCII file

Request Body schema: application/json
ascii
required
string

The content of the ASCII file to be parsed.

The file can optionally contain a header which will be parsed and stored.

The lines that make up the ASCII header must appear at the beginning of the file and all be formatted the same way within a single file. They can be formatted in one of two ways.

1) # KEY: VALUE
2) # KEY = VALUE / COMMENT

astropy.io.ascii.read is used to load the table into Python memory. An attempt is made to parse the header first using method 1, then method 2.

Example of format 1:

# XTENSION: IMAGE
# BITPIX: -32
# NAXIS: 2
# NAXIS1: 433
# NAXIS2: 1
# RA: 230.14

Example of format 2:

# FILTER  = 'clear   '           / Filter
# EXPTIME =              600.003 / Total exposure time (sec); avg. of R&B
# OBJECT  = 'ZTF20abpuxna'       / User-specified object name
# TARGNAME= 'ZTF20abpuxna_S1'    / Target name (from starlist)
# DICHNAME= '560     '           / Dichroic
# GRISNAME= '400/3400'           / Blue grism
# GRANAME = '400/8500'           / Red grating
# WAVELEN =        7829.41406250 / Red specified central wavelength
# BLUFILT = 'clear   '           / Blue filter
# REDFILT = 'Clear   '           / Red filter
# SLITNAME= 'long_1.0'           / Slitmask
# INSTRUME= 'LRIS+LRISBLUE'      / Camera
# TELESCOP= 'Keck I  '           / Telescope name
# BLUDET  = 'LRISB   '           / LRIS blue detector
# REDDET  = 'LRISR3  '           / LRIS red detector
# OBSERVER= 'Andreoni Anand De'  / Observer name
# REDUCER = '        '           / Name of reducer
# LPIPEVER= '2020.06 '           / LPipe version number
# HOSTNAME= 'gayatri '           / LPipe host computer name
# IDLVER  = '8.1     '           / IDL version number
# DATE    = '2020-09-15T09:47:10' / UT end of last exposure

The data must be at least 2 column ascii (wavelength, flux). If three columns are given, they are interpreted as (wavelength, flux, fluxerr). If more than 3 columns are given, by default the first three are interpreted as (wavelength, flux, fluxerr). The column indices of each of these arguments can be controlled by passing the integer column index to the POST JSON.

Examples of valid data sections:

Many-column ASCII:

   10295.736  2.62912e-16  1.67798e-15  2.24407e-17    4084    75.956  5.48188e+15  0
   10296.924  2.96887e-16  1.57197e-15  2.21469e-17    4085    75.959  5.42569e+15  0
   10298.112  3.20429e-16  1.45017e-15  2.16863e-17    4086    75.962  5.36988e+15  0
   10299.301  3.33367e-16  1.06116e-15  1.94187e-17    4087    75.965  5.31392e+15  0
   10300.489  3.09943e-16  6.99539e-16  1.67183e-17    4088    75.968  5.25836e+15  0
   10301.678  3.48273e-16  5.56194e-16  1.59555e-17    4089    75.972  5.20314e+15  0
   10302.866  3.48102e-16  5.28483e-16  1.58033e-17    4090    75.975  5.15146e+15  0
   10304.055  3.78640e-16  6.00997e-16  1.67462e-17    4091    75.978  5.10058e+15  0
   10305.243  4.28820e-16  7.18759e-16  1.81534e-17    4092    75.981  5.05032e+15  0
   10306.432  4.13152e-16  7.54203e-16  1.83965e-17    4093    75.984  5.00097e+15  0

3-column ASCII:

8993.2 1.148e-16 7.919e-34
9018.7 1.068e-16 6.588e-34
9044.3 1.056e-16 5.660e-34
9069.9 9.763e-17 5.593e-34
9095.4 1.048e-16 8.374e-34
9121.0 1.026e-16 8.736e-34
9146.6 8.472e-17 9.505e-34
9172.1 9.323e-17 7.592e-34
9197.7 1.050e-16 7.863e-34
9223.3 8.701e-17 7.135e-34

2-column ASCII:

      10045.1    0.0217740
      10046.3    0.0182158
      10047.4    0.0204764
      10048.6    0.0231833
      10049.8    0.0207157
      10051.0    0.0185226
      10052.2    0.0200072
      10053.4    0.0205159
      10054.5    0.0199460
      10055.7    0.0210533

2-column ASCII:

7911.60 1.045683
7920.80 1.046414
7930.00 1.235362
7939.20 0.783466
7948.40 1.116153
7957.60 1.375844
7966.80 1.029127
7976.00 1.019637
7985.20 0.732859
7994.40 1.236514
flux_column
integer
Default: 1

The 0-based index of the ASCII column corresponding to the flux values of the spectrum (default 1).

wave_column
integer
Default: 0

The 0-based index of the ASCII column corresponding to the wavelength values of the spectrum (default 0).

fluxerr_column
integer Nullable
Default: null

The 0-based index of the ASCII column corresponding to the flux error values of the spectrum (default 2). If there are only 2 columns in the input file this value will be ignored. If there are more than 2 columns in the input file, but none of them correspond to flux error values, set this parameter to None.

Responses

200
400
post/api/spectrum/parse/ascii
/api/spectrum/parse/ascii

Request samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "ascii": "string",
  • "flux_column": 1,
  • "wave_column": 0,
  • "fluxerr_column": null
}

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "wavelengths":
    [
    ],
  • "fluxes":
    [
    ],
  • "errors":
    [
    ],
  • "obj_id": "string",
  • "observed_at": "2020-12-05T05:22:38Z",
  • "origin": "string",
  • "instrument_id": 0,
  • "followup_request_id": 0,
  • "assignment_id": 0,
  • "altdata": null,
  • "original_file_string": "string",
  • "original_file_filename": "string"
}

Upload spectrum from ASCII file

Upload spectrum from ASCII file

Request Body schema: application/json
flux_column
integer
Default: 1

The 0-based index of the ASCII column corresponding to the flux values of the spectrum (default 1).

obj_id
required
string

The ID of the object that the spectrum is of.

filename
required
string

The original filename (for bookkeeping purposes).

group_ids
Array of integers

The IDs of the groups to share this spectrum with.

wave_column
integer
Default: 0

The 0-based index of the ASCII column corresponding to the wavelength values of the spectrum (default 0).

followup_request_id
integer

ID of the Followup request that generated this spectrum, if any.

assignment_id
integer

ID of the classical assignment that generated this spectrum, if any.

observed_by
Array of integers
Default: []

IDs of the Users who observed this Spectrum.

fluxerr_column
integer Nullable
Default: null

The 0-based index of the ASCII column corresponding to the flux error values of the spectrum (default 2). If there are only 2 columns in the input file this value will be ignored. If there are more than 2 columns in the input file, but none of them correspond to flux error values, set this parameter to None.

reduced_by
Array of integers
Default: []

IDs of the Users who reduced this Spectrum.

ascii
required
string

The content of the ASCII file to be parsed.

The file can optionally contain a header which will be parsed and stored.

The lines that make up the ASCII header must appear at the beginning of the file and all be formatted the same way within a single file. They can be formatted in one of two ways.

1) # KEY: VALUE
2) # KEY = VALUE / COMMENT

astropy.io.ascii.read is used to load the table into Python memory. An attempt is made to parse the header first using method 1, then method 2.

Example of format 1:

# XTENSION: IMAGE
# BITPIX: -32
# NAXIS: 2
# NAXIS1: 433
# NAXIS2: 1
# RA: 230.14

Example of format 2:

# FILTER  = 'clear   '           / Filter
# EXPTIME =              600.003 / Total exposure time (sec); avg. of R&B
# OBJECT  = 'ZTF20abpuxna'       / User-specified object name
# TARGNAME= 'ZTF20abpuxna_S1'    / Target name (from starlist)
# DICHNAME= '560     '           / Dichroic
# GRISNAME= '400/3400'           / Blue grism
# GRANAME = '400/8500'           / Red grating
# WAVELEN =        7829.41406250 / Red specified central wavelength
# BLUFILT = 'clear   '           / Blue filter
# REDFILT = 'Clear   '           / Red filter
# SLITNAME= 'long_1.0'           / Slitmask
# INSTRUME= 'LRIS+LRISBLUE'      / Camera
# TELESCOP= 'Keck I  '           / Telescope name
# BLUDET  = 'LRISB   '           / LRIS blue detector
# REDDET  = 'LRISR3  '           / LRIS red detector
# OBSERVER= 'Andreoni Anand De'  / Observer name
# REDUCER = '        '           / Name of reducer
# LPIPEVER= '2020.06 '           / LPipe version number
# HOSTNAME= 'gayatri '           / LPipe host computer name
# IDLVER  = '8.1     '           / IDL version number
# DATE    = '2020-09-15T09:47:10' / UT end of last exposure

The data must be at least 2 column ascii (wavelength, flux). If three columns are given, they are interpreted as (wavelength, flux, fluxerr). If more than 3 columns are given, by default the first three are interpreted as (wavelength, flux, fluxerr). The column indices of each of these arguments can be controlled by passing the integer column index to the POST JSON.

Examples of valid data sections:

Many-column ASCII:

   10295.736  2.62912e-16  1.67798e-15  2.24407e-17    4084    75.956  5.48188e+15  0
   10296.924  2.96887e-16  1.57197e-15  2.21469e-17    4085    75.959  5.42569e+15  0
   10298.112  3.20429e-16  1.45017e-15  2.16863e-17    4086    75.962  5.36988e+15  0
   10299.301  3.33367e-16  1.06116e-15  1.94187e-17    4087    75.965  5.31392e+15  0
   10300.489  3.09943e-16  6.99539e-16  1.67183e-17    4088    75.968  5.25836e+15  0
   10301.678  3.48273e-16  5.56194e-16  1.59555e-17    4089    75.972  5.20314e+15  0
   10302.866  3.48102e-16  5.28483e-16  1.58033e-17    4090    75.975  5.15146e+15  0
   10304.055  3.78640e-16  6.00997e-16  1.67462e-17    4091    75.978  5.10058e+15  0
   10305.243  4.28820e-16  7.18759e-16  1.81534e-17    4092    75.981  5.05032e+15  0
   10306.432  4.13152e-16  7.54203e-16  1.83965e-17    4093    75.984  5.00097e+15  0

3-column ASCII:

8993.2 1.148e-16 7.919e-34
9018.7 1.068e-16 6.588e-34
9044.3 1.056e-16 5.660e-34
9069.9 9.763e-17 5.593e-34
9095.4 1.048e-16 8.374e-34
9121.0 1.026e-16 8.736e-34
9146.6 8.472e-17 9.505e-34
9172.1 9.323e-17 7.592e-34
9197.7 1.050e-16 7.863e-34
9223.3 8.701e-17 7.135e-34

2-column ASCII:

      10045.1    0.0217740
      10046.3    0.0182158
      10047.4    0.0204764
      10048.6    0.0231833
      10049.8    0.0207157
      10051.0    0.0185226
      10052.2    0.0200072
      10053.4    0.0205159
      10054.5    0.0199460
      10055.7    0.0210533

2-column ASCII:

7911.60 1.045683
7920.80 1.046414
7930.00 1.235362
7939.20 0.783466
7948.40 1.116153
7957.60 1.375844
7966.80 1.029127
7976.00 1.019637
7985.20 0.732859
7994.40 1.236514
instrument_id
required
integer

The ID of the instrument that took the spectrum.

observed_at
required
string <date-time>

The ISO UTC time the spectrum was taken.

Responses

200
400
post/api/spectrum/ascii
/api/spectrum/ascii

Request samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "flux_column": 1,
  • "obj_id": "string",
  • "filename": "string",
  • "group_ids":
    [
    ],
  • "wave_column": 0,
  • "followup_request_id": 0,
  • "assignment_id": 0,
  • "observed_by": [ ],
  • "fluxerr_column": null,
  • "reduced_by": [ ],
  • "ascii": "string",
  • "instrument_id": 0,
  • "observed_at": "2020-12-05T05:22:38Z"
}

Response samples

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

Grant stream access to a user

Grant stream access to a user

path Parameters
stream_id
required
integer
Request Body schema: application/json
user_id
required
integer

Responses

200
post/api/streams/stream_id/users/ignored_args
/api/streams/stream_id/users/ignored_args

Request samples

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

Response samples

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

Delete a stream user (revoke stream access for use

Delete a stream user (revoke stream access for user)

path Parameters
stream_id
required
integer
user_id
required
integer

Responses

200
delete/api/streams/stream_id/users/user_id
/api/streams/stream_id/users/user_id

Response samples

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

Retrieve a stream

Retrieve a stream

path Parameters
filter_id
required
integer

Responses

200
400
get/api/streams/stream_id
/api/streams/stream_id

Response samples

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

Delete a stream

Delete a stream

path Parameters
stream_id
required
integer

Responses

200
delete/api/streams/stream_id
/api/streams/stream_id

Response samples

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

Update a stream

Update a stream

path Parameters
stream_id
required
integer
Request Body schema: application/json
name
string
altdata
object

Responses

200
400
patch/api/streams/stream_id
/api/streams/stream_id

Request samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "name": "string",
  • "altdata": { }
}

Response samples

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

Retrieve all streams

Retrieve all streams

Responses

200
400
get/api/streams
/api/streams

Response samples

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

POST a new stream.

POST a new stream.

Request Body schema: application/json
name
required
string
altdata
object

Responses

200
post/api/streams
/api/streams

Request samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "name": "string",
  • "altdata": { }
}

Response samples

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

Retrieve system/deployment info

Retrieve system/deployment info

Responses

200
get/api/sysinfo
/api/sysinfo

Response samples

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

Retrieve a taxonomy

Retrieve a taxonomy

path Parameters
taxonomy_id
required
integer

Responses

200
400
get/api/taxonomy/taxonomy_id
/api/taxonomy/taxonomy_id

Response samples

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

Delete a taxonomy

Delete a taxonomy

path Parameters
taxonomy_id
required
integer

Responses

200
delete/api/taxonomy/taxonomy_id
/api/taxonomy/taxonomy_id

Response samples

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

Get all the taxonomies

Get all the taxonomies

Responses

200
400
get/api/taxonomy
/api/taxonomy

Response samples

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

Post new taxonomy

Post new taxonomy

Request Body schema: application/json
name
required
string

Short string to make this taxonomy memorable to end users.

hierarchy
required
object

Nested JSON describing the taxonomy which should be validated against a schema before entry

group_ids
Array of integers

List of group IDs corresponding to which groups should be able to view comment. Defaults to all of requesting user's groups.

version
required
string

Semantic version of this taxonomy name

provenance
string

Identifier (e.g., URL or git hash) that uniquely ties this taxonomy back to an origin or place of record

isLatest
boolean

Consider this version of the taxonomy with this name the latest? Defaults to True.

Responses

200
post/api/taxonomy
/api/taxonomy

Request samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "name": "string",
  • "hierarchy": { },
  • "group_ids":
    [
    ],
  • "version": "string",
  • "provenance": "string",
  • "isLatest": true
}

Response samples

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

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
telescope_id
required
integer
Request Body schema: application/json
name
required
string

Unabbreviated facility name (e.g., Palomar 200-inch Hale Telescope).

nickname
required
string

Abbreviated facility name (e.g., P200).

lat
number Nullable

Latitude in deg.

lon
number Nullable

Longitude in deg.

elevation
number Nullable

Elevation in meters.

diameter
required
number

Diameter in meters.

skycam_link
string Nullable

Link to the telescope's sky camera.

robotic
boolean

Is this telescope robotic?

fixed_location
boolean

Does this telescope have a fixed location (lon, lat, elev)?

weather
any Nullable

Latest weather information

weather_retrieved_at
string <date-time> Nullable

When was the weather last retrieved?

weather_link
string Nullable

Link to the preferred weather site.

Responses

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

Request samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "name": "string",
  • "nickname": "string",
  • "lat": 0,
  • "lon": 0,
  • "elevation": 0,
  • "diameter": 0,
  • "skycam_link": "string",
  • "robotic": true,
  • "fixed_location": true,
  • "weather": null,
  • "weather_retrieved_at": "2020-12-05T05:22:38Z",
  • "weather_link": "string"
}

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

Retrieve all telescopes

Retrieve all telescopes

query Parameters
name
string

Filter by name (exact match)

Responses

200
400
get/api/telescope
/api/telescope

Response samples

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

Create telescopes

Create telescopes

Request Body schema: application/json
name
required
string

Unabbreviated facility name (e.g., Palomar 200-inch Hale Telescope).

nickname
required
string

Abbreviated facility name (e.g., P200).

lat
number Nullable

Latitude in deg.

lon
number Nullable

Longitude in deg.

elevation
number Nullable

Elevation in meters.

diameter
required
number

Diameter in meters.

skycam_link
string Nullable

Link to the telescope's sky camera.

robotic
boolean

Is this telescope robotic?

fixed_location
boolean

Does this telescope have a fixed location (lon, lat, elev)?

weather
any Nullable

Latest weather information

weather_retrieved_at
string <date-time> Nullable

When was the weather last retrieved?

weather_link
string Nullable

Link to the preferred weather site.

Responses

200
400
post/api/telescope
/api/telescope

Request samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "name": "string",
  • "nickname": "string",
  • "lat": 0,
  • "lon": 0,
  • "elevation": 0,
  • "diameter": 0,
  • "skycam_link": "string",
  • "robotic": true,
  • "fixed_location": true,
  • "weather": null,
  • "weather_retrieved_at": "2020-12-05T05:22:38Z",
  • "weather_link": "string"
}

Response samples

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

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
thumbnail_id
required
integer
Request Body schema: application/json
type
string <= 6 characters Nullable
Enum: "new" "ref" "sub" "sdss" "dr8" "ps1" "new_gz" "ref_gz" "sub_gz"

Thumbnail type (e.g., ref, new, sub, dr8, ps1, ...)

file_uri
string Nullable

Path of the Thumbnail on the machine running SkyPortal.

public_url
string Nullable

Publically accessible URL of the thumbnail.

origin
string Nullable

Origin of the Thumbnail.

obj_id
required
string

ID of the thumbnail's obj.

Responses

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

Request samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "type": "new",
  • "file_uri": "string",
  • "public_url": "string",
  • "origin": "string",
  • "obj_id": "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
obj_id
string

ID of object associated with thumbnails.

data
required
string <byte>

base64-encoded PNG image file contents. Image size must be between 16px 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
{
  • "obj_id": "string",
  • "data": "string",
  • "ttype": "string"
}

Response samples

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

Grant new ACL(s) to a user

Grant new ACL(s) to a user

path Parameters
user_id
required
integer
Request Body schema: application/json
aclIds
required
Array of strings

Array of ACL IDs (strings) to be granted to user

Responses

200
post/api/user/user_id/acls/ignored_args
/api/user/user_id/acls/ignored_args

Request samples

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

Response samples

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

Remove ACL from user permissions

Remove ACL from user permissions

path Parameters
user_id
required
integer
acl_id
required
string

Responses

200
delete/api/user/user_id/acls/acl_id
/api/user/user_id/acls/acl_id

Response samples

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

Grant new Role(s) to a user

Grant new Role(s) to a user

path Parameters
user_id
required
integer
Request Body schema: application/json
roleIds
required
Array of strings

Array of Role IDs (strings) to be granted to user

Responses

200
post/api/user/user_id/roles/ignored_args
/api/user/user_id/roles/ignored_args

Request samples

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

Response samples

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

Delete user role

Delete user role

path Parameters
user_id
required
integer
role_id
required
string

Responses

200
delete/api/user/user_id/roles/role_id
/api/user/user_id/roles/role_id

Response samples

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

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 all users

Retrieve all users

query Parameters
numPerPage
integer

Number of candidates to return per paginated request. Defaults to all users

pageNumber
integer

Page number for paginated query results. Defaults to 1

firstName
string

Get users whose first name contains this string.

lastName
string

Get users whose last name contains this string.

username
string

Get users whose username contains this string.

email
string

Get users whose email contains this string.

role
string

Get users with the role.

acl
string

Get users with this ACL.

group
string

Get users part of the group with name given by this parameter.

stream
string

Get users with access to the stream with name given by this parameter.

Responses

200
400
get/api/user
/api/user

Response samples

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

Add a new user

Add a new user