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
There are two ways to pass information along with a request: path and body parameters.
Path parameters (also called query or URL parameters) are embedded in
the URL called. For example, you can specify numPerPage
or
pageNumber
path parameters when calling /api/candidates
as
follows:
curl -s -H 'Authorization: token ea70a5f0-b321-43c6-96a1-b2de225e0339' \
http://localhost:5000/api/candidates?numPerPage=100&pageNumber=1
When using Python's requests
library, a dictionary of path
parameters can be passed in via the params
keyword argument:
token = 'ea70a5f0-b321-43c6-96a1-b2de225e0339'
response = requests.get(
"http://localhost:5000/api/sources",
params={"includeComments": True, "includeThumbnails": False},
headers={'Authorization': f'token {token}'},
)
Request body parameters (or simply: the body of the request)
contains data uploaded to a specific endpoint. These are the
parameters listed under REQUEST BODY SCHEMA: application/json
in the
API docs.
When using Python's requests
library, body parameters are specified
using the json
keyword argument:
token = "abc"
response = requests.post(
"http://localhost:5000/api/sources",
json={
"id": "14gqr",
"ra": 353.36647,
"dec": 33.646149,
"group_ids": [52, 97],
},
headers={"Authorization": f"token {token}"},
)
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"
}
Several API endpoints (notably the sources and candidates APIs) enforce pagination to limit the number of records that can be fetched per request. These APIs expose parameters that facilitate pagination (see the various API docs for details). A sample pagination script is included here:
import requests
import time
base_url = "https://fritz.science/api/sources"
token = "your_token_id_here"
group_ids = [4, 71] # If applicable
all_sources = []
num_per_page = 500
page = 1
total_matches = None
retry_attempts = 0
max_retry_attempts = 10
while retry_attempts <= max_retry_attempts:
r = requests.get(
f"{base_url}?group_ids={','.join([str(gid) for gid in group_ids])}&pageNumber={page}&numPerPage={num_per_page}&totalMatches={total_matches}",
headers={"Authorization": f"token {token}"},
)
if r.status_code == 429:
print("Request rate limit exceeded; sleeping 1s before trying again...")
time.sleep(1)
continue
data = r.json()
if data["status"] != "success":
print(data) # log as appropriate
retry_attempts += 1
time.sleep(5)
continue
else:
retry_attempts = 0
all_sources.extend(data["data"]["sources"])
total_matches = data["data"]["totalMatches"]
print(f"Fetched {len(all_sources)} of {total_matches} sources.")
if len(all_sources) >= total_matches:
break
page += 1
Produce a report on allocations for an instrument
instrument_id required | integer |
output_format | string Output format for analysis. Can be png or pdf |
{- "message": "string",
- "status": "success"
}
{- "message": "string",
- "data": {
- "requests": [
- null
], - "default_requests": [
- null
], - "default_observation_plans": [
- null
], - "catalog_queries": [
- null
], - "observation_plans": [
- null
], - "group": null,
- "instrument": null,
- "allocation_users": [
- null
], - "gcn_triggers": [
- null
], - "pi": "string",
- "proposal_id": "string",
- "start_date": "2019-08-24T14:15:22Z",
- "end_date": "2019-08-24T14:15:22Z",
- "hours_allocated": 0,
- "default_share_group_ids": null,
- "group_id": 0,
- "instrument_id": 0,
- "_altdata": "string",
- "id": 0
}, - "status": "success"
}
Update an allocation on a robotic instrument
allocation_id required | integer |
requests | Array of any |
default_requests | Array of any |
default_observation_plans | Array of any |
catalog_queries | Array of any |
observation_plans | Array of any |
group | any or null The Group the allocation is associated with. |
instrument | any or null The Instrument the allocation is associated with. |
allocation_users | Array of any |
gcn_triggers | Array of any |
pi | string or null The PI of the allocation's proposal. |
proposal_id | string or null The ID of the proposal associated with this allocation. |
start_date | string or null <date-time> The UTC start date of the allocation. |
end_date | string or null <date-time> The UTC end date of the allocation. |
hours_allocated required | number The number of hours allocated. |
default_share_group_ids | any or null |
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 or null |
{- "requests": [
- null
], - "default_requests": [
- null
], - "default_observation_plans": [
- null
], - "catalog_queries": [
- null
], - "observation_plans": [
- null
], - "group": null,
- "instrument": null,
- "allocation_users": [
- null
], - "gcn_triggers": [
- null
], - "pi": "string",
- "proposal_id": "string",
- "start_date": "2019-08-24T14:15:22Z",
- "end_date": "2019-08-24T14:15:22Z",
- "hours_allocated": 0,
- "default_share_group_ids": null,
- "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",
- "data": [
- {
- "requests": [
- null
], - "default_requests": [
- null
], - "default_observation_plans": [
- null
], - "catalog_queries": [
- null
], - "observation_plans": [
- null
], - "group": null,
- "instrument": null,
- "allocation_users": [
- null
], - "gcn_triggers": [
- null
], - "pi": "string",
- "proposal_id": "string",
- "start_date": "2019-08-24T14:15:22Z",
- "end_date": "2019-08-24T14:15:22Z",
- "hours_allocated": 0,
- "default_share_group_ids": null,
- "group_id": 0,
- "instrument_id": 0,
- "_altdata": "string",
- "id": 0
}
], - "status": "success"
}
Post new allocation on a robotic instrument
requests | Array of any |
default_requests | Array of any |
default_observation_plans | Array of any |
catalog_queries | Array of any |
observation_plans | Array of any |
group | any or null The Group the allocation is associated with. |
instrument | any or null The Instrument the allocation is associated with. |
allocation_users | Array of any |
gcn_triggers | Array of any |
pi | string or null The PI of the allocation's proposal. |
proposal_id | string or null The ID of the proposal associated with this allocation. |
start_date | string or null <date-time> The UTC start date of the allocation. |
end_date | string or null <date-time> The UTC end date of the allocation. |
hours_allocated required | number The number of hours allocated. |
default_share_group_ids | any or null |
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 or null |
{- "requests": [
- null
], - "default_requests": [
- null
], - "default_observation_plans": [
- null
], - "catalog_queries": [
- null
], - "observation_plans": [
- null
], - "group": null,
- "instrument": null,
- "allocation_users": [
- null
], - "gcn_triggers": [
- null
], - "pi": "string",
- "proposal_id": "string",
- "start_date": "2019-08-24T14:15:22Z",
- "end_date": "2019-08-24T14:15:22Z",
- "hours_allocated": 0,
- "default_share_group_ids": null,
- "group_id": 0,
- "instrument_id": 0,
- "_altdata": "string"
}
{- "message": "string",
- "status": "success",
- "data": {
- "id": 0
}
}
Retrieve all observation analyses
gcnevent_id | number GcnEvent ID to retrieve observation efficiency analyses for |
{- "message": "string",
- "data": [
- {
- "gcnevent": null,
- "localization": null,
- "instrument": null,
- "requester": null,
- "groups": [
- null
], - "gcnevent_id": 0,
- "localization_id": 0,
- "instrument_id": 0,
- "id": 0,
- "payload": null,
- "status": "string",
- "lightcurves": null,
- "requester_id": 0
}
], - "status": "success"
}
Retrieve all observation plan efficiency analyses
observation_plan_id | number EventObservationPlan ID to retrieve observation plan efficiency analyses for |
{- "message": "string",
- "data": [
- {
- "observation_plan": null,
- "requester": null,
- "groups": [
- null
], - "observation_plan_id": 0,
- "id": 0,
- "payload": null,
- "status": "string",
- "lightcurves": null,
- "requester_id": 0
}
], - "status": "success"
}
Retrieve a default analysis
analysis_service_id required | any Analysis service ID |
default_analysis_id required | any Default analysis ID |
{- "message": "string",
- "data": {
- "analysis_service": null,
- "groups": [
- null
], - "author": null,
- "analysis_service_id": 0,
- "show_parameters": true,
- "show_plots": true,
- "show_corner": true,
- "default_analysis_parameters": "string",
- "source_filter": null,
- "stats": null,
- "author_id": 0,
- "id": 0
}, - "status": "success"
}
Retrieve all default analyses
analysis_service_id required | any Analysis service ID, if not provided, return all default analyses for all analysis services |
{- "message": "string",
- "data": [
- {
- "analysis_service": null,
- "groups": [
- null
], - "author": null,
- "analysis_service_id": 0,
- "show_parameters": true,
- "show_plots": true,
- "show_corner": true,
- "default_analysis_parameters": "string",
- "source_filter": null,
- "stats": null,
- "author_id": 0,
- "id": 0
}
], - "status": "success"
}
Get Swift LSXPS objects and post them as sources. Repeated posting will skip the existing source.
telescope_name | integer Name of telescope to assign this catalog to. Use the same name as your nickname for the Neil Gehrels Swift Observatory. Defaults to Swift. |
{- "telescope_name": 0
}
{- "message": "string",
- "status": "success"
}
Get Gaia Photometric Alert objects and post them as sources. Repeated posting will skip the existing source.
telescope_name | string Name of telescope to assign this catalog to. Use the same name as your nickname for Gaia. Defaults to Gaia. |
startDate | str Arrow parsable string. Filter by start date. |
endDate | str Arrow parsable string. Filter by end date. |
{- "telescope_name": "string",
- "startDate": null,
- "endDate": null
}
{- "message": "string",
- "status": "success"
}
{- "message": "string",
- "data": [
- {
- "sent_by": null,
- "notices": [
- null
], - "predictions": [
- null
], - "measurements": [
- null
], - "comments": [
- null
], - "reminders": [
- null
], - "sent_by_id": 0,
- "event_id": "string",
- "event_uri": "string",
- "status": "string",
- "id": 0
}
], - "status": "success"
}
get Gaia parallax and magnitudes and post them as an annotation, based on cross-match to the Gaia DR3.
obj_id required | string ID of the object to retrieve Gaia colors for |
catalog | string The name of the catalog key, associated with a catalog cross match, from which the data should be retrieved. Default is "gaiadr3.gaia_source". |
crossmatchRadius | number Crossmatch radius (in arcseconds) to retrieve Gaia sources If not specified (or None) will use the default from the config file, or 2 arcsec if not specified in the config. |
crossmatchLimmag | number Crossmatch limiting magnitude (for Gaia G mag). Will ignore sources fainter than this magnitude. If not specified, will use the default value in the config file, or None if not specified in the config. If value is cast to False (0, False or None), will take sources of any magnitude. |
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. |
{- "catalog": "string",
- "crossmatchRadius": 0,
- "crossmatchLimmag": 0,
- "group_ids": [
- 0
]
}
{- "message": "string",
- "status": "success"
}
get WISE colors and post them as an annotation based on cross-matches to some catalog (default is allwise_p3as_psd).
obj_id required | string ID of the object to retrieve WISE colors for |
catalog | string The name of the catalog key, associated with a catalog cross match, from which the data should be retrieved. Default is allwise_p3as_psd. |
crossmatchRadius | number Crossmatch radius (in arcseconds) to retrieve photoz's Default is 2. |
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. |
{- "catalog": "string",
- "crossmatchRadius": 0,
- "group_ids": [
- 0
]
}
{- "message": "string",
- "status": "success"
}
get cross-match with Vizier and post them as an annotation based on cross-matches to some catalog (default is VII/290, i.e. the million quasar catalog).
obj_id required | string ID of the object to retrieve the Vizier crossmatch for |
catalog | string The name of the catalog key, associated with a catalog cross match, from which the data should be retrieved. Default is VII/290. |
crossmatchRadius | number Crossmatch radius (in arcseconds) to retrieve photoz's Default is 2. |
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. |
{- "catalog": "string",
- "crossmatchRadius": 0,
- "group_ids": [
- 0
]
}
{- "message": "string",
- "status": "success"
}
Generate a PDF/PNG finding chart for a position or Gaia ID
location_type required | string Enum: "gaia_dr3" "gaia_dr2" "pos" What is the type of the search? From gaia or by position? If |
catalog_id | string |
ra | float [ 0 .. 360 ) RA of the source of interest at the time of observation of interest (ie. the user is responsible for proper motion calulations). |
dec | float [ -90 .. 90 ] DEC of the source of interest at the time of observation of interest (ie. the user is responsible for proper motion calulations). |
imsize | float [ 2 .. 15 ] Image size in arcmin (square). Defaults to 4.0 |
facility | string Enum: "Keck" "Shane" "P200" What type of starlist should be used? Defaults to Keck |
image_source | string Enum: "ps1" "desi" "dss" "ztfref" Source of the image used in the finding chart. Defaults to ps1 |
use_ztfref | boolean Use ZTFref catalog for offset star positions, otherwise DR3. Defaults to True. |
obstime | string datetime of observation in isoformat (e.g. 2020-12-30T12:34:10). Defaults to now. |
type | string Enum: "png" "pdf" Output datafile type. Defaults to pdf. |
num_offset_stars | integer [ 0 .. 4 ] Number of offset stars to determine and show [0,4] (default: 3) |
{- "message": "string",
- "data": { },
- "status": "error"
}
Retrieve an Analysis Service by id
analysis_service_id required | integer |
{- "message": "string",
- "data": {
- "groups": [
- null
], - "obj_analyses": [
- null
], - "default_analyses": [
- null
], - "name": "string",
- "display_name": "string",
- "description": "string",
- "version": "string",
- "contact_name": "string",
- "contact_email": "string",
- "url": "string",
- "optional_analysis_parameters": "string",
- "authentication_type": "none",
- "_authinfo": "string",
- "enabled": true,
- "analysis_type": "lightcurve_fitting",
- "input_data_types": [
- null
], - "timeout": 0,
- "upload_only": true,
- "display_on_resource_dropdown": true,
- "is_summary": true,
- "id": 0
}, - "status": "success"
}
{- "message": "string",
- "data": [
- {
- "groups": [
- null
], - "obj_analyses": [
- null
], - "default_analyses": [
- null
], - "name": "string",
- "display_name": "string",
- "description": "string",
- "version": "string",
- "contact_name": "string",
- "contact_email": "string",
- "url": "string",
- "optional_analysis_parameters": "string",
- "authentication_type": "none",
- "_authinfo": "string",
- "enabled": true,
- "analysis_type": "lightcurve_fitting",
- "input_data_types": [
- null
], - "timeout": 0,
- "upload_only": true,
- "display_on_resource_dropdown": true,
- "is_summary": true,
- "id": 0
}
], - "status": "success"
}
Upload an upload_only analysis result
analysis_resource_type required | string What underlying data the analysis is on: must be "obj" (more to be added in the future) |
resource_id required | string The ID of the underlying data. This would be a string for an object ID. |
analysis_service_id required | string the analysis service id to be used |
results | object Results data of this analysis |
show_parameters | boolean Whether to render the parameters of this analysis |
show_plots | boolean Whether to render the plots of this analysis |
show_corner | boolean Whether to render the corner plots of this analysis |
group_ids | Array of integers List of group IDs corresponding to which groups should be able to view analysis results. Defaults to all of requesting user's groups. |
{- "results": { },
- "show_parameters": true,
- "show_plots": true,
- "show_corner": true,
- "group_ids": [
- 0
]
}
{- "message": "string",
- "status": "success",
- "data": {
- "analysis_id": 0
}
}
Retrieve an Analysis by id
analysis_resource_type required | string What underlying data the analysis is on: must be "obj" (more to be added in the future) |
analysis_id required | int ID of the analysis to return. |
objID | string Return any analysis on an object with ID objID |
analysisServiceID | int ID of the analysis service used to create the analysis, used only if no analysis_id is given |
includeAnalysisData | boolean Boolean indicating whether to include the data associated with the analysis in the response. Could be a large amount of data. Only works for single analysis requests. Defaults to false. |
summaryOnly | boolean Boolean indicating whether to return only analyses that
use analysis services with |
includeFilename | boolean Boolean indicating whether to include the filename of the data associated with the analysis in the response. Defaults to false. |
{- "message": "string",
- "data": {
- "obj": null,
- "author": null,
- "analysis_service": null,
- "groups": [
- null
], - "obj_id": "string",
- "id": 0,
- "_unique_id": "string",
- "hash": "string",
- "_full_name": "string",
- "show_parameters": true,
- "show_plots": true,
- "show_corner": true,
- "analysis_parameters": "string",
- "author_id": 0,
- "analysis_service_id": 0,
- "invalid_after": "2019-08-24T14:15:22Z",
- "token": "string",
- "handled_by_url": "string",
- "status": "queued",
- "duration": 0,
- "last_activity": "2019-08-24T14:15:22Z",
- "status_message": "string"
}, - "status": "success"
}
{- "message": "string",
- "data": [
- {
- "obj": null,
- "author": null,
- "analysis_service": null,
- "groups": [
- null
], - "obj_id": "string",
- "id": 0,
- "_unique_id": "string",
- "hash": "string",
- "_full_name": "string",
- "show_parameters": true,
- "show_plots": true,
- "show_corner": true,
- "analysis_parameters": "string",
- "author_id": 0,
- "analysis_service_id": 0,
- "invalid_after": "2019-08-24T14:15:22Z",
- "token": "string",
- "handled_by_url": "string",
- "status": "queued",
- "duration": 0,
- "last_activity": "2019-08-24T14:15:22Z",
- "status_message": "string"
}
], - "status": "success"
}
Begin an analysis run
analysis_resource_type required | string What underlying data the analysis is on: must be "obj" (more to be added in the future) |
resource_id required | string The ID of the underlying data. This would be a string for an object ID. |
analysis_service_id required | string the analysis service id to be used |
show_parameters | boolean Whether to render the parameters of this analysis |
show_plots | boolean Whether to render the plots of this analysis |
show_corner | boolean Whether to render the corner plots of this analysis |
object Dictionary of parameters to be passed thru to the analysis | |
group_ids | Array of integers List of group IDs corresponding to which groups should be able to view analysis results. Defaults to all of requesting user's groups. |
{- "show_parameters": true,
- "show_plots": true,
- "show_corner": true,
- "analysis_parameters": {
- "property1": "string",
- "property2": "string"
}, - "group_ids": [
- 0
]
}
{- "message": "string",
- "status": "success",
- "data": {
- "analysis_id": 0
}
}
Retrieve an Analysis by id
analysis_resource_type required | string What underlying data the analysis is on: must be "obj" (more to be added in the future) |
analysis_id required | int ID of the analysis to return. |
objID | string Return any analysis on an object with ID objID |
analysisServiceID | int ID of the analysis service used to create the analysis, used only if no analysis_id is given |
includeAnalysisData | boolean Boolean indicating whether to include the data associated with the analysis in the response. Could be a large amount of data. Only works for single analysis requests. Defaults to false. |
summaryOnly | boolean Boolean indicating whether to return only analyses that
use analysis services with |
includeFilename | boolean Boolean indicating whether to include the filename of the data associated with the analysis in the response. Defaults to false. |
{- "message": "string",
- "data": {
- "obj": null,
- "author": null,
- "analysis_service": null,
- "groups": [
- null
], - "obj_id": "string",
- "id": 0,
- "_unique_id": "string",
- "hash": "string",
- "_full_name": "string",
- "show_parameters": true,
- "show_plots": true,
- "show_corner": true,
- "analysis_parameters": "string",
- "author_id": 0,
- "analysis_service_id": 0,
- "invalid_after": "2019-08-24T14:15:22Z",
- "token": "string",
- "handled_by_url": "string",
- "status": "queued",
- "duration": 0,
- "last_activity": "2019-08-24T14:15:22Z",
- "status_message": "string"
}, - "status": "success"
}
{- "message": "string",
- "data": [
- {
- "obj": null,
- "author": null,
- "analysis_service": null,
- "groups": [
- null
], - "obj_id": "string",
- "id": 0,
- "_unique_id": "string",
- "hash": "string",
- "_full_name": "string",
- "show_parameters": true,
- "show_plots": true,
- "show_corner": true,
- "analysis_parameters": "string",
- "author_id": 0,
- "analysis_service_id": 0,
- "invalid_after": "2019-08-24T14:15:22Z",
- "token": "string",
- "handled_by_url": "string",
- "status": "queued",
- "duration": 0,
- "last_activity": "2019-08-24T14:15:22Z",
- "status_message": "string"
}
], - "status": "success"
}
Begin an analysis run
analysis_resource_type required | string What underlying data the analysis is on: must be "obj" (more to be added in the future) |
resource_id required | string The ID of the underlying data. This would be a string for an object ID. |
analysis_service_id required | string the analysis service id to be used |
show_parameters | boolean Whether to render the parameters of this analysis |
show_plots | boolean Whether to render the plots of this analysis |
show_corner | boolean Whether to render the corner plots of this analysis |
object Dictionary of parameters to be passed thru to the analysis | |
group_ids | Array of integers List of group IDs corresponding to which groups should be able to view analysis results. Defaults to all of requesting user's groups. |
{- "show_parameters": true,
- "show_plots": true,
- "show_corner": true,
- "analysis_parameters": {
- "property1": "string",
- "property2": "string"
}, - "group_ids": [
- 0
]
}
{- "message": "string",
- "status": "success",
- "data": {
- "analysis_id": 0
}
}
Retrieve primary data associated with an Analysis.
analysis_resource_type required | string What underlying data the analysis is on: must be "obj" (more to be added in the future) |
analysis_id required | integer |
product_type required | string What type of data to retrieve: must be one of "corner", "results", or "plot" |
plot_number required | integer if product_type == "plot", which plot number should be returned? Default to zero (first plot). |
download | bool Download the results as a file |
object Extra parameters to pass to the plotting functions if new plots are to be generated (e.g. with corner plots) |
{- "download": null,
- "plot_kwargs": {
- "property1": { },
- "property2": { }
}
}
{ }
Retrieve an observing run assignment
assignment_id required | integer |
{- "message": "string",
- "data": {
- "requester": null,
- "last_modified_by": null,
- "obj": null,
- "spectra": [
- null
], - "photometry": [
- null
], - "photometric_series": [
- null
], - "run": null,
- "requester_id": 0,
- "last_modified_by_id": 0,
- "obj_id": "string",
- "comment": "string",
- "status": "string",
- "priority": "1",
- "run_id": 0,
- "id": 0
}, - "status": "success"
}
Update an assignment
assignment_id required | integer |
requester | any or null The User who created this assignment. |
last_modified_by | any or null |
obj | any or null The assigned Obj. |
spectra | Array of any |
photometry | Array of any |
photometric_series | Array of any |
run | any or null The ObservingRun this target was assigned to. |
requester_id required | integer The ID of the User who created this assignment. |
obj_id required | string ID of the assigned Obj. |
comment | string or null 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": null,
- "last_modified_by": null,
- "obj": null,
- "spectra": [
- null
], - "photometry": [
- null
], - "photometric_series": [
- null
], - "run": null,
- "requester_id": 0,
- "obj_id": "string",
- "comment": "string",
- "status": "string",
- "priority": "1",
- "run_id": 0
}
{- "message": "string",
- "status": "success"
}
{- "message": "string",
- "data": [
- {
- "requester": null,
- "last_modified_by": null,
- "obj": null,
- "spectra": [
- null
], - "photometry": [
- null
], - "photometric_series": [
- null
], - "run": null,
- "requester_id": 0,
- "last_modified_by_id": 0,
- "obj_id": "string",
- "comment": "string",
- "status": "string",
- "priority": "1",
- "run_id": 0,
- "id": 0
}
], - "status": "success"
}
Post new target assignment to observing run
obj_id required | string The ID of the object to observe. |
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). |
status | string The status of the request |
{- "obj_id": "string",
- "comment": "string",
- "run_id": 0,
- "priority": "1",
- "status": "string"
}
{- "message": "string",
- "status": "success",
- "data": {
- "id": 0
}
}
Retrieve a candidate
obj_id required | string |
includeComments | boolean Boolean indicating whether to include associated comments. Defaults to false. |
includeAlerts | boolean Boolean indicating whether to include associated alerts. Defaults to false. |
{- "message": "string",
- "data": {
- "host": null,
- "comments": [
- null
], - "reminders": [
- null
], - "comments_on_spectra": [
- null
], - "reminders_on_spectra": [
- null
], - "annotations": [
- null
], - "annotations_on_spectra": [
- null
], - "annotations_on_photometry": [
- null
], - "classifications": [
- null
], - "photometry": [
- null
], - "photstats": [
- null
], - "photometric_series": [
- null
], - "spectra": [
- null
], - "thumbnails": [
- null
], - "followup_requests": [
- null
], - "assignments": [
- null
], - "obj_notifications": [
- null
], - "obj_analyses": [
- null
], - "sources_in_gcns": [
- null
], - "id": "string",
- "ra_dis": 0,
- "dec_dis": 0,
- "ra_err": 0,
- "dec_err": 0,
- "offset": 0,
- "redshift": 0,
- "redshift_error": 0,
- "redshift_origin": "string",
- "redshift_history": null,
- "host_id": 0,
- "summary": "string",
- "summary_history": null,
- "altdata": null,
- "dist_nearest_source": 0,
- "mag_nearest_source": 0,
- "e_mag_nearest_source": 0,
- "transient": true,
- "varstar": true,
- "is_roid": true,
- "mpc_name": "string",
- "gcn_crossmatch": null,
- "tns_name": "string",
- "tns_info": null,
- "score": 0,
- "origin": "string",
- "alias": null,
- "internal_key": "string",
- "detect_photometry_count": 0,
- "ra": 0,
- "dec": 0,
- "candidates": [
- null
], - "sources": [
- null
], - "users": [
- null
]
}, - "status": "success"
}
Retrieve all candidates
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. |
autosave | boolean Automatically save candidates passing query. |
autosaveGroupIds | boolean Group ID(s) to save candidates to. |
savedStatus | string Enum: "all" "savedToAllSelected" "savedToAnySelected" "savedToAnyAccessible" "notSavedToAnyAccessible" "notSavedToAnySelected" "notSavedToAllSelected" String indicating the saved status to filter candidate results for. Must be one of the enumerated values. |
startDate | string Arrow-parseable date string (e.g. 2020-01-01). If provided, filter by Candidate.passed_at >= startDate |
endDate | string Arrow-parseable date string (e.g. 2020-01-01). If provided, filter by Candidate.passed_at <= endDate |
groupIDs | Array of integers Comma-separated string of group IDs (e.g. "1,2"). Defaults to all of user's groups if filterIDs is not provided. |
filterIDs | Array of integers Comma-separated string of filter IDs (e.g. "1,2"). Defaults to all of user's groups' filters if groupIDs is not provided. |
annotationExcludeOrigin | string Only load objects that do not have annotations from this origin. If the annotationsExcludeOutdatedDate is also given, then annotations with this origin will still be loaded if they were modified before that date. |
annotationExcludeOutdatedDate | string An Arrow parseable string designating when an existing annotation is outdated. Only relevant if giving the annotationExcludeOrigin argument. Will treat objects with outdated annotations as if they did not have that annotation, so it will load an object if it doesn't have an annotation with the origin specified or if it does have it but the annotation modified date < annotationsExcludeOutdatedDate |
sortByAnnotationOrigin | string The origin of the Annotation to sort by |
sortByAnnotationKey | string The key of the Annotation data value to sort by |
sortByAnnotationOrder | string The sort order for annotations - either "asc" or "desc". Defaults to "asc". |
annotationFilterList | Array of strings Comma-separated string of JSON objects representing annotation filters. Filter objects are expected to have keys { origin, key, value } for non-numeric value types, or { origin, key, min, max } for numeric values. |
includePhotometry | boolean Boolean indicating whether to include associated photometry. Defaults to false. |
includeSpectra | boolean Boolean indicating whether to include associated spectra. Defaults to false. |
includeComments | boolean Boolean indicating whether to include associated comments. Defaults to false. |
classifications | Array of strings Comma-separated string of classification(s) to filter for candidates matching that/those classification(s). |
minRedshift | number If provided, return only candidates with a redshift of at least this value |
maxRedshift | number If provided, return only candidates with a redshift of at most this value |
listName | string Get only candidates saved to the querying user's list, e.g., "favorites". |
listNameReject | string Get only candidates that ARE NOT saved to the querying user's list, e.g., "rejected_candidates". |
photometryAnnotationsFilter | Array of strings Comma-separated string of "annotation: value: operator" triplet(s) to filter for sources matching that/those photometry annotation(s), i.e. "drb: 0.5: lt" |
photometryAnnotationsFilterOrigin | string Comma separated string of origins. Only photometry annotations from these origins are used when filtering with the photometryAnnotationsFilter. |
photometryAnnotationsFilterBefore | string Only return sources that have photometry annotations before this UTC datetime. |
photometryAnnotationsFilterAfter | string Only return sources that have photometry annotations after this UTC datetime. |
photometryAnnotationsFilterMinCount | string Only return sources that have at least this number of photometry annotations passing the photometry annotations filtering criteria. Defaults to 1. |
localizationDateobs | string Event time in ISO 8601 format ( |
localizationName | string Name of localization / skymap to use. Can be found in Localization.localization_name queried from /api/localization endpoint or skymap name in GcnEvent page table. |
localizationCumprob | number Cumulative probability up to which to include sources |
{- "message": "string",
- "status": "success",
- "data": {
- "candidates": [
- {
- "host": null,
- "comments": [
- null
], - "reminders": [
- null
], - "comments_on_spectra": [
- null
], - "reminders_on_spectra": [
- null
], - "annotations": [
- null
], - "annotations_on_spectra": [
- null
], - "annotations_on_photometry": [
- null
], - "classifications": [
- null
], - "photometry": [
- null
], - "photstats": [
- null
], - "photometric_series": [
- null
], - "spectra": [
- null
], - "thumbnails": [
- null
], - "followup_requests": [
- null
], - "assignments": [
- null
], - "obj_notifications": [
- null
], - "obj_analyses": [
- null
], - "sources_in_gcns": [
- null
], - "id": "string",
- "ra_dis": 0,
- "dec_dis": 0,
- "ra_err": 0,
- "dec_err": 0,
- "offset": 0,
- "redshift": 0,
- "redshift_error": 0,
- "redshift_origin": "string",
- "redshift_history": null,
- "host_id": 0,
- "summary": "string",
- "summary_history": null,
- "altdata": null,
- "dist_nearest_source": 0,
- "mag_nearest_source": 0,
- "e_mag_nearest_source": 0,
- "transient": true,
- "varstar": true,
- "is_roid": true,
- "mpc_name": "string",
- "gcn_crossmatch": null,
- "tns_name": "string",
- "tns_info": null,
- "score": 0,
- "origin": "string",
- "alias": null,
- "internal_key": "string",
- "detect_photometry_count": 0,
- "ra": 0,
- "dec": 0,
- "candidates": [
- null
], - "sources": [
- null
], - "users": [
- null
], - "is_source": true
}
], - "totalMatches": 0,
- "pageNumber": 0,
- "numPerPage": 0
}
}
Create new candidate(s) (one per filter).
host | any or null The Galaxy associated with this source. |
comments | Array of any |
reminders | Array of any |
comments_on_spectra | Array of any |
reminders_on_spectra | Array of any |
annotations | Array of any |
annotations_on_spectra | Array of any |
annotations_on_photometry | Array of any |
classifications | Array of any |
photometry | Array of any |
photstats | Array of any |
photometric_series | Array of any |
spectra | Array of any |
thumbnails | Array of any |
followup_requests | Array of any |
assignments | Array of any |
obj_notifications | Array of any |
obj_analyses | Array of any |
sources_in_gcns | Array of any |
id required | string Name of the object. |
ra_dis | number or null J2000 Right Ascension at discovery time [deg]. |
dec_dis | number or null J2000 Declination at discovery time [deg]. |
ra_err | number or null Error on J2000 Right Ascension at discovery time [deg]. |
dec_err | number or null Error on J2000 Declination at discovery time [deg]. |
offset | number or null Offset from nearest static object [arcsec]. |
redshift | number or null Redshift. |
redshift_error | number or null Redshift error. |
redshift_origin | string or null Redshift source. |
host_id | integer or null The ID of the Galaxy to which this Obj is associated. |
summary | string or null Summary of the obj. |
summary_history | any or null Record of the summaries generated and written about this obj |
altdata | any or null Misc. alternative metadata stored in JSON format, e.g. |
dist_nearest_source | number or null Distance to the nearest Obj [arcsec]. |
mag_nearest_source | number or null Magnitude of the nearest Obj [AB]. |
e_mag_nearest_source | number or null Error on magnitude of the nearest Obj [mag]. |
transient | boolean or null Boolean indicating whether the object is an astrophysical transient. |
varstar | boolean or null Boolean indicating whether the object is a variable star. |
is_roid | boolean or null Boolean indicating whether the object is a moving object. |
mpc_name | string or null Minor planet center name. |
gcn_crossmatch | any or null List of GCN event dateobs for crossmatched events. |
tns_name | string or null Transient Name Server name. |
tns_info | any or null TNS info in JSON format |
score | number or null Machine learning score. |
origin | string or null Origin of the object. |
alias | any or null Alternative names for this object. |
healpix | integer or null |
detect_photometry_count | integer or null How many times the object was detected above :math: |
ra | number or null |
dec | number or null |
candidates | Array of any |
sources | Array of any |
users | Array of any |
filter_ids required | Array of integers List of associated filter IDs |
passing_alert_id | integer or null ID of associated filter that created candidate |
passed_at required | string or null Arrow-parseable datetime string indicating when passed filter. |
{- "host": null,
- "comments": [
- null
], - "reminders": [
- null
], - "comments_on_spectra": [
- null
], - "reminders_on_spectra": [
- null
], - "annotations": [
- null
], - "annotations_on_spectra": [
- null
], - "annotations_on_photometry": [
- null
], - "classifications": [
- null
], - "photometry": [
- null
], - "photstats": [
- null
], - "photometric_series": [
- null
], - "spectra": [
- null
], - "thumbnails": [
- null
], - "followup_requests": [
- null
], - "assignments": [
- null
], - "obj_notifications": [
- null
], - "obj_analyses": [
- null
], - "sources_in_gcns": [
- null
], - "id": "string",
- "ra_dis": 0,
- "dec_dis": 0,
- "ra_err": 0,
- "dec_err": 0,
- "offset": 0,
- "redshift": 0,
- "redshift_error": 0,
- "redshift_origin": "string",
- "host_id": 0,
- "summary": "string",
- "summary_history": null,
- "altdata": null,
- "dist_nearest_source": 0,
- "mag_nearest_source": 0,
- "e_mag_nearest_source": 0,
- "transient": true,
- "varstar": true,
- "is_roid": true,
- "mpc_name": "string",
- "gcn_crossmatch": null,
- "tns_name": "string",
- "tns_info": null,
- "score": 0,
- "origin": "string",
- "alias": null,
- "healpix": 0,
- "detect_photometry_count": 0,
- "ra": 0,
- "dec": 0,
- "candidates": [
- null
], - "sources": [
- null
], - "users": [
- null
], - "filter_ids": [
- 0
], - "passing_alert_id": 0,
- "passed_at": "string"
}
{- "message": "string",
- "status": "success",
- "data": {
- "ids": [
- 0
]
}
}
Create new candidate(s) (one per filter).
host | any or null The Galaxy associated with this source. |
comments | Array of any |
reminders | Array of any |
comments_on_spectra | Array of any |
reminders_on_spectra | Array of any |
annotations | Array of any |
annotations_on_spectra | Array of any |
annotations_on_photometry | Array of any |
classifications | Array of any |
photometry | Array of any |
photstats | Array of any |
photometric_series | Array of any |
spectra | Array of any |
thumbnails | Array of any |
followup_requests | Array of any |
assignments | Array of any |
obj_notifications | Array of any |
obj_analyses | Array of any |
sources_in_gcns | Array of any |
id required | string Name of the object. |
ra_dis | number or null J2000 Right Ascension at discovery time [deg]. |
dec_dis | number or null J2000 Declination at discovery time [deg]. |
ra_err | number or null Error on J2000 Right Ascension at discovery time [deg]. |
dec_err | number or null Error on J2000 Declination at discovery time [deg]. |
offset | number or null Offset from nearest static object [arcsec]. |
redshift | number or null Redshift. |
redshift_error | number or null Redshift error. |
redshift_origin | string or null Redshift source. |
host_id | integer or null The ID of the Galaxy to which this Obj is associated. |
summary | string or null Summary of the obj. |
summary_history | any or null Record of the summaries generated and written about this obj |
altdata | any or null Misc. alternative metadata stored in JSON format, e.g. |
dist_nearest_source | number or null Distance to the nearest Obj [arcsec]. |
mag_nearest_source | number or null Magnitude of the nearest Obj [AB]. |
e_mag_nearest_source | number or null Error on magnitude of the nearest Obj [mag]. |
transient | boolean or null Boolean indicating whether the object is an astrophysical transient. |
varstar | boolean or null Boolean indicating whether the object is a variable star. |
is_roid | boolean or null Boolean indicating whether the object is a moving object. |
mpc_name | string or null Minor planet center name. |
gcn_crossmatch | any or null List of GCN event dateobs for crossmatched events. |
tns_name | string or null Transient Name Server name. |
tns_info | any or null TNS info in JSON format |
score | number or null Machine learning score. |
origin | string or null Origin of the object. |
alias | any or null Alternative names for this object. |
healpix | integer or null |
detect_photometry_count | integer or null How many times the object was detected above :math: |
ra | number or null |
dec | number or null |
candidates | Array of any |
sources | Array of any |
users | Array of any |
filter_ids required | Array of integers List of associated filter IDs |
passing_alert_id | integer or null ID of associated filter that created candidate |
passed_at required | string or null Arrow-parseable datetime string indicating when passed filter. |
{- "host": null,
- "comments": [
- null
], - "reminders": [
- null
], - "comments_on_spectra": [
- null
], - "reminders_on_spectra": [
- null
], - "annotations": [
- null
], - "annotations_on_spectra": [
- null
], - "annotations_on_photometry": [
- null
], - "classifications": [
- null
], - "photometry": [
- null
], - "photstats": [
- null
], - "photometric_series": [
- null
], - "spectra": [
- null
], - "thumbnails": [
- null
], - "followup_requests": [
- null
], - "assignments": [
- null
], - "obj_notifications": [
- null
], - "obj_analyses": [
- null
], - "sources_in_gcns": [
- null
], - "id": "string",
- "ra_dis": 0,
- "dec_dis": 0,
- "ra_err": 0,
- "dec_err": 0,
- "offset": 0,
- "redshift": 0,
- "redshift_error": 0,
- "redshift_origin": "string",
- "host_id": 0,
- "summary": "string",
- "summary_history": null,
- "altdata": null,
- "dist_nearest_source": 0,
- "mag_nearest_source": 0,
- "e_mag_nearest_source": 0,
- "transient": true,
- "varstar": true,
- "is_roid": true,
- "mpc_name": "string",
- "gcn_crossmatch": null,
- "tns_name": "string",
- "tns_info": null,
- "score": 0,
- "origin": "string",
- "alias": null,
- "healpix": 0,
- "detect_photometry_count": 0,
- "ra": 0,
- "dec": 0,
- "candidates": [
- null
], - "sources": [
- null
], - "users": [
- null
], - "filter_ids": [
- 0
], - "passing_alert_id": 0,
- "passed_at": "string"
}
{- "message": "string",
- "status": "success",
- "data": {
- "ids": [
- 0
]
}
}
Submit catalog queries
status | string Default: "pending submission" The status of the request. |
target_group_ids | Array of integers IDs of groups to share the results of the observation plan request with. |
allocation_id required | integer Catalog query request allocation ID. |
payload | any Content of the catalog query request. |
{- "status": "pending submission",
- "target_group_ids": [
- 0
], - "allocation_id": 0,
- "payload": null
}
{- "message": "string",
- "status": "success"
}
Vote for a classification.
classification_id required | string ID of classification to indicate the vote for |
vote required | integer Upvote or downvote a classification |
{- "vote": 0
}
{- "message": "string",
- "status": "success"
}
Retrieve a classification
classification_id required | integer |
includeTaxonomy | boolean Return associated taxonomy. |
{- "message": "string",
- "data": {
- "taxonomy": null,
- "author": null,
- "obj": null,
- "groups": [
- null
], - "votes": [
- null
], - "classification": "string",
- "taxonomy_id": 0,
- "probability": 0,
- "author_id": 0,
- "author_name": "string",
- "obj_id": "string",
- "id": 0
}, - "status": "success"
}
Update a classification
classification required | integer |
taxonomy | any or null Taxonomy in which this Classification was made. |
author | any or null The User that made this classification. |
obj | any or null The Classification's Obj. |
groups | Array of any |
votes | Array of any |
classification required | string The assigned class. |
taxonomy_id required | integer ID of the Taxonomy in which this Classification was made. |
probability | number or null 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. |
{- "taxonomy": null,
- "author": null,
- "obj": null,
- "groups": [
- null
], - "votes": [
- null
], - "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 |
label | boolean or null Add label associated with classification. |
{- "label": true
}
{- "message": "string",
- "status": "success"
}
Retrieve all classifications
startDate | string Arrow-parseable date string (e.g. 2020-01-01). If provided, filter by created_at >= startDate |
endDate | string Arrow-parseable date string (e.g. 2020-01-01). If provided, filter by created_at <= endDate |
includeTaxonomy | boolean Return associated taxonomy. |
numPerPage | integer Number of sources to return per paginated request. Defaults to 100. Max 500. |
pageNumber | integer Page number for paginated query results. Defaults to 1 |
{- "message": "string",
- "status": "success",
- "data": {
- "sources": [
- {
- "taxonomy": null,
- "author": null,
- "obj": null,
- "groups": [
- null
], - "votes": [
- null
], - "classification": "string",
- "taxonomy_id": 0,
- "probability": 0,
- "author_id": 0,
- "author_name": "string",
- "obj_id": "string",
- "id": 0
}
], - "totalMatches": 0
}
}
Post a classification
obj_id required | string |
classification required | string |
taxonomy_id required | integer |
probability | float or null [ 0 .. 1 ] 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. |
vote | boolean or null Add vote associated with classification. |
label | boolean or null Add label associated with classification. |
{- "obj_id": "string",
- "classification": "string",
- "taxonomy_id": 0,
- "probability": null,
- "group_ids": [
- 0
], - "vote": true,
- "label": true
}
{- "message": "string",
- "status": "success",
- "data": {
- "classification_id": 0
}
}
Retrieve an object's classifications
obj_id required | string |
{- "message": "string",
- "data": [
- {
- "taxonomy": null,
- "author": null,
- "obj": null,
- "groups": [
- null
], - "votes": [
- null
], - "classification": "string",
- "taxonomy_id": 0,
- "probability": 0,
- "author_id": 0,
- "author_name": "string",
- "obj_id": "string",
- "id": 0
}
], - "status": "success"
}
Delete all of an object's classifications
classification_id required | integer |
label | boolean or null Add label associated with classification. |
{- "label": true
}
{- "message": "string",
- "status": "success"
}
Vote for a classification.
classification_id required | string ID of classification to indicate the vote for |
vote required | integer Upvote or downvote a classification |
{- "vote": 0
}
{- "message": "string",
- "status": "success"
}
find the sources with classifications
startDate | string Arrow-parseable date string (e.g. 2020-01-01) for when the classification was made. If provided, filter by created_at >= startDate |
endDate | string Arrow-parseable date string (e.g. 2020-01-01) for when the classification was made. If provided, filter by created_at <= endDate |
{- "message": "string",
- "status": "success",
- "data": [
- 0
]
}
{- "message": "string",
- "status": "success",
- "data": {
- "ALLOWED_SPECTRUM_TYPES": [ ],
- "ALLOWED_MAGSYSTEMS": [ ],
- "ALLOWED_BANDPASSES": [ ],
- "THUMBNAIL_TYPES": [ ],
- "FOLLOWUP_PRIORITIES": [ ],
- "ALLOWED_API_CLASSNAMES": [ ],
- "ANALYSIS_TYPES": [ ],
- "ANALYSIS_INPUT_TYPES": [ ],
- "AUTHENTICATION_TYPES": [ ]
}
}
{- "message": "string",
- "status": "success",
- "data": {
- "Number of candidates": 0,
- "Number of objs": 0,
- "Number of sources": 0,
- "Number of photometry": 0,
- "Number of spectra": 0,
- "Number of groups": 0,
- "Number of users": 0,
- "Number of tokens": 0,
- "Oldest candidate creation datetime": "string",
- "Newest candidate creation datetime": "string"
}
}
Retrieve a single default follow-up request
default_followup_request_id required | integer |
{- "message": "string",
- "data": {
- "requester": null,
- "allocation": null,
- "target_groups": [
- null
], - "requester_id": 0,
- "payload": null,
- "allocation_id": 0,
- "default_followup_name": "string",
- "source_filter": null,
- "id": 0
}, - "status": "success"
}
{- "message": "string",
- "data": [
- {
- "requester": null,
- "allocation": null,
- "target_groups": [
- null
], - "requester_id": 0,
- "payload": null,
- "allocation_id": 0,
- "default_followup_name": "string",
- "source_filter": null,
- "id": 0
}
], - "status": "success"
}
{- "message": "string",
- "data": [
- {
- "requester": null,
- "allocation": null,
- "target_groups": [
- null
], - "default_survey_efficiencies": [
- null
], - "requester_id": 0,
- "payload": null,
- "filters": null,
- "allocation_id": 0,
- "default_plan_name": "string",
- "id": 0
}
], - "status": "success"
}
{- "message": "string",
- "data": [
- {
- "default_observationplan_request": null,
- "default_observationplan_request_id": 0,
- "payload": null,
- "id": 0
}
], - "status": "success"
}
Update filter name
filter_id required | integer |
stream | any or null The Filter's Stream. |
group | any or null The Filter's Group. |
candidates | Array of any |
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. |
{- "stream": null,
- "group": null,
- "candidates": [
- null
], - "name": "string",
- "stream_id": 0,
- "group_id": 0
}
{- "message": "string",
- "status": "success"
}
POST a new filter.
stream | any or null The Filter's Stream. |
group | any or null The Filter's Group. |
candidates | Array of any |
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. |
{- "stream": null,
- "group": null,
- "candidates": [
- null
], - "name": "string",
- "stream_id": 0,
- "group_id": 0
}
{- "message": "string",
- "status": "success",
- "data": {
- "id": 0
}
}
Create default follow-up request.
target_group_ids | Array of integers IDs of groups to share the results of the default follow-up request with. |
allocation_id required | integer Follow-up request allocation ID. |
payload | any Content of the default follow-up request. |
{- "target_group_ids": [
- 0
], - "allocation_id": 0,
- "payload": null
}
{- "message": "string",
- "status": "success",
- "data": {
- "id": 0
}
}
Retrieve a single default observation plan
default_observation_plan_id required | integer |
{- "message": "string",
- "data": {
- "requester": null,
- "allocation": null,
- "target_groups": [
- null
], - "default_survey_efficiencies": [
- null
], - "requester_id": 0,
- "payload": null,
- "filters": null,
- "allocation_id": 0,
- "default_plan_name": "string",
- "id": 0
}, - "status": "success"
}
Create default observation plan requests.
target_group_ids | Array of integers IDs of groups to share the results of the default observation plan request with. |
allocation_id required | integer Observation plan request allocation ID. |
payload | any Content of the default observation plan request. |
{- "target_group_ids": [
- 0
], - "allocation_id": 0,
- "payload": null
}
{- "message": "string",
- "status": "success",
- "data": {
- "id": 0
}
}
Retrieve a single default survey efficiency
default_survey_efficiency_id required | integer |
{- "message": "string",
- "data": {
- "default_observationplan_request": null,
- "default_observationplan_request_id": 0,
- "payload": null,
- "id": 0
}, - "status": "success"
}
Create default survey efficiency requests.
default_observationplan_request_id required | integer Default observation plan request ID. |
payload | any Content of the default survey efficiency analysis. |
{- "default_observationplan_request_id": 0,
- "payload": null
}
{- "message": "string",
- "status": "success",
- "data": {
- "id": 0
}
}
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"
}
Retrieve followup requests schedule
sourceID | string Portion of ID to filter on |
startDate | string Arrow-parseable date string (e.g. 2020-01-01). If provided, filter by created_at >= startDate |
endDate | string Arrow-parseable date string (e.g. 2020-01-01). If provided, filter by created_at <= endDate |
status | string String to match status of request against |
observationStartDate | string Arrow-parseable date string (e.g. 2020-01-01). If provided, start time of observation window, otherwise now. |
observationEndDate | string Arrow-parseable date string (e.g. 2020-01-01). If provided, end time of observation window, otherwise 12 hours from now. |
includeStandards | boolean Include standards in schedule. Defaults to False. |
standardsOnly | boolean Only request standards in schedule. Defaults to False. |
standardType | string Origin of the standard stars, defined in config.yaml. Defaults to ESO. |
magnitudeRange | list lowest and highest magnitude to return, e.g. "(12,9)" |
output_format | string Output format for schedule. Can be png, pdf, or csv |
{- "message": "string",
- "data": { },
- "status": "error"
}
Update a follow-up request
request_id required | string |
obj_id required | string ID of the target Obj. |
payload | any Content of the followup request. |
allocation_id required | integer Followup request allocation ID. |
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. |
{- "obj_id": "string",
- "payload": null,
- "allocation_id": 0,
- "target_group_ids": [
- 0
], - "status": "pending submission"
}
{- "message": "string",
- "status": "success"
}
Submit follow-up request.
obj_id required | string ID of the target Obj. |
payload | any Content of the followup request. |
allocation_id required | integer Followup request allocation ID. |
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. |
{- "obj_id": "string",
- "payload": null,
- "allocation_id": 0,
- "target_group_ids": [
- 0
], - "status": "pending submission"
}
{- "message": "string",
- "status": "success",
- "data": {
- "id": 0
}
}
Upload galaxies from GLADE+ catalog. If no file_name or file_url is provided, will look for the GLADE+ catalog in the data directory. If it can't be found, it will download it.
file_name | string Name of the file containing the galaxies (in the data directory) |
file_url | string URL of the file containing the galaxies |
{- "file_name": "string",
- "file_url": "string"
}
{- "message": "string",
- "status": "success"
}
Upload galaxies from ASCII file
catalogName | string Galaxy catalog name. |
catalogData | any Catalog data Ascii string |
{- "catalogName": "string",
- "catalogData": null
}
{- "message": "string",
- "data": [
- {
- "objects": [
- null
], - "catalog_name": "string",
- "name": "string",
- "alt_name": "string",
- "distmpc": 0,
- "distmpc_unc": 0,
- "redshift": 0,
- "redshift_error": 0,
- "sfr_fuv": 0,
- "sfr_w4": 0,
- "mstar": 0,
- "magb": 0,
- "magk": 0,
- "mag_fuv": 0,
- "mag_nuv": 0,
- "a": 0,
- "b2a": 0,
- "pa": 0,
- "btc": 0,
- "id": 0,
- "ra": 0,
- "dec": 0
}
], - "status": "success"
}