SkyPortal (0.9.dev0+git20210723.7b695ad)

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

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-07-23T17:12:09Z",
  • "end_date": "2021-07-23T17:12:09Z",
  • "hours_allocated": 0,
  • "group_id": 0,
  • "instrument_id": 0,
  • "_altdata": "string"
}

Response samples

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

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

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

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-07-23T17:12:09Z",
  • "end_date": "2021-07-23T17:12:09Z",
  • "hours_allocated": 0,
  • "group_id": 0,
  • "instrument_id": 0,
  • "_altdata": "string"
}

Response samples

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

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

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

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

Post new target assignment to observing run

Post new target assignment to observing run

Request Body schema: application/json
status
string

The status of the request

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

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

comment
string

An optional comment describing the request.

obj_id
required
string

The ID of the object to observe.

run_id
required
integer

Responses

200
post/api/assignment
/api/assignment

Request samples

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

Response samples

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

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

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

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

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

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

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

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

comments

Retrieve a comment

Retrieve a comment

path Parameters
comment_id
required
integer
associated_resource_type
required
string

What underlying data the comment is on: an "object" (default), or a "spectrum".

Responses

200
400
get/api/comment
/api/comment

Response samples

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

Update a comment

Update a comment

path Parameters
comment_id
required
integer
associated_resource_type
required
string

What underlying data the comment is on: an "object" (default), or a "spectrum".

Request Body schema: application/json
text
required
string

Comment body.

attachment_name
string Nullable

Filename of the attachment.

attachment_bytes
string Nullable

Binary representation of the attachment.

origin
string Nullable

Comment origin.

bot
boolean

Boolean indicating whether comment was posted via a bot (token-based request).

author_id
required
integer

ID of the Comment author's User instance.

obj_id
required
string

ID of the Comment's Obj.

group_ids
Array of integers

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

Responses

200
400
put/api/comment
/api/comment

Request samples

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

Response samples

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

Post a comment

Post a comment

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

ID of spectrum that this comment should be attached to. Leave empty to post a comment on the object instead.

text
required
string
group_ids
Array of integers

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

attachment
object

Responses

200
post/api/comment
/api/comment

Request samples

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

Response samples

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

Delete a comment

Delete a comment

path Parameters
comment_id
required
integer
associated_resource_type
required
string

What underlying data the comment is on: an "object" (default), or a "spectrum".

Responses

200
delete/api/comment
/api/comment

Response samples

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

Download comment attachment

Download comment attachment

path Parameters
comment_id
required
integer
associated_resource_type
required
string

What underlying data the comment is on: an "object" (default), or a "spectrum".

query Parameters
download
boolean

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

Responses

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

Response samples

Content type
No sample

Download comment attachment

Download comment attachment

path Parameters
comment_id
required
integer
associated_resource_type
required
string

What underlying data the comment is on: an "object" (default), or a "spectrum".

query Parameters
download
boolean

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

Responses

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

Response samples

Content type
No sample

Retrieve a comment

Retrieve a comment

path Parameters
comment_id
required
integer
associated_resource_type
required
string

What underlying data the comment is on: an "object" (default), or a "spectrum".

Responses

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

Response samples

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

Update a comment

Update a comment

path Parameters
comment_id
required
integer
associated_resource_type
required
string

What underlying data the comment is on: an "object" (default), or a "spectrum".

Request Body schema: application/json
text
required
string

Comment body.

attachment_name
string Nullable

Filename of the attachment.

attachment_bytes
string Nullable

Binary representation of the attachment.

origin
string Nullable

Comment origin.

bot
boolean

Boolean indicating whether comment was posted via a bot (token-based request).

author_id
required
integer

ID of the Comment author's User instance.

obj_id
required
string

ID of the Comment's Obj.

group_ids
Array of integers

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

Responses

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

Request samples

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

Response samples

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

Delete a comment

Delete a comment

path Parameters
comment_id
required
integer
associated_resource_type
required
string

What underlying data the comment is on: an "object" (default), or a "spectrum".

Responses

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

Response samples

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

Post a comment

Post a comment

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

