SkyPortal (0.9.dev0+git20210514.97fbbd9)

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

Using query parameters

import requests

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

response = requests.get(
    'http://localhost:5000/api/candidates?numPerPage=100&pageNumber=1',
    headers={'Authorization': f'token {token}'}
)

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

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
{
  • "data":
    {
    },
  • "message": "string",
  • "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-05-14T18:53:26Z",
  • "end_date": "2021-05-14T18:53:26Z",
  • "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
{
  • "data":
    [
    ],
  • "message": "string",
  • "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-05-14T18:53:26Z",
  • "end_date": "2021-05-14T18:53:26Z",
  • "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
{
  • "data":
    {
    },
  • "message": "string",
  • "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
{
  • "data":
    [
    ],
  • "message": "string",
  • "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).

obj_id
required
string

The ID of the object to observe.

run_id
required
integer
comment
string

An optional comment describing the request.

Responses

200
post/api/assignment
/api/assignment

Request samples

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

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

redshiftRange
list

lowest and highest redshift to return, e.g. "(0,0.5)"

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.

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

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

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

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

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

Responses

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

Request samples

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

Response samples

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

Update a group user's admin status

Update a group user's admin status

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

Responses

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

Request samples

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

Response samples

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

Responses

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

Request samples

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

Response samples

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

Update a group user's admin status

Update a group user's admin status

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

Responses

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

Request samples

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

Response samples

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

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

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

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

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

groupIDs
required
Array of integers

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

groupAdmin
Array of booleans

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

Responses

200
post/api/invitations
/api/invitations

Request samples

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

Response samples

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

Responses

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

Request samples

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

Response samples

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

Update observing run

Update observing run

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

The PI of the observing run.

calendar_date
required
string <date>

The local calendar date of the run.

instrument_id
required
integer

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

observers
string

The names of the observers

group_id
integer

The ID of the group this run is associated with.

Responses

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

Request samples

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

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

Add a new observing run

Add a new observing run

Request Body schema: application/json
pi
string

The PI of the observing run.

calendar_date
required
string <date>

The local calendar date of the run.

instrument_id
required
integer

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

observers
string

The names of the observers

group_id
integer

The ID of the group this run is associated with.

Responses

200
400
post/api/observing_run
/api/observing_run

Request samples

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

Response samples

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

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

obj_id
required
string

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

mjd
required
number

MJD of the observation.

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

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

ra_unc
number Nullable
Default: null

Uncertainty on RA [arcsec].

dec_unc
number Nullable
Default: null

Uncertainty on dec [arcsec].

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.

mag
number Nullable
Default: null

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

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

assignment_id
integer Nullable
Default: null

ID of the classical assignment which generated the photometry

instrument_id
required
integer

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

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.

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

The bandpass of the observation.

Responses

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

Request samples

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

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
magsys
required
any

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

limiting_mag_nsigma
any
Default: 3

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

stream_ids
any
Default: []

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

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.

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.

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.

ra
any Nullable
Default: null

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

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

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.

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.

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.

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.

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.

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.

filter
required
any

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

Responses

200
put/api/photometry
/api/photometry

Request samples

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

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

limiting_mag_nsigma
any
Default: 3

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

stream_ids
any
Default: []

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

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.

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.

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.

ra
any Nullable
Default: null

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

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

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.

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.

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.

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.

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.

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.

filter
required
any

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

Responses

200
post/api/photometry
/api/photometry

Request samples

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

Response samples

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

Delete bulk-uploaded photometry set

Delete bulk-uploaded photometry set

path Parameters
upload_id
required
string

Responses

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

Response samples

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

Get photometry taken by specific instruments over

Get photometry taken by specific instruments over a date range

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

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

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

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

Request Body schema: application/json
max_date
string <date-time> Nullable
Default: null

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

instrument_ids
Array of integers Nullable
Default: null

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

min_date
string <date-time> Nullable
Default: null

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

Responses

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

Request samples

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

Response samples

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

Retrieve all photometry associated with an Object

Retrieve all photometry associated with an Object

path Parameters
obj_id
required
string

ID of the object to retrieve photometry for

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

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

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

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

Responses

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

Response samples

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

data_sharing

Share data with additional groups/users

Share data with additional groups/users

Request Body schema: application/json
photometryIDs
Array of integers

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

spectrumIDs
Array of integers

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

groupIDs
required
Array of integers

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

Responses

200
post/api/sharing
/api/sharing

Request samples

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

Response samples

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

roles

Retrieve list of all Role IDs (strings)

Retrieve list of all Role IDs (strings)

Responses

200
get/api/roles
/api/roles

Response samples

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

Grant new Role(s) to a user

Grant new Role(s) to a user

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

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

Responses

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

Request samples

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

Response samples

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

Delete user role

Delete user role

path Parameters
user_id
required
integer
role_id
required
string

Responses

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

Response samples

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

spectra

Retrieve all spectra associated with an Object

Retrieve all spectra associated with an Object

path Parameters
obj_id
required
string

ID of the object to retrieve spectra for

query Parameters
normalization
string

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

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

Responses

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

Response samples

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

Retrieve a spectrum

Retrieve a spectrum

path Parameters
spectrum_id
required
integer

Responses

200
400
get/api/spectrum/spectrum_id
/api/spectrum/spectrum_id

Response samples

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

Update spectrum

Update spectrum

path Parameters
spectrum_id
required
integer
Request Body schema: application/json
errors
Array of numbers

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

reduced_by
Array of integers
Default: []

IDs of the Users who reduced this Spectrum.

observed_by
Array of integers
Default: []

IDs of the Users who observed this Spectrum.

followup_request_id
integer

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

altdata
any

Miscellaneous alternative metadata.

obj_id
required
string

ID of this Spectrum's Obj.

observed_at
required