SkyPortal (0.9.dev0+git20211015.f83604a)

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

Request parameters

There are two ways to pass information along with a request: path and body parameters.

Path parameters

Path parameters (also called query or URL parameters) are embedded in the URL called. For example, you can specify numPerPage or pageNumber path parameters when calling /api/candidates as follows:

curl -s -H 'Authorization: token ea70a5f0-b321-43c6-96a1-b2de225e0339' \
     http://localhost:5000/api/candidates?numPerPage=100&pageNumber=1

When using Python's requests library, a dictionary of path parameters can be passed in via the params keyword argument:

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

response = requests.get(
    "http://localhost:5000/api/sources",
    params={"includeComments": True, "includeThumbnails": False},
    headers={'Authorization': f'token {token}'},
)

Body parameters

Request body parameters (or simply: the body of the request) contains data uploaded to a specific endpoint. These are the parameters listed under REQUEST BODY SCHEMA: application/json in the API docs.

When using Python's requests library, body parameters are specified using the json keyword argument:

token = "abc"
response = requests.post(
    "http://localhost:5000/api/sources",
    json={
        "id": "14gqr",
        "ra": 353.36647,
        "dec": 33.646149,
        "group_ids": [52, 97],
    },
    headers={"Authorization": f"token {token}"},
)

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

allocations

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

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.

_altdata
string Nullable

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": "2021-10-16T00:35:17Z",
  • "end_date": "2021-10-16T00:35:17Z",
  • "hours_allocated": 0,
  • "group_id": 0,
  • "instrument_id": 0,
  • "_altdata": "string"
}

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

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.

_altdata
string Nullable

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": "2021-10-16T00:35:17Z",
  • "end_date": "2021-10-16T00:35:17Z",
  • "hours_allocated": 0,
  • "group_id": 0,
  • "instrument_id": 0,
  • "_altdata": "string"
}

Response samples

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

assignments

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

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

Post new target assignment to observing run

Post new target assignment to observing run

Request Body schema: application/json
priority
required
any
Enum: "1" "2" "3" "4" "5"

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

status
string

The status of the request

obj_id
required
string

The ID of the object to observe.

comment
string

An optional comment describing the request.

run_id
required
integer

Responses

200
post/api/assignment
/api/assignment

Request samples

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

Response samples

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

candidates

Retrieve a candidate

Retrieve a candidate

path Parameters
obj_id
required
string
query Parameters
includeComments
boolean

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

Responses

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

Response samples

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

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

Delete candidate(s)

Delete candidate(s)

path Parameters
obj_id
required
string
filter_id
required
integer

Responses

200
delete/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. Capped at 500.

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.

savedStatus
string
Enum: "all" "savedToAllSelected" "savedToAnySelected" "savedToAnyAccessible" "notSavedToAnyAccessible" "notSavedToAnySelected" "notSavedToAllSelected"

String indicating the saved status to filter candidate results for. Must be one of the enumerated values.

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.

annotationExcludeOrigin
string

Only load objects that do not have annotations from this origin. If the annotationsExcludeOutdatedDate is also given, then annotations with this origin will still be loaded if they were modified before that date.

annotationExcludeOutdatedDate
string

An Arrow parseable string designating when an existing annotation is outdated. Only relevant if giving the annotationExcludeOrigin argument. Will treat objects with outdated annotations as if they did not have that annotation, so it will load an object if it doesn't have an annotation with the origin specified or if it does have it but the annotation modified date < annotationsExcludeOutdatedDate

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.

includeSpectra
boolean

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

includeComments
boolean

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

classifications
Array of strings

Comma-separated string of classification(s) to filter for candidates matching that/those classification(s).

minRedshift
number

If provided, return only candidates with a redshift of at least this value

maxRedshift
number

If provided, return only candidates with a redshift of at most this value

listName
string

Get only candidates saved to the querying user's list, e.g., "favorites".

listNameReject
string

Get only candidates that ARE NOT saved to the querying user's list, e.g., "rejected_candidates".

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_error
number Nullable

