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
.
Once you have a token, you may access SkyPortal programmatically as follows.
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()}')
curl -s -H 'Authorization: token ea70a5f0-b321-43c6-96a1-b2de225e0339' http://localhost:5000/api/sysinfo
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"
}
Retrieve an allocation
allocation_id required | integer |
{- "message": "string",
- "status": "success",
- "data": {
- "id": 0,
- "pi": "string",
- "proposal_id": "string",
- "start_date": "2021-03-02T22:22:48Z",
- "end_date": "2021-03-02T22:22:48Z",
- "hours_allocated": 0,
- "group_id": 0,
- "instrument_id": 0,
- "_altdata": "string"
}
}
Update an allocation on a robotic instrument
allocation_id required | integer |
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 |
{- "pi": "string",
- "proposal_id": "string",
- "start_date": "2021-03-02T22:22:48Z",
- "end_date": "2021-03-02T22:22:48Z",
- "hours_allocated": 0,
- "group_id": 0,
- "instrument_id": 0,
- "_altdata": "string"
}
{- "message": "string",
- "status": "success"
}
Retrieve all allocations
instrument_id | number Instrument ID to retrieve allocations for |
{- "message": "string",
- "status": "success",
- "data": [
- {
- "id": 0,
- "pi": "string",
- "proposal_id": "string",
- "start_date": "2021-03-02T22:22:48Z",
- "end_date": "2021-03-02T22:22:48Z",
- "hours_allocated": 0,
- "group_id": 0,
- "instrument_id": 0,
- "_altdata": "string"
}
]
}
Post new allocation on a robotic instrument
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 |
{- "pi": "string",
- "proposal_id": "string",
- "start_date": "2021-03-02T22:22:48Z",
- "end_date": "2021-03-02T22:22:48Z",
- "hours_allocated": 0,
- "group_id": 0,
- "instrument_id": 0,
- "_altdata": "string"
}
{- "message": "string",
- "status": "success",
- "data": {
- "id": 0
}
}
Retrieve an observing run assignment
assignment_id required | integer |
{- "message": "string",
- "status": "success",
- "data": {
- "id": 0,
- "requester_id": 0,
- "last_modified_by_id": 0,
- "obj_id": "string",
- "comment": "string",
- "status": "string",
- "priority": "1",
- "run_id": 0
}
}
Update an assignment
assignment_id required | integer |
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. |
{- "requester_id": 0,
- "obj_id": "string",
- "comment": "string",
- "status": "string",
- "priority": "1",
- "run_id": 0
}
{- "message": "string",
- "status": "success"
}
{- "message": "string",
- "status": "success",
- "data": [
- {
- "id": 0,
- "requester_id": 0,
- "last_modified_by_id": 0,
- "obj_id": "string",
- "comment": "string",
- "status": "string",
- "priority": "1",
- "run_id": 0
}
]
}
Post new target assignment to observing run
status | string The status of the request |
comment | string An optional comment describing the request. |
run_id required | integer |
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. |
{- "status": "string",
- "comment": "string",
- "run_id": 0,
- "priority": "1",
- "obj_id": "string"
}
{- "message": "string",
- "status": "success",
- "data": {
- "id": 0
}
}
{- "message": "string",
- "status": "success",
- "data": {
- "ra": 0,
- "dec": 0,
- "id": "string",
- "ra_dis": 0,
- "dec_dis": 0,
- "ra_err": 0,
- "dec_err": 0,
- "offset": 0,
- "redshift": 0,
- "redshift_history": null,
- "altdata": null,
- "dist_nearest_source": 0,
- "mag_nearest_source": 0,
- "e_mag_nearest_source": 0,
- "transient": true,
- "varstar": true,
- "is_roid": true,
- "score": 0,
- "origin": "string",
- "internal_key": "string",
- "detect_photometry_count": 0
}
}
Retrieve all candidates
numPerPage | integer Number of candidates to return per paginated request. Defaults to 25 |
pageNumber | integer Page number for paginated query results. Defaults to 1 |
totalMatches | integer Used only in the case of paginating query results - if provided, this allows for avoiding a potentially expensive query.count() call. |
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. |
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)" |
{- "message": "string",
- "status": "success",
- "data": {
- "candidates": [
- {
- "ra": 0,
- "dec": 0,
- "id": "string",
- "ra_dis": 0,
- "dec_dis": 0,
- "ra_err": 0,
- "dec_err": 0,
- "offset": 0,
- "redshift": 0,
- "redshift_history": null,
- "altdata": null,
- "dist_nearest_source": 0,
- "mag_nearest_source": 0,
- "e_mag_nearest_source": 0,
- "transient": true,
- "varstar": true,
- "is_roid": true,
- "score": 0,
- "origin": "string",
- "internal_key": "string",
- "detect_photometry_count": 0,
- "is_source": true
}
], - "totalMatches": 0,
- "pageNumber": 0,
- "numPerPage": 0
}
}
Create new candidate(s) (one per filter).
ra | number Nullable |
dec | number Nullable |
id required | string Name of the object. |
ra_dis | number Nullable J2000 Right Ascension at discovery time [deg]. |
dec_dis | number Nullable J2000 Declination at discovery time [deg]. |
ra_err | number Nullable Error on J2000 Right Ascension at discovery time [deg]. |
dec_err | number Nullable Error on J2000 Declination at discovery time [deg]. |
offset | number Nullable Offset from nearest static object [arcsec]. |
redshift | number Nullable Redshift. |
redshift_history | any Nullable Record of who set which redshift values and when. |
altdata | any Nullable Misc. alternative metadata stored in JSON format, e.g. |
dist_nearest_source | number Nullable Distance to the nearest Obj [arcsec]. |
mag_nearest_source | number Nullable Magnitude of the nearest Obj [AB]. |
e_mag_nearest_source | number Nullable Error on magnitude of the nearest Obj [mag]. |
transient | boolean Nullable Boolean indicating whether the object is an astrophysical transient. |
varstar | boolean Nullable Boolean indicating whether the object is a variable star. |
is_roid | boolean Nullable Boolean indicating whether the object is a moving object. |
score | number Nullable Machine learning score. |
origin | string Nullable Origin of the object. |
internal_key | string Internal key used for secure websocket messaging. |
detect_photometry_count | integer Nullable How many times the object was detected above :math: |
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. |
{- "ra": 0,
- "dec": 0,
- "id": "string",
- "ra_dis": 0,
- "dec_dis": 0,
- "ra_err": 0,
- "dec_err": 0,
- "offset": 0,
- "redshift": 0,
- "redshift_history": null,
- "altdata": null,
- "dist_nearest_source": 0,
- "mag_nearest_source": 0,
- "e_mag_nearest_source": 0,
- "transient": true,
- "varstar": true,
- "is_roid": true,
- "score": 0,
- "origin": "string",
- "internal_key": "string",
- "detect_photometry_count": 0,
- "filter_ids": [
- 0
], - "passing_alert_id": 0,
- "passed_at": "string"
}
{- "message": "string",
- "status": "success",
- "data": {
- "ids": [
- 0
]
}
}
Retrieve a classification
classification_id required | integer |
{- "message": "string",
- "status": "success",
- "data": {
- "id": 0,
- "classification": "string",
- "taxonomy_id": 0,
- "probability": 0,
- "author_id": 0,
- "author_name": "string",
- "obj_id": "string"
}
}
Update a classification
classification required | integer |
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. |
{- "classification": "string",
- "taxonomy_id": 0,
- "probability": 0,
- "author_id": 0,
- "author_name": "string",
- "obj_id": "string",
- "group_ids": [
- 0
]
}
{- "message": "string",
- "status": "success"
}
Delete a classification
classification_id required | integer |
{- "message": "string",
- "status": "success"
}
Post a classification
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. |
{- "obj_id": "string",
- "classification": "string",
- "taxonomy_id": 0,
- "probability": null,
- "group_ids": [
- 0
]
}
{- "message": "string",
- "status": "success",
- "data": {
- "classification_id": 0
}
}
Retrieve an object's classifications
obj_id required | string |
{- "message": "string",
- "status": "success",
- "data": [
- {
- "id": 0,
- "classification": "string",
- "taxonomy_id": 0,
- "probability": 0,
- "author_id": 0,
- "author_name": "string",
- "obj_id": "string"
}
]
}
{- "message": "string",
- "status": "success",
- "data": {
- "id": 0,
- "text": "string",
- "ctype": "text",
- "attachment_name": "string",
- "attachment_bytes": "string",
- "origin": "string",
- "author_id": 0,
- "obj_id": "string"
}
}
Update a comment
comment_id required | integer |
text required | string Comment body. |
ctype | string <= 8 characters Nullable Enum: "text" "redshift" Comment type. Can be one of 'text' or 'redshift'. |
attachment_name | string Nullable Filename of the attachment. |
attachment_bytes | string Nullable Binary representation of the attachment. |
origin | string Nullable Comment origin. |
author_id required | integer ID of the Comment author's User instance. |
obj_id required | string ID of the Comment's Obj. |
group_ids | Array of integers List of group IDs corresponding to which groups should be able to view comment. |
{- "text": "string",
- "ctype": "text",
- "attachment_name": "string",
- "attachment_bytes": "string",
- "origin": "string",
- "author_id": 0,
- "obj_id": "string",
- "group_ids": [
- 0
]
}
{- "message": "string",
- "status": "success"
}
Post a comment
obj_id required | string |
text required | string |
group_ids | Array of integers List of group IDs corresponding to which groups should be able to view comment. Defaults to all of requesting user's groups. |
attachment | object |
{- "obj_id": "string",
- "text": "string",
- "group_ids": [
- 0
], - "attachment": {
- "body": "string",
- "name": "string"
}
}
{- "message": "string",
- "status": "success",
- "data": {
- "comment_id": 0
}
}
Download comment attachment
comment_id required | integer |
download | boolean If true, download the attachment; else return file data as text. True by default. |
Download comment attachment
comment_id required | integer |
download | boolean If true, download the attachment; else return file data as text. True by default. |
Retrieve an annotation
annotation_id required | integer |
{- "message": "string",
- "status": "success",
- "data": {
- "id": 0,
- "data": null,
- "author_id": 0,
- "origin": "string",
- "obj_id": "string"
}
}
Update an annotation
annotation_id required | integer |
data | any Nullable Searchable data in JSON format |
author_id required | integer ID of the Annotation author's User instance. |
origin required | string What generated the annotation. This should generally map to a filter/group name. But since an annotation can be made accessible to multiple groups, the origin name does not necessarily have to map to a single group name. The important thing is to make the origin distinct and descriptive such that annotations from the same origin generally have the same metrics. One annotation with multiple fields from each origin is allowed. |
obj_id required | string ID of the Annotation's Obj. |
group_ids | Array of integers List of group IDs corresponding to which groups should be able to view the annotation. |
{- "data": null,
- "author_id": 0,
- "origin": "string",
- "obj_id": "string",
- "group_ids": [
- 0
]
}
{- "message": "string",
- "status": "success"
}
Post an annotation
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. |
{- "obj_id": "string",
- "origin": "string",
- "data": { },
- "group_ids": [
- 0
]
}
{- "message": "string",
- "status": "success",
- "data": {
- "annotation_id": 0
}
}
Retrieve object's annotations
obj_id required | string |
{- "message": "string",
- "status": "success",
- "data": [
- {
- "id": 0,
- "data": null,
- "author_id": 0,
- "origin": "string",
- "obj_id": "string"
}
]
}
Post a message from a remote facility
new_status required | string |
followup_request_id required | integer |
{- "new_status": "string",
- "followup_request_id": 0
}
{- "message": "string",
- "status": "success"
}
{- "message": "string",
- "status": "success",
- "data": {
- "id": 0,
- "name": "string",
- "stream_id": 0,
- "group_id": 0
}
}
Update filter name
filter_id required | integer |
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. |
{- "name": "string",
- "stream_id": 0,
- "group_id": 0
}
{- "message": "string",
- "status": "success"
}
POST a new filter.
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. |
{- "name": "string",
- "stream_id": 0,
- "group_id": 0
}
{- "message": "string",
- "status": "success",
- "data": {
- "id": 0
}
}
Retrieve a followup request
followup_request_id required | integer |
{- "message": "string",
- "status": "success",
- "data": {
- "id": 0,
- "requester_id": 0,
- "last_modified_by_id": 0,
- "obj_id": "string",
- "payload": null,
- "status": "string",
- "allocation_id": 0
}
}
{- "message": "string",
- "status": "success",
- "data": [
- {
- "id": 0,
- "requester_id": 0,
- "last_modified_by_id": 0,
- "obj_id": "string",
- "payload": null,
- "status": "string",
- "allocation_id": 0
}
]
}
Submit follow-up request.
status | string Default: "pending submission" The status of the request. |
obj_id required | string ID of the target Obj. |
allocation_id required | integer Followup request allocation ID. |
payload | any Content of the followup request. |
target_group_ids | Array of integers IDs of groups to share the results of the followup request with. |
{- "status": "pending submission",
- "obj_id": "string",
- "allocation_id": 0,
- "payload": null,
- "target_group_ids": [
- 0
]
}
{- "message": "string",
- "status": "success",
- "data": {
- "id": 0
}
}
Update a follow-up request
request_id required | string |
status | string Default: "pending submission" The status of the request. |
obj_id required | string ID of the target Obj. |
allocation_id required | integer Followup request allocation ID. |
payload | any Content of the followup request. |
target_group_ids | Array of integers IDs of groups to share the results of the followup request with. |
{- "status": "pending submission",
- "obj_id": "string",
- "allocation_id": 0,
- "payload": null,
- "target_group_ids": [
- 0
]
}
{- "message": "string",
- "status": "success"
}
{- "message": "string",
- "status": "success",
- "data": {
- "id": 0,
- "name": "string",
- "nickname": "string",
- "private": true,
- "single_user_group": true
}
}
Add alert stream access to group
group_id required | integer |
stream_id required | integer |
{- "stream_id": 0
}
{- "message": "string",
- "status": "success",
- "data": {
- "group_id": 0,
- "stream_id": 0
}
}
Delete an alert stream from group
group_id required | integer |
stream_id required | integer |
{- "message": "string",
- "status": "success"
}
Add a group user
group_id required | integer |
userID required | integer |
admin required | boolean |
{- "userID": 0,
- "admin": true
}
{- "message": "string",
- "status": "success",
- "data": {
- "group_id": 0,
- "user_id": 0,
- "admin": true
}
}
Update a group user's admin status
group_id required | integer |
userID required | integer |
admin required | boolean |
{- "userID": 0,
- "admin": true
}
{- "message": "string",
- "status": "success"
}
Delete a group user
group_id required | integer |
user_id required | integer |
{- "message": "string",
- "status": "success"
}
Add users from other group(s) to specified group
group_id required | integer |
fromGroupIDs required | boolean |
{- "fromGroupIDs": true
}
{- "message": "string",
- "status": "success"
}
Retrieve a group
group_id required | integer |
includeGroupUsers | boolean Boolean indicating whether to include group users. Defaults to true. |
{- "message": "string",
- "status": "success",
- "data": {
- "id": 0,
- "name": "string",
- "nickname": "string",
- "private": true,
- "single_user_group": true,
- "users": [
- {
- "id": 0,
- "username": "string",
- "first_name": "string",
- "last_name": "string",
- "contact_email": "string",
- "contact_phone": "string",
- "oauth_uid": "string",
- "preferences": null
}
]
}
}
Update a group
group_id required | integer |
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. |
{- "name": "string",
- "nickname": "string",
- "private": true,
- "single_user_group": true
}
{- "message": "string",
- "status": "success"
}
Retrieve all groups
name | string Fetch by name (exact match) |
includeSingleUserGroups | boolean Bool indicating whether to include single user groups. Defaults to false. |
{- "message": "string",
- "status": "success",
- "data": {
- "user_groups": [
- {
- "id": 0,
- "name": "string",
- "nickname": "string",
- "private": true,
- "single_user_group": true
}
], - "user_accessible_groups": [
- {
- "id": 0,
- "name": "string",
- "nickname": "string",
- "private": true,
- "single_user_group": true
}
], - "all_groups": [
- {
- "id": 0,
- "name": "string",
- "nickname": "string",
- "private": true,
- "single_user_group": true
}
]
}
}
Create a new group
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. |
{- "name": "string",
- "nickname": "string",
- "private": true,
- "single_user_group": true,
- "group_admins": [
- 0
]
}
{- "message": "string",
- "status": "success",
- "data": {
- "id": 0
}
}
Retrieve a group admission request
admission_request_id required | integer |
{- "message": "string",
- "status": "success",
- "data": {
- "id": 0,
- "user_id": 0,
- "group_id": 0,
- "status": "pending"
}
}
Delete a group admission request
admission_request_id required | integer |
{- "message": "string",
- "status": "success"
}
Update a group admission request's status
admission_request_id required | integer |
status required | string One of either 'accepted', 'declined', or 'pending'. |
{- "status": "string"
}
{- "message": "string",
- "status": "success"
}
Retrieve all group admission requests
groupID | integer ID of group for which admission requests are desired |
{- "message": "string",
- "status": "success",
- "data": [
- {
- "id": 0,
- "user_id": 0,
- "group_id": 0,
- "status": "pending"
}
]
}
Create a new group admission request
groupID required | integer |
userID required | integer |
{- "groupID": 0,
- "userID": 0
}
{- "message": "string",
- "status": "success",
- "data": {
- "id": 0
}
}
Retrieve basic info on Groups that an Obj is saved to
obj_id required | integer |
{- "message": "string",
- "status": "success",
- "data": [
- {
- "id": 0,
- "name": "string",
- "nickname": "string",
- "private": true,
- "single_user_group": true
}
]
}
Save or request group(s) to save source, and optionally unsave from group(s).
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. |
{- "objId": "string",
- "inviteGroupIds": [
- 0
], - "unsaveGroupIds": [
- 0
]
}
{- "message": "string",
- "status": "success"
}
Update a Source table row
obj_id required | integer |
groupID required | integer |
active required | boolean |
requested required | boolean |
{- "groupID": 0,
- "active": true,
- "requested": true
}
{- "message": "string",
- "status": "success"
}
Add alert stream access to group
group_id required | integer |
stream_id required | integer |
{- "stream_id": 0
}
{- "message": "string",
- "status": "success",
- "data": {
- "group_id": 0,
- "stream_id": 0
}
}
Delete an alert stream from group
group_id required | integer |
stream_id required | integer |
{- "message": "string",
- "status": "success"
}
Grant stream access to a user
stream_id required | integer |
user_id required | integer |
{- "user_id": 0
}
{- "message": "string",
- "status": "success",
- "data": {
- "stream_id": 0,
- "user_id": 0
}
}
Delete a stream user (revoke stream access for user)
stream_id required | integer |
user_id required | integer |
{- "message": "string",
- "status": "success"
}
{- "message": "string",
- "status": "success",
- "data": {
- "id": 0,
- "name": "string",
- "altdata": null
}
}
Update a stream
stream_id required | integer |
name | string |
altdata | object |
{- "name": "string",
- "altdata": { }
}
{- "message": "string",
- "status": "success"
}
POST a new stream.
name required | string |
altdata | object |
{- "name": "string",
- "altdata": { }
}
{- "message": "string",
- "status": "success",
- "data": {
- "id": 0
}
}
Add a group user
group_id required | integer |
userID required | integer |
admin required | boolean |
{- "userID": 0,
- "admin": true
}
{- "message": "string",
- "status": "success",
- "data": {
- "group_id": 0,
- "user_id": 0,
- "admin": true
}
}
Update a group user's admin status
group_id required | integer |
userID required | integer |
admin required | boolean |
{- "userID": 0,
- "admin": true
}
{- "message": "string",
- "status": "success"
}
Delete a group user
group_id required | integer |
user_id required | integer |
{- "message": "string",
- "status": "success"
}
Add users from other group(s) to specified group
group_id required | integer |
fromGroupIDs required | boolean |
{- "fromGroupIDs": true
}
{- "message": "string",
- "status": "success"
}
Retrieve a group admission request
admission_request_id required | integer |
{- "message": "string",
- "status": "success",
- "data": {
- "id": 0,
- "user_id": 0,
- "group_id": 0,
- "status": "pending"
}
}
Delete a group admission request
admission_request_id required | integer |
{- "message": "string",
- "status": "success"
}
Update a group admission request's status
admission_request_id required | integer |
status required | string One of either 'accepted', 'declined', or 'pending'. |
{- "status": "string"
}
{- "message": "string",
- "status": "success"
}
Retrieve all group admission requests
groupID | integer ID of group for which admission requests are desired |
{- "message": "string",
- "status": "success",
- "data": [
- {
- "id": 0,
- "user_id": 0,
- "group_id": 0,
- "status": "pending"
}
]
}
Create a new group admission request
groupID required | integer |
userID required | integer |
{- "groupID": 0,
- "userID": 0
}
{- "message": "string",
- "status": "success",
- "data": {
- "id": 0
}
}
Grant stream access to a user
stream_id required | integer |
user_id required | integer |
{- "user_id": 0
}
{- "message": "string",
- "status": "success",
- "data": {
- "stream_id": 0,
- "user_id": 0
}
}
Delete a stream user (revoke stream access for user)
stream_id required | integer |
user_id required | integer |
{- "message": "string",
- "status": "success"
}
{- "message": "string",
- "status": "success",
- "data": {
- "id": 0,
- "username": "string",
- "first_name": "string",
- "last_name": "string",
- "contact_email": "string",
- "contact_phone": "string",
- "oauth_uid": "string",
- "preferences": null
}
}
Retrieve all users
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. |
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. |
{- "message": "string",
- "status": "success",
- "data": {
- "users": [
- {
- "id": 0,
- "username": "string",
- "first_name": "string",
- "last_name": "string",
- "contact_email": "string",
- "contact_phone": "string",
- "oauth_uid": "string",
- "preferences": null
}
], - "totalMatches": 0
}
}
Add a new user
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 |
groupIDsAndAdmin | Array of arrays Array of 2-element arrays |
{- "username": "string",
- "first_name": "string",
- "last_name": "string",
- "contact_email": "string",
- "oauth_uid": "string",
- "contact_phone": "string",
- "roles": [
- "string"
], - "groupIDsAndAdmin": [
- [ ]
]
}
{- "message": "string",
- "status": "success",
- "data": {
- "id": 0
}
}
Retrieve sources from a user's lists
user_id required | any |
listName | any name of the list to retrieve objects from. If not given will return all objects saved by the user to all lists. |
Add a listing.
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+/) |
{- "user_id": 0,
- "obj_id": "string",
- "list_name": "string"
}
{- "message": "string",
- "status": "success",
- "data": {
- "id": 0
}
}
Remove an existing listing
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. |
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". |
{- "user_id": 0,
- "obj_id": "string",
- "list_name": "string"
}
{- "message": "string",
- "status": "success"
}
Update an existing listing
listing_id required | integer |
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+/) |
{- "user_id": 0,
- "obj_id": "string",
- "list_name": "string"
}
{- "message": "string",
- "status": "success"
}
Retrieve a group admission request
admission_request_id required | integer |
{- "message": "string",
- "status": "success",
- "data": {
- "id": 0,
- "user_id": 0,
- "group_id": 0,
- "status": "pending"
}
}
Delete a group admission request
admission_request_id required | integer |
{- "message": "string",
- "status": "success"
}
Update a group admission request's status
admission_request_id required | integer |
status required | string One of either 'accepted', 'declined', or 'pending'. |
{- "status": "string"
}
{- "message": "string",
- "status": "success"
}
Retrieve all group admission requests
groupID | integer ID of group for which admission requests are desired |
{- "message": "string",
- "status": "success",
- "data": [
- {
- "id": 0,
- "user_id": 0,
- "group_id": 0,
- "status": "pending"
}
]
}
Create a new group admission request
groupID required | integer |
userID required | integer |
{- "groupID": 0,
- "userID": 0
}
{- "message": "string",
- "status": "success",
- "data": {
- "id": 0
}
}
Retrieve an instrument
instrument_id required | integer |
{- "message": "string",
- "status": "success",
- "data": {
- "id": 0,
- "name": "string",
- "type": "imager",
- "band": "string",
- "telescope_id": 0,
- "filters": [
- null
], - "api_classname": "SEDMAPI",
- "listener_classname": "SEDMListener"
}
}
Update instrument
instrument_id required | integer |
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 <= 8 characters Nullable Enum: "SEDMAPI" "IOOAPI" "IOIAPI" "SPRATAPI" Name of the instrument's API class. |
listener_classname | string <= 12 characters Nullable Value: "SEDMListener" Name of the instrument's listener class. |
{- "name": "string",
- "type": "imager",
- "band": "string",
- "telescope_id": 0,
- "filters": [
- null
], - "api_classname": "SEDMAPI",
- "listener_classname": "SEDMListener"
}
{- "message": "string",
- "status": "success"
}
Retrieve all instruments
name | string Filter by name (exact match) |
{- "message": "string",
- "status": "success",
- "data": [
- {
- "id": 0,
- "name": "string",
- "type": "imager",
- "band": "string",
- "telescope_id": 0,
- "filters": [
- null
], - "api_classname": "SEDMAPI",
- "listener_classname": "SEDMListener"
}
]
}
Add a new instrument
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 <= 8 characters Nullable Enum: "SEDMAPI" "IOOAPI" "IOIAPI" "SPRATAPI" Name of the instrument's API class. |
listener_classname | string <= 12 characters Nullable Value: "SEDMListener" Name of the instrument's listener class. |
{- "name": "string",
- "type": "imager",
- "band": "string",
- "telescope_id": 0,
- "filters": [
- null
], - "api_classname": "SEDMAPI",
- "listener_classname": "SEDMListener"
}
{- "message": "string",
- "status": "success",
- "data": {
- "id": 0
}
}
Retrieve invitations
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 |
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. |
{- "message": "string",
- "status": "success",
- "data": {
- "invitations": [
- {
- "id": 0,
- "token": "string",
- "admin_for_groups": [
- true
], - "user_email": "string",
- "used": true
}
], - "totalMatches": 0
}
}
Invite a new user
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 required | Array of integers List of IDs of groups invited user will be added to. If |
groupAdmin | Array of booleans List of booleans indicating whether user should be granted admin status for respective specified group(s). |
{- "userEmail": "string",
- "streamIDs": [
- 0
], - "groupIDs": [
- 0
], - "groupAdmin": [
- true
]
}
{- "message": "string",
- "status": "success"
}
Update a pending invitation
groupIDs | Array of integers |
streamIDs | Array of integers |
{- "groupIDs": [
- 0
], - "streamIDs": [
- 0
]
}
{- "message": "string",
- "status": "success"
}
{- "message": "string",
- "status": "success",
- "data": [
- {
- "type": "string",
- "time": "string",
- "message": "string"
}
]
}
Retrieve an observing run
run_id required | integer |
{- "message": "string",
- "status": "success",
- "data": {
- "instrument": null,
- "ephemeris": null,
- "owner_id": 0,
- "calendar_date": "2021-03-02",
- "instrument_id": 0,
- "group_id": 0,
- "id": 0,
- "assignments": [
- null
], - "observers": "string",
- "pi": "string"
}
}
Update observing run
run_id required | integer |
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. |
group_id | integer The ID of the group this run is associated with. |
observers | string The names of the observers |
pi | string The PI of the observing run. |
{- "calendar_date": "2021-03-02",
- "instrument_id": 0,
- "group_id": 0,
- "observers": "string",
- "pi": "string"
}
{- "message": "string",
- "status": "success"
}
{- "message": "string",
- "status": "success",
- "data": [
- {
- "id": 0,
- "instrument_id": 0,
- "pi": "string",
- "observers": "string",
- "group_id": 0,
- "owner_id": 0,
- "calendar_date": "2021-03-02"
}
]
}
Add a new 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. |
group_id | integer The ID of the group this run is associated with. |
observers | string The names of the observers |
pi | string The PI of the observing run. |
{- "calendar_date": "2021-03-02",
- "instrument_id": 0,
- "group_id": 0,
- "observers": "string",
- "pi": "string"
}
{- "message": "string",
- "status": "success",
- "data": {
- "id": 0
}
}
Retrieve photometry
photometry_id required | integer |
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) |
{- "message": "string",
- "status": "success",
- "data": {
- "ra": null,
- "filter": "bessellux",
- "assignment_id": null,
- "dec_unc": null,
- "ra_unc": null,
- "fluxerr": 0,
- "mjd": 0,
- "flux": null,
- "zp": 0,
- "dec": null,
- "altdata": null,
- "alert_id": null,
- "magsys": "jla1",
- "obj_id": "string",
- "instrument_id": 0
}
}
Update photometry
photometry_id required | integer |
ra | number Nullable Default: null ICRS Right Ascension of the centroid of the photometric aperture [deg]. |
filter required | any Enum: "bessellux" "bessellb" "bessellv" "bessellr" "besselli" "standard::u" "standard::b" "standard::v" "standard::r" "standard::i" "desg" "desr" "desi" "desz" "desy" "sdssu" "sdssg" "sdssr" "sdssi" "sdssz" "f435w" "f475w" "f555w" "f606w" "f625w" "f775w" "f850lp" "nicf110w" "nicf160w" "f098m" "f105w" "f110w" "f125w" "f127m" "f139m" "f140w" "f153m" "f160w" "f218w" "f225w" "f275w" "f300x" "f336w" "f350lp" "f390w" "f689m" "f763m" "f845m" "f438w" "uvf475w" "uvf555w" "uvf606w" "uvf625w" "uvf775w" "uvf814w" "uvf850lp" "kepler" "cspb" "csphs" "csphd" "cspjs" "cspjd" "cspv3009" "cspv3014" "cspv9844" "cspys" "cspyd" "cspg" "cspi" "cspk" "cspr" "cspu" "f070w" "f090w" "f115w" "f150w" "f200w" "f277w" "f356w" "f444w" "f140m" "f162m" "f182m" "f210m" "f250m" "f300m" "f335m" "f360m" "f410m" "f430m" "f460m" "f480m" "f560w" "f770w" "f1000w" "f1130w" "f1280w" "f1500w" "f1800w" "f2100w" "f2550w" "f1065c" "f1140c" "f1550c" "f2300c" "lsstu" "lsstg" "lsstr" "lssti" "lsstz" "lssty" "keplercam::us" "keplercam::b" "keplercam::v" "keplercam::r" "keplercam::i" "4shooter2::us" "4shooter2::b" "4shooter2::v" "4shooter2::r" "4shooter2::i" "ztfg" "ztfr" "ztfi" "uvot::b" "uvot::u" "uvot::uvm2" "uvot::uvw1" "uvot::uvw2" "uvot::v" "uvot::white" The bandpass of the observation. |
assignment_id | integer Nullable Default: null ID of the classical assignment which generated the photometry |
dec_unc | number Nullable Default: null Uncertainty on dec [arcsec]. |
ra_unc | number Nullable Default: null Uncertainty on RA [arcsec]. |
mag | number Nullable Default: null Magnitude of the observation in the magnitude system |
mjd required | number MJD of the observation. |
limiting_mag required | number Limiting magnitude of the image in the magnitude system |
magerr | number Nullable Default: null Magnitude error of the observation in the magnitude system |
dec | number Nullable Default: null ICRS Declination of the centroid of the photometric aperture [deg]. |
altdata | object Nullable Default: null Misc. alternative metadata stored in JSON format, e.g. |
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. |
magsys required | any Enum: "jla1" "ab" "vega" "bd17" "csp" "ab-b12" The magnitude system to which the flux and the zeropoint are tied. |
obj_id required | string ID of the Object to which the photometry will be attached. |
instrument_id required | integer ID of the instrument with which the observation was carried out. |
{- "ra": null,
- "filter": "bessellux",
- "assignment_id": null,
- "dec_unc": null,
- "ra_unc": null,
- "mag": null,
- "mjd": 0,
- "limiting_mag": 0,
- "magerr": null,
- "dec": null,
- "altdata": null,
- "alert_id": null,
- "magsys": "jla1",
- "obj_id": "string",
- "instrument_id": 0
}
{- "message": "string",
- "status": "success"
}
Update and/or upload photometry, resolving potential duplicates
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. |
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: |
assignment_id | integer Nullable Default: null ID of the classical assignment which generated the photometry |
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. |
mag | any Nullable Default: null Magnitude of the observation in the magnitude system |
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. |
origin | any Nullable Default: null Provenance of the Photometry. If a record is already present with identical origin, only the groups list will be updated (other data assumed identical). Defaults to None. |
mjd required | any MJD of the observation(s). Can be a given as a scalar or a 1D list. If a scalar, will be broadcast to all values given as lists. Null values not allowed. |
limiting_mag required | any Limiting magnitude of the image in the magnitude system |
magerr | any Nullable Default: null Magnitude of the observation in the magnitude system |
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). |
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. |
altdata | any Nullable Default: null Misc. alternative metadata stored in JSON format, e.g. |
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: |
obj_id required | any ID of the |
instrument_id required | any ID of the |
{- "ra": null,
- "filter": null,
- "assignment_id": null,
- "dec_unc": null,
- "ra_unc": null,
- "mag": null,
- "limiting_mag_nsigma": 3,
- "origin": null,
- "mjd": null,
- "limiting_mag": null,
- "magerr": null,
- "group_ids": [ ],
- "dec": null,
- "altdata": null,
- "magsys": null,
- "obj_id": null,
- "instrument_id": null
}
{- "message": "string",
- "status": "success",
- "data": {
- "ids": [
- 0
], - "upload_id": "string"
}
}
Upload photometry
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. |
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: |
assignment_id | integer Nullable Default: null ID of the classical assignment which generated the photometry |
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. |
mag | any Nullable Default: null Magnitude of the observation in the magnitude system |
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. |
origin | any Nullable Default: null Provenance of the Photometry. If a record is already present with identical origin, only the groups list will be updated (other data assumed identical). Defaults to None. |
mjd required | any MJD of the observation(s). Can be a given as a scalar or a 1D list. If a scalar, will be broadcast to all values given as lists. Null values not allowed. |
limiting_mag required | any Limiting magnitude of the image in the magnitude system |
magerr | any Nullable Default: null Magnitude of the observation in the magnitude system |
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). |
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. |
altdata | any Nullable Default: null Misc. alternative metadata stored in JSON format, e.g. |
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: |
obj_id required | any ID of the |
instrument_id required | any ID of the |
{- "ra": null,
- "filter": null,
- "assignment_id": null,
- "dec_unc": null,
- "ra_unc": null,
- "mag": null,
- "limiting_mag_nsigma": 3,
- "origin": null,
- "mjd": null,
- "limiting_mag": null,
- "magerr": null,
- "group_ids": [ ],
- "dec": null,
- "altdata": null,
- "magsys": null,
- "obj_id": null,
- "instrument_id": null
}
{- "message": "string",
- "status": "success",
- "data": {
- "ids": [
- 0
], - "upload_id": "string"
}
}
Delete bulk-uploaded photometry set
upload_id required | string |
{- "message": "string",
- "status": "success"
}
Get photometry taken by specific instruments over a date range
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) |
min_date | string <date-time> Nullable Default: null Query for photometry taken after this UT |
max_date | string <date-time> Nullable Default: null Query for photometry taken before this UT |
instrument_ids | Array of integers Nullable Default: null IDs of the instruments to query for photometry from. If |
{- "min_date": null,
- "max_date": null,
- "instrument_ids": null
}
{- "message": "string",
- "status": "success",
- "data": [
- {
- "ra": null,
- "filter": "bessellux",
- "assignment_id": null,
- "dec_unc": null,
- "ra_unc": null,
- "fluxerr": 0,
- "mjd": 0,
- "flux": null,
- "zp": 0,
- "dec": null,
- "altdata": null,
- "alert_id": null,
- "magsys": "jla1",
- "obj_id": "string",
- "instrument_id": 0
}
]
}
Retrieve all photometry associated with an Object
obj_id required | string ID of the object to retrieve photometry for |
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) |
{- "message": "string",
- "status": "success",
- "data": [
- {
- "ra": null,
- "filter": "bessellux",
- "assignment_id": null,
- "dec_unc": null,
- "ra_unc": null,
- "fluxerr": 0,
- "mjd": 0,
- "flux": null,
- "zp": 0,
- "dec": null,
- "altdata": null,
- "alert_id": null,
- "magsys": "jla1",
- "obj_id": "string",
- "instrument_id": 0
}
]
}
Share data with additional groups/users
photometryIDs | Array of integers IDs of the photometry data to be shared. If |
spectrumIDs | Array of integers IDs of the spectra to be shared. If |
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. |
{- "photometryIDs": [
- 0
], - "spectrumIDs": [
- 0
], - "groupIDs": [
- 0
]
}
{- "message": "string",
- "status": "success"
}
Grant new Role(s) to a user
user_id required | integer |
roleIds required | Array of strings Array of Role IDs (strings) to be granted to user |
{- "roleIds": [
- "string"
]
}
{- "message": "string",
- "status": "success"
}
Retrieve all spectra associated with an Object
obj_id required | string ID of the object to retrieve spectra for |
normalization | string what normalization is needed for the spectra (e.g., "median"). If omitted, returns the original spectrum. Options for normalization are:
|
{- "message": "string",
- "status": "success",
- "data": {
- "obj_id": "string",
- "spectra": [
- {
- "id": 0,
- "wavelengths": [
- 0
], - "fluxes": [
- 0
], - "errors": [
- 0
], - "obj_id": "string",
- "observed_at": "2021-03-02T22:22:49Z",
- "origin": "string",
- "instrument_id": 0,
- "followup_request_id": 0,
- "assignment_id": 0,
- "altdata": null,
- "original_file_string": "string",
- "original_file_filename": "string",
- "owner_id": 0
}
]
}
}
Retrieve a spectrum
spectrum_id required | integer |
{- "message": "string",
- "status": "success",
- "data": {
- "id": 0,
- "wavelengths": [
- 0
], - "fluxes": [
- 0
], - "errors": [
- 0
], - "obj_id": "string",
- "observed_at": "2021-03-02T22:22:49Z",
- "origin": "string",
- "instrument_id": 0,
- "followup_request_id": 0,
- "assignment_id": 0,
- "altdata": null,
- "original_file_string": "string",
- "original_file_filename": "string",
- "owner_id": 0
}
}
Update spectrum
spectrum_id required | integer |
followup_request_id | integer ID of the Followup request that generated this spectrum, if any. |
wavelengths required | Array of numbers Wavelengths of the spectrum [Angstrom]. |
fluxes required | Array of numbers Flux of the Spectrum [F_lambda, arbitrary units]. |
reduced_by | Array of integers Default: [] IDs of the Users who reduced this Spectrum. |
assignment_id | integer ID of the classical assignment that generated this spectrum, if any. |
observed_at required | string <date-time> The ISO UTC time the spectrum was taken. |
origin | string Origin of the spectrum. |
group_ids | any Default: [] IDs of the Groups to share this spectrum with. Set to "all" to make this spectrum visible to all users. |
altdata | any Miscellaneous alternative metadata. |
errors | Array of numbers Errors on the fluxes of the spectrum [F_lambda, same units as |
obj_id required | string ID of this Spectrum's Obj. |
instrument_id required | integer ID of the Instrument that acquired the Spectrum. |
observed_by | Array of integers Default: [] IDs of the Users who observed this Spectrum. |
{- "followup_request_id": 0,
- "wavelengths": [
- 0
], - "fluxes": [
- 0
], - "reduced_by": [ ],
- "assignment_id": 0,
- "observed_at": "2021-03-02T22:22:49Z",
- "origin": "string",
- "group_ids": [ ],
- "altdata": null,
- "errors": [
- 0
], - "obj_id": "string",
- "instrument_id": 0,
- "observed_by": [ ]
}
{- "message": "string",
- "status": "success"
}
Upload spectrum
followup_request_id | integer ID of the Followup request that generated this spectrum, if any. |
wavelengths required | Array of numbers Wavelengths of the spectrum [Angstrom]. |
fluxes required | Array of numbers Flux of the Spectrum [F_lambda, arbitrary units]. |
reduced_by | Array of integers Default: [] IDs of the Users who reduced this Spectrum. |
assignment_id | integer ID of the classical assignment that generated this spectrum, if any. |
observed_at required | string <date-time> The ISO UTC time the spectrum was taken. |
origin | string Origin of the spectrum. |
group_ids | any Default: [] IDs of the Groups to share this spectrum with. Set to "all" to make this spectrum visible to all users. |
altdata | any Miscellaneous alternative metadata. |
errors | Array of numbers Errors on the fluxes of the spectrum [F_lambda, same units as |
obj_id required | string ID of this Spectrum's Obj. |
instrument_id required | integer ID of the Instrument that acquired the Spectrum. |
observed_by | Array of integers Default: [] IDs of the Users who observed this Spectrum. |
{- "followup_request_id": 0,
- "wavelengths": [
- 0
], - "fluxes": [
- 0
], - "reduced_by": [ ],
- "assignment_id": 0,
- "observed_at": "2021-03-02T22:22:49Z",
- "origin": "string",
- "group_ids": [ ],
- "altdata": null,
- "errors": [
- 0
], - "obj_id": "string",
- "instrument_id": 0,
- "observed_by": [ ]
}
{- "message": "string",
- "status": "success",
- "data": {
- "id": 0
}
}
Parse spectrum from ASCII file
wave_column | integer Default: 0 The 0-based index of the ASCII column corresponding to the wavelength values of the spectrum (default 0). |
flux_column | integer Default: 1 The 0-based index of the ASCII column corresponding to the flux values of the spectrum (default 1). |
fluxerr_column | integer Nullable Default: null The 0-based index of the ASCII column corresponding to the flux error values of the spectrum (default 2). If there are only 2 columns in the input file this value will be ignored. If there are more than 2 columns in the input file, but none of them correspond to flux error values, set this parameter to |
ascii required | string The content of the ASCII file to be parsed. The file can optionally contain a header which will be parsed and stored. The lines that make up the ASCII header must appear at the beginning of the file and all be formatted the same way within a single file. They can be formatted in one of two ways.
Example of format 1:
Example of format 2:
The data must be at least 2 column ascii (wavelength, flux). If three columns are given, they are interpreted as (wavelength, flux, fluxerr). If more than 3 columns are given, by default the first three are interpreted as (wavelength, flux, fluxerr). The column indices of each of these arguments can be controlled by passing the integer column index to the POST JSON. Examples of valid data sections: Many-column ASCII:
3-column ASCII:
2-column ASCII:
2-column ASCII:
|
{- "wave_column": 0,
- "flux_column": 1,
- "fluxerr_column": null,
- "ascii": "string"
}
{- "wavelengths": [
- 0
], - "fluxes": [
- 0
], - "errors": [
- 0
], - "obj_id": "string",
- "observed_at": "2021-03-02T22:22:49Z",
- "origin": "string",
- "instrument_id": 0,
- "followup_request_id": 0,
- "assignment_id": 0,
- "altdata": null,
- "original_file_string": "string",
- "original_file_filename": "string"
}
Upload spectrum from ASCII file
filename required | string The original filename (for bookkeeping purposes). |
followup_request_id | integer ID of the Followup request that generated this spectrum, if any. |
flux_column | integer Default: 1 The 0-based index of the ASCII column corresponding to the flux values of the spectrum (default 1). |
reduced_by | Array of integers Default: [] IDs of the Users who reduced this Spectrum. |
assignment_id | integer ID of the classical assignment that generated this spectrum, if any. |
observed_at required | string <date-time> The ISO UTC time the spectrum was taken. |
fluxerr_column | integer Nullable Default: null The 0-based index of the ASCII column corresponding to the flux error values of the spectrum (default 2). If there are only 2 columns in the input file this value will be ignored. If there are more than 2 columns in the input file, but none of them correspond to flux error values, set this parameter to |
wave_column | integer Default: 0 The 0-based index of the ASCII column corresponding to the wavelength values of the spectrum (default 0). |
group_ids | Array of integers The IDs of the groups to share this spectrum with. |
ascii required | string The content of the ASCII file to be parsed. The file can optionally contain a header which will be parsed and stored. The lines that make up the ASCII header must appear at the beginning of the file and all be formatted the same way within a single file. They can be formatted in one of two ways.
Example of format 1:
Example of format 2:
The data must be at least 2 column ascii (wavelength, flux). If three columns are given, they are interpreted as (wavelength, flux, fluxerr). If more than 3 columns are given, by default the first three are interpreted as (wavelength, flux, fluxerr). The column indices of each of these arguments can be controlled by passing the integer column index to the POST JSON. Examples of valid data sections: Many-column ASCII:
3-column ASCII:
|