ID of spectrum that this comment should be attached to. Leave empty to post a comment on the object instead.

text
required
string
group_ids
Array of integers

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

attachment
object

Responses

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

Request samples

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

Response samples

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

annotations

Retrieve an annotation

Retrieve an annotation

path Parameters
annotation_id
required
integer

Responses

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

Response samples

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

Update an annotation

Update an annotation

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

Searchable data in JSON format

author_id
required
integer

ID of the Annotation author's User instance.

origin
required
string

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

obj_id
required
string

ID of the Annotation's Obj.

group_ids
Array of integers

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

Responses

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

Request samples

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

Response samples

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

Delete an annotation

Delete an annotation

path Parameters
annotation_id
required
integer

Responses

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

Response samples

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

Post an annotation

Post an annotation

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

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

data
required
object
group_ids
Array of integers

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

Responses

200
post/api/annotation
/api/annotation

Request samples

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

Response samples

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

Retrieve object's annotations

Retrieve object's annotations

path Parameters
obj_id
required
string

Responses

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

Response samples

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

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

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

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

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

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

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

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

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.

status
string
Default: "pending submission"

The status of the request.

allocation_id
required
integer

Followup request allocation ID.

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

Response samples

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

status
string
Default: "pending submission"

The status of the request.

allocation_id
required
integer

Followup request allocation ID.

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

Response samples

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

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

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
{
  • "lightcurve": "string",
  • "localizations":
    [
    ],
  • "dateobs": null,
  • "tags":
    [
    ],
  • "notices":
    [
    ]
}

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

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

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

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

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

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
{
  • "flat_2d":
    [
    ],
  • "contour": null,
  • "dateobs": "string",
  • "localization_name": "string"
}

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
{
  • "flat_2d":
    [
    ],
  • "contour": null,
  • "dateobs": "string",
  • "localization_name": "string"
}

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

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

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

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

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

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

Delete a group

Delete a group

path Parameters
group_id
required
integer

Responses

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

Response samples

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Update observing run

Update observing run

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

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

pi
string

The PI of the observing run.

group_id
integer

The ID of the group this run is associated with.

observers
string

The names of the observers

calendar_date
required
string <date>

The local calendar date of the run.

Responses

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

Request samples

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

Response samples

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

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

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

Add a new observing run

Add a new observing run

Request Body schema: application/json
instrument_id
required
integer

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

pi
string

The PI of the observing run.

group_id
integer

The ID of the group this run is associated with.

observers
string

The names of the observers

calendar_date
required
string <date>

The local calendar date of the run.

Responses

200
400
post/api/observing_run
/api/observing_run

Request samples

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

Response samples

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

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

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

Update photometry

Update photometry

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

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

instrument_id
required
integer

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

assignment_id
integer Nullable
Default: null

ID of the classical assignment which generated the photometry

limiting_mag
required
number

Limiting magnitude of the image in the magnitude system magsys.

dec
number Nullable
Default: null

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

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.

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].

obj_id
required
string

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

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

mag
number Nullable
Default: null

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

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.

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.

dec_unc
number Nullable
Default: null

Uncertainty on dec [arcsec].

mjd
required
number

MJD of the observation.

Responses

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

Request samples

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

Response samples

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

Update and/or upload photometry, resolving potenti

Update and/or upload photometry, resolving potential duplicates

Request Body schema: application/json
One of
  • PhotMagFlexible
  • PhotFluxFlexible
stream_ids
any
Default: []

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

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.

assignment_id
integer Nullable
Default: null

ID of the classical assignment which generated the photometry

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

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
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.

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.

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.

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.

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.

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

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.

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.

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.

Responses

200
put/api/photometry
/api/photometry

Request samples

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

Response samples

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

Upload photometry

Upload photometry

Request Body schema: application/json
One of
  • PhotMagFlexible
  • PhotFluxFlexible
stream_ids
any
Default: []

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

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.

assignment_id
integer Nullable
Default: null

ID of the classical assignment which generated the photometry

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

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
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.

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.

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.

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.

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.

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

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.

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.

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.

Responses

200
post/api/photometry
/api/photometry

Request samples

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

Response samples

Content type
application/json