Redshift error.

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.

alias
any Nullable

Alternative names for this object.

detect_photometry_count
integer Nullable

How many times the object was detected above :math:S/N = phot_detection_threshold (3.0 by default).

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_error": 0,
  • "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",
  • "alias": null,
  • "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":
    {
    }
}

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_error
number Nullable

Redshift error.

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.

alias
any Nullable

Alternative names for this object.

detect_photometry_count
integer Nullable

How many times the object was detected above :math:S/N = phot_detection_threshold (3.0 by default).

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_error": 0,
  • "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",
  • "alias": null,
  • "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 candidate(s)

Delete candidate(s)

path Parameters
obj_id
required
string
filter_id
required
integer

Responses

200
delete/api/candidates/obj_id/filter_id
/api/candidates/obj_id/filter_id

Response samples

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

classifications

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

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 an object's classifications

Retrieve an object's classifications

path Parameters
obj_id
required
string

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

facility

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

filters

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

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

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

followup_requests

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

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

Submit follow-up request.

Submit follow-up request.

Request Body schema: application/json
target_group_ids
Array of integers

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

allocation_id
required
integer

Followup request allocation ID.

status
string
Default: "pending submission"

The status of the request.

obj_id
required
string

ID of the target Obj.

payload
any

Content of the followup request.

Responses

200
post/api/followup_request
/api/followup_request

Request samples

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

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
target_group_ids
Array of integers

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

allocation_id
required
integer

Followup request allocation ID.

status
string
Default: "pending submission"

The status of the request.

obj_id
required
string

ID of the target Obj.

payload
any

Content of the followup 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
{
  • "target_group_ids":
    [
    ],
  • "allocation_id": 0,
  • "status": "pending submission",
  • "obj_id": "string",
  • "payload": null
}

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

gcnevents

Retrieve GCN events

Retrieve GCN events

Responses

200
400
get/api/gcn_event/dateobs
/api/gcn_event/dateobs

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "dateobs": null,
  • "notices":
    [
    ],
  • "tags":
    [
    ],
  • "localizations":
    [
    ],
  • "lightcurve": "string"
}

Delete a GCN event

Delete a GCN event

path Parameters
dateobs
required
dateobs

Responses

200
400
delete/api/gcn_event/dateobs
/api/gcn_event/dateobs

Response samples

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

Ingest GCN xml file

Ingest GCN xml file

Request Body schema: application/json
xml
string

VOEvent XML content.

Responses

200
400
post/api/gcn_event
/api/gcn_event

Request samples

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

Response samples

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

gcntags

Ingest GCN xml file

Ingest GCN xml file

Request Body schema: application/json
xml
string

VOEvent XML content.

Responses

200
400
post/api/gcn_event
/api/gcn_event

Request samples

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

Response samples

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

gcnnotices

Ingest GCN xml file

Ingest GCN xml file

Request Body schema: application/json
xml
string

VOEvent XML content.

Responses

200
400
post/api/gcn_event
/api/gcn_event

Request samples

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

Response samples

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

localizations

Ingest GCN xml file

Ingest GCN xml file

Request Body schema: application/json
xml
string

VOEvent XML content.

Responses

200
400
post/api/gcn_event
/api/gcn_event

Request samples

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

Response samples

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

Retrieve a GCN localization

Retrieve a GCN localization

path Parameters
dateobs
required
dateobs
localization_name
required
localization_name

Responses

200
400
get/api/localization/dateobs/name/localization_name
/api/localization/dateobs/name/localization_name

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "contour": null,
  • "localization_name": "string",
  • "dateobs": "string",
  • "flat_2d":
    [
    ]
}

Delete a GCN localization

Delete a GCN localization

path Parameters
dateobs
required
dateobs
localization_name
required
localization_name

Responses

200
400
delete/api/localization/dateobs/name/localization_name
/api/localization/dateobs/name/localization_name

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "contour": null,
  • "localization_name": "string",
  • "dateobs": "string",
  • "flat_2d":
    [
    ]
}

groups

Retrieve the public group

Retrieve 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",
  • "data":
    {
    }
}

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
canSave
boolean

Boolean indicating whether user can save sources to group. Defaults to true.

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,
  • "canSave": true
}

Response samples

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

Update a group user's admin or save access status

Update a group user's admin or save access status

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

Boolean indicating whether user is group admin. Either this or canSave must be provided in request body.

canSave
boolean

Boolean indicating whether user can save sources to group. Either this or admin must be provided in request body.

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,
  • "canSave": 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
query Parameters
includeGroupUsers
boolean

Boolean indicating whether to include group users. Defaults to true.

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.

private
boolean

Boolean indicating whether group is invisible to non-members.

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",
  • "private": true,
  • "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.

private
boolean

Boolean indicating whether group is invisible to non-members.

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",
  • "private": true,
  • "single_user_group": true,
  • "group_admins":
    [
    ]
}

Response samples

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

Retrieve a group admission request

Retrieve a group admission request

path Parameters
admission_request_id
required
integer

Responses

200
400
get/api/group_admission_requests/admission_request_id
/api/group_admission_requests/admission_request_id

Response samples

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

Delete a group admission request

Delete a group admission request

path Parameters
admission_request_id
required
integer

Responses

200
delete/api/group_admission_requests/admission_request_id
/api/group_admission_requests/admission_request_id

Response samples

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

Update a group admission request's status

Update a group admission request's status

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

One of either 'accepted', 'declined', or 'pending'.

Responses

200
patch/api/group_admission_requests/admission_request_id
/api/group_admission_requests/admission_request_id

Request samples

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

Response samples

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

Retrieve all group admission requests

Retrieve all group admission requests

query Parameters
groupID
integer

ID of group for which admission requests are desired

Responses

200
400
get/api/group_admission_requests
/api/group_admission_requests

Response samples

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

Create a new group admission request

Create a new group admission request

Request Body schema: application/json
groupID
required
integer
userID
required
integer

Responses

200
post/api/group_admission_requests
/api/group_admission_requests

Request samples

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

Response samples

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

Retrieve basic info on Groups that an Obj is saved

Retrieve basic info on Groups that an Obj is saved to

path Parameters
obj_id
required
integer

Responses

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

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

streams

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

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

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

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

users

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
canSave
boolean

Boolean indicating whether user can save sources to group. Defaults to true.

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,
  • "canSave": true
}

Response samples

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

Update a group user's admin or save access status

Update a group user's admin or save access status

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

Boolean indicating whether user is group admin. Either this or canSave must be provided in request body.

canSave
boolean

Boolean indicating whether user can save sources to group. Either this or admin must be provided in request body.

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,
  • "canSave": 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 admission request

Retrieve a group admission request

path Parameters
admission_request_id
required
integer

Responses

200
400
get/api/group_admission_requests/admission_request_id
/api/group_admission_requests/admission_request_id

Response samples

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

Delete a group admission request

Delete a group admission request

path Parameters
admission_request_id
required
integer

Responses

200
delete/api/group_admission_requests/admission_request_id
/api/group_admission_requests/admission_request_id

Response samples

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

Update a group admission request's status

Update a group admission request's status

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

One of either 'accepted', 'declined', or 'pending'.

Responses

200
patch/api/group_admission_requests/admission_request_id
/api/group_admission_requests/admission_request_id

Request samples

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

Response samples

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

Retrieve all group admission requests

Retrieve all group admission requests

query Parameters
groupID
integer

ID of group for which admission requests are desired

Responses

200
400
get/api/group_admission_requests
/api/group_admission_requests

Response samples

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

Create a new group admission request

Create a new group admission request

Request Body schema: application/json
groupID
required
integer
userID
required
integer

Responses

200
post/api/group_admission_requests
/api/group_admission_requests

Request samples

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

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 user

Retrieve a user

path Parameters
user_id
required
integer

Responses

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

Response samples

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

Delete a user

Delete a user

path Parameters
user_id
required
integer

Responses

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

Response samples

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

Update a User record

Update a User record

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

Arrow-parseable date string (e.g. 2020-01-01). Set a user's expiration date, after which the user's account will be deactivated and will be unable to access the application.

Responses

200
patch/api/user/user_id
/api/user/user_id

Request samples

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

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

Request Body schema: application/json
username
required
string
first_name
string
last_name
string
contact_email
string
oauth_uid
string
contact_phone
string
roles
Array of strings

List of user roles. Defaults to [Full user]. Will be overridden by groupIDsAndAdmin on a per-group basis.

groupIDsAndAdmin
Array of arrays

Array of 2-element arrays [groupID, admin] where groupID is the ID of a group that the new user will be added to and admin is a boolean indicating whether they will be an admin in that group, e.g. [[group_id_1, true], [group_id_2, false]]

Responses

200
post/api/user
/api/user

Request samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "username": "string",
  • "first_name": "string",
  • "last_name": "string",
  • "contact_email": "string",
  • "oauth_uid": "string",
  • "contact_phone": "string",
  • "roles":
    [
    ],
  • "groupIDsAndAdmin":
    [
    ]
}

Response samples

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

listings

Retrieve sources from a user's lists

Retrieve sources from a user's lists

path Parameters
user_id
required
any
query Parameters
listName
any

name of the list to retrieve objects from. If not given will return all objects saved by the user to all lists.

Responses

200
get/api/listing/user_id
/api/listing/user_id

Add a listing.

Add a listing.

Request Body schema: application/json
user_id
integer

ID of user that you want to add the listing to. If not given, will default to the associated user object that is posting.

obj_id
string
list_name
string

Listing name for this item, e.g., "favorites". Multiple objects can be saved by the same user to different lists, where the list names are user-defined. List name must be a non-empty string starting with an alphanumeric character or underscore. (it must match the regex: /^\w+/)

Responses

200
post/api/listing
/api/listing

Request samples

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

Response samples

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

Remove an existing listing

Remove an existing listing

path Parameters
listing_id
required
integer

ID of the listing object. If not given, must supply the listing's obj_id and list_name (and user_id) to find the correct listing id from that info.

Request Body schema: application/json
user_id
integer

ID of user that you want to add the listing to. If not given, will default to the associated user object that is posting.

obj_id
string
list_name
string

Listing name for this item, e.g., "favorites".

Responses

200
delete/api/listing/listing_id
/api/listing/listing_id

Request samples

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

Response samples

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

Update an existing listing

Update an existing listing

path Parameters
listing_id
required
integer
Request Body schema: application/json
user_id
integer
obj_id
string
list_name
string

Listing name for this item, e.g., "favorites". Multiple objects can be saved by the same user to different lists, where the list names are user-defined. List name must be a non-empty string starting with an alphanumeric character or underscore. (it must match the regex: /^\w+/)

Responses

200
patch/api/listing/listing_id
/api/listing/listing_id

Request samples

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

Response samples

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

group_admission_requests

Retrieve a group admission request

Retrieve a group admission request

path Parameters
admission_request_id
required
integer

Responses

200
400
get/api/group_admission_requests/admission_request_id
/api/group_admission_requests/admission_request_id

Response samples

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

Delete a group admission request

Delete a group admission request

path Parameters
admission_request_id
required
integer

Responses

200
delete/api/group_admission_requests/admission_request_id
/api/group_admission_requests/admission_request_id

Response samples

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

Update a group admission request's status

Update a group admission request's status

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

One of either 'accepted', 'declined', or 'pending'.

Responses

200
patch/api/group_admission_requests/admission_request_id
/api/group_admission_requests/admission_request_id

Request samples

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

Response samples

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

Retrieve all group admission requests

Retrieve all group admission requests

query Parameters
groupID
integer

ID of group for which admission requests are desired

Responses

200
400
get/api/group_admission_requests
/api/group_admission_requests

Response samples

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

Create a new group admission request

Create a new group admission request

Request Body schema: application/json
groupID
required
integer
userID
required
integer

Responses

200
post/api/group_admission_requests
/api/group_admission_requests

Request samples

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

Response samples

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

instruments

Retrieve an instrument

Retrieve an instrument

path Parameters
instrument_id
required
integer

Responses

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

Response samples

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

Update instrument

Update instrument

path Parameters
instrument_id
required
integer
Request Body schema: application/json
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 <= 11 characters Nullable
Enum: "SEDMAPI" "IOOAPI" "IOIAPI" "SPRATAPI" "SINISTROAPI" "SPECTRALAPI" "FLOYDSAPI" "MUSCATAPI" "ZTFAPI"

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

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 <= 11 characters Nullable
Enum: "SEDMAPI" "IOOAPI" "IOIAPI" "SPRATAPI" "SINISTROAPI" "SPECTRALAPI" "FLOYDSAPI" "MUSCATAPI" "ZTFAPI"

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

invitations

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
role
string

The role the new user will have in the system. If provided, must be one of either "Full user" or "View only". Defaults to "Full user".

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). Defaults to all false.

canSave
Array of booleans

List of booleans indicating whether user should be able to save sources to respective specified group(s). Defaults to all true.

userExpirationDate
string

Arrow-parseable date string (e.g. 2020-01-01). Set a user's expiration date, after which the user's account will be deactivated and will be unable to access the application.

Responses

200
post/api/invitations
/api/invitations

Request samples

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

Response samples

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

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
role
string
userExpirationDate
string

Arrow-parseable date string (e.g. 2020-01-01). Set a user's expiration date, after which the user's account will be deactivated and will be unable to access the application.

Responses

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

Request samples

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

Response samples

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

news_feed

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":
    [
    ]
}

observing_runs

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

Update observing run

Update observing run

path Parameters
run_id
required
integer
Request Body schema: application/json
calendar_date
required
string <date>

The local calendar date of the run.

group_id
integer

The ID of the group this run is associated with.

pi
string

The PI of the observing run.

instrument_id
required
integer

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

observers
string

The names of the observers

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
{
  • "calendar_date": "2021-10-16",
  • "group_id": 0,
  • "pi": "string",
  • "instrument_id": 0,
  • "observers": "string"
}

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

Add a new observing run

Add a new observing run

Request Body schema: application/json
calendar_date
required
string <date>

The local calendar date of the run.

group_id
integer

The ID of the group this run is associated with.

pi
string

The PI of the observing run.

instrument_id
required
integer

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

observers
string

The names of the observers

Responses

200
400
post/api/observing_run
/api/observing_run

Request samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "calendar_date": "2021-10-16",
  • "group_id": 0,
  • "pi": "string",
  • "instrument_id": 0,
  • "observers": "string"
}

Response samples

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

objs

Delete an Obj

Delete an Obj

path Parameters
obj_id
required
string

Responses

200
400
delete/api/objs/obj_id
/api/objs/obj_id

Response samples

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

photometry

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

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
assignment_id
integer Nullable
Default: null

ID of the classical assignment which generated the photometry

ra
number Nullable
Default: null

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

dec
number Nullable
Default: null

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

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.

mjd
required
number

MJD of the observation.

limiting_mag
required
number

Limiting magnitude of the image in the magnitude system magsys.

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.

dec_unc
number Nullable
Default: null

Uncertainty on dec [arcsec].

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.

obj_id
required
string

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

instrument_id
required
integer

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

origin
any Nullable
Default: null

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

ra_unc
number Nullable
Default: null

Uncertainty on RA [arcsec].

mag
number Nullable
Default: null

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

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

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

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)'}

Responses

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

Request samples

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

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
assignment_id
integer Nullable
Default: null

ID of the classical assignment which generated the photometry

limiting_mag_nsigma
any
Default: 3

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

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.

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.

stream_ids
any
Default: []

List of stream IDs to which photometry points will be visible.

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

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.

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.

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.

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.

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.

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.

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 or streams list will be updated (other data assumed identical). Defaults to None.

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.

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.

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

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)'}. Can be a list of dicts or a single dict which will be broadcast to all values.

Responses

200
put/api/photometry
/api/photometry

Request samples

Content type
application/json
Example
Copy
Expand all Collapse all
{
  • "assignment_id": null,
  • "limiting_mag_nsigma": 3,
  • "ra": null,
  • "dec": null,
  • "stream_ids": [ ],
  • "filter": null,
  • "mjd": null,
  • "limiting_mag": null,
  • "dec_unc": null,
  • "magerr": null,
  • "obj_id": null,
  • "instrument_id": null,
  • "group_ids": [ ],
  • "origin": null,
  • "ra_unc": null,
  • "mag": null,
  • "magsys": null,
  • "altdata": 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
assignment_id
integer Nullable
Default: null

ID of the classical assignment which generated the photometry

limiting_mag_nsigma
any
Default: 3

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

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.

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.

stream_ids
any
Default: []

List of stream IDs to which photometry points will be visible.

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

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.

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.

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.

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.

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.

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.

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 or streams list will be updated (other data assumed identical). Defaults to None.

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.

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.

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

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)'}. Can be a list of dicts or a single dict which will be broadcast to all values.

Responses

200
post/api/photometry
/api/photometry

Request samples

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

Response samples

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

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
max_date
string <date-time> Nullable
Default: null

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

instrument_ids
Array of integers Nullable
Default: null

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

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
{
  • "max_date": null,
  • "instrument_ids": null,
  • "min_date": null
}

Response samples

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

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

data_sharing

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

roles

Retrieve list of all Role IDs (strings)

Retrieve list of all Role IDs (strings)

Responses

200
get/api/roles
/api/roles

Response samples

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

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

spectra

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

Retrieve all comments associated with specified re

Retrieve all comments associated with specified resource

path Parameters
associated_resource_type
required
string
Value: "sources"

What underlying data the comment is on, e.g., "sources" or "spectra".

resource_id
required
string

The ID of the underlying data. This would be a string for a source ID or an integer for other data types like spectrum.

Responses

200
400
get/api/associated_resource_type/resource_id/comments
/api/associated_resource_type/resource_id/comments

Response samples

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

Retrieve all annotations associated with specified

Retrieve all annotations associated with specified resource

path Parameters
associated_resource_type
required
string
Enum: "sources" "spectra"

What underlying data the annotation is on: must be one of either "sources" or "spectra".

resource_id
required
string

The ID of the underlying data. This would be a string for a source ID or an integer for other data types like spectra.

Responses

200
400
get/api/associated_resource_type/resource_id
/api/associated_resource_type/resource_id

Response samples

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

Retrieve a comment

Retrieve a comment

path Parameters
associated_resource_type
required
string

What underlying data the comment is on: "sources" or "spectra".

resource_id
required
string
Enum: "sources" "spectra"

The ID of the source or spectrum that the comment is posted to. This would be a string for a source ID or an integer for a spectrum.

comment_id
required
integer

Responses

200
400
get/api/associated_resource_type/resource_id/comments/comment_id
/api/associated_resource_type/resource_id/comments/comment_id

Response samples

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

Retrieve all annotations associated with specified

Retrieve all annotations associated with specified resource

path Parameters
associated_resource_type
required
string
Enum: "sources" "spectra"

What underlying data the annotation is on: must be one of either "sources" or "spectra".

resource_id
required
string

The ID of the underlying data. This would be a string for a source ID or an integer for other data types like spectra.

Responses

200
400
get/api/associated_resource_type/resource_id/annotations
/api/associated_resource_type/resource_id/annotations

Response samples

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

Retrieve an annotation

Retrieve an annotation

path Parameters
associated_resource_type
required
string
Enum: "sources" "spectra"

What underlying data the annotation is on: must be one of either "sources" or "spectra".

resource_id
required
string

The ID of the underlying data. This would be a string for a source ID or an integer for other data types like spectra.

annotation_id
required
integer

Responses

200
400
get/api/associated_resource_type/resource_id/annotations/annotation_id
/api/associated_resource_type/resource_id/annotations/annotation_id

Response samples

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