SkyPortal (0.9.dev0+git20230528.4789b2e)

Download OpenAPI specification:Download

SkyPortal provides an API to access most of its underlying functionality. To use it, you will need an API token. This can be generated via the web application from your profile page or, if you are an admin, you may use the system provisioned token stored inside of .tokens.yaml.

Accessing the SkyPortal API

Once you have a token, you may access SkyPortal programmatically as follows.

Python

import requests

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

def api(method, endpoint, data=None):
    headers = {'Authorization': f'token {token}'}
    response = requests.request(method, endpoint, json=data, headers=headers)
    return response

response = api('GET', 'http://localhost:5000/api/sysinfo')

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

Command line (curl)

curl -s -H 'Authorization: token ea70a5f0-b321-43c6-96a1-b2de225e0339' http://localhost:5000/api/sysinfo

Request parameters

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

Path parameters

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

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

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

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

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

Body parameters

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

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

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

Response

In the above examples, the SkyPortal server is located at http://localhost:5000. In case of success, the HTTP response is 200:


HTTP code: 200, OK
JSON response: {'status': 'success', 'data': {}, 'version': '0.9.dev0+git20200819.84c453a'}

On failure, it is 400; the JSON response has status="error" with the reason for the failure given in message:

{
  "status": "error",
  "message": "Invalid API endpoint",
  "data": {},
  "version": "0.9.1"
}

Pagination

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

allocations

Produce a report on allocations for an instrument

Produce a report on allocations for an instrument

path Parameters
instrument_id
required
integer
query Parameters
output_format
string

Output format for analysis. Can be png or pdf

Responses

Response samples

Content type
application/json
{
  • "message": "string",
  • "status": "success"
}

Retrieve an allocation

Retrieve an allocation

path Parameters
allocation_id
required
integer

Responses

Response samples

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

Update an allocation on a robotic instrument

Update an allocation on a robotic instrument

path Parameters
allocation_id
required
integer
Request Body schema: application/json
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

Responses

Request samples

Content type
application/json
{
  • "requests": [
    ],
  • "default_requests": [
    ],
  • "default_observation_plans": [
    ],
  • "catalog_queries": [
    ],
  • "observation_plans": [
    ],
  • "group": null,
  • "instrument": null,
  • "allocation_users": [
    ],
  • "gcn_triggers": [
    ],
  • "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"
}

Response samples

Content type
application/json
{
  • "message": "string",
  • "status": "success"
}

Delete allocation.

Delete allocation.

path Parameters
allocation_id
required
string

Responses

Response samples

Content type
application/json
{
  • "message": "string",
  • "status": "success"
}

Retrieve all allocations

Retrieve all allocations

query Parameters
instrument_id
number

Instrument ID to retrieve allocations for

Responses

Response samples

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

Post new allocation on a robotic instrument

Post new allocation on a robotic instrument

Request Body schema: application/json
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

Responses

Request samples

Content type
application/json
{
  • "requests": [
    ],
  • "default_requests": [
    ],
  • "default_observation_plans": [
    ],
  • "catalog_queries": [
    ],
  • "observation_plans": [
    ],
  • "group": null,
  • "instrument": null,
  • "allocation_users": [
    ],
  • "gcn_triggers": [
    ],
  • "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"
}

Response samples

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

Retrieve all observation analyses

Retrieve all observation analyses

query Parameters
gcnevent_id
number

GcnEvent ID to retrieve observation efficiency analyses for

Responses

Response samples

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

Retrieve all observation plan efficiency analyses

Retrieve all observation plan efficiency analyses

query Parameters
observation_plan_id
number

EventObservationPlan ID to retrieve observation plan efficiency analyses for

Responses

Response samples

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

Retrieve a default analysis

Retrieve a default analysis

path Parameters
analysis_service_id
required
any

Analysis service ID

default_analysis_id
required
any

Default analysis ID

Responses

Response samples

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

Delete a default analysis

Delete a default analysis

path Parameters
analysis_service_id
required
integer

Analysis service ID

default_analysis_id
required
integer

Default analysis ID

Responses

Response samples

Content type
application/json
{
  • "message": "string",
  • "status": "success"
}

Retrieve all default analyses

Retrieve all default analyses

path Parameters
analysis_service_id
required
any

Analysis service ID, if not provided, return all default analyses for all analysis services

Responses

Response samples

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

Get Swift LSXPS objects and post them as sources.

Get Swift LSXPS objects and post them as sources. Repeated posting will skip the existing source.

Request Body schema: application/json
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.

Responses

Request samples

Content type
application/json
{
  • "telescope_name": 0
}

Response samples

Content type
application/json
{
  • "message": "string",
  • "status": "success"
}

Get Gaia Photometric Alert objects and post them a

Get Gaia Photometric Alert objects and post them as sources. Repeated posting will skip the existing source.

Request Body schema: application/json
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.

Responses

Request samples

Content type
application/json
{
  • "telescope_name": "string",
  • "startDate": null,
  • "endDate": null
}

Response samples

Content type
application/json
{
  • "message": "string",
  • "status": "success"
}

/api/earthquake/event_id

Responses

Response samples

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

get Gaia parallax and magnitudes and post them as

get Gaia parallax and magnitudes and post them as an annotation, based on cross-match to the Gaia DR3.

path Parameters
obj_id
required
string

ID of the object to retrieve Gaia colors for

Request Body schema: application/json
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.

Responses

Request samples

Content type
application/json
{
  • "catalog": "string",
  • "crossmatchRadius": 0,
  • "crossmatchLimmag": 0,
  • "group_ids": [
    ]
}

Response samples

Content type
application/json
{
  • "message": "string",
  • "status": "success"
}

get WISE colors and post them as an annotation bas

get WISE colors and post them as an annotation based on cross-matches to some catalog (default is allwise_p3as_psd).

path Parameters
obj_id
required
string

ID of the object to retrieve WISE colors for

Request Body schema: application/json
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.

Responses

Request samples

Content type
application/json
{
  • "catalog": "string",
  • "crossmatchRadius": 0,
  • "group_ids": [
    ]
}

Response samples

Content type
application/json
{
  • "message": "string",
  • "status": "success"
}

get cross-match with Vizier and post them as an an

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

path Parameters
obj_id
required
string

ID of the object to retrieve the Vizier crossmatch for

Request Body schema: application/json
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.

Responses

Request samples

Content type
application/json
{
  • "catalog": "string",
  • "crossmatchRadius": 0,
  • "group_ids": [
    ]
}

Response samples

Content type
application/json
{
  • "message": "string",
  • "status": "success"
}

Generate a PDF/PNG finding chart for a position or

Generate a PDF/PNG finding chart for a position or Gaia ID

query Parameters
location_type
required
string
Enum: "gaia_dr3" "gaia_dr2" "pos"

What is the type of the search? From gaia or by position? If pos then ra and dec should be given. If otherwise, the catalog is queried for id catalog_id and the position information is pulled from there.

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)

Responses

Response samples

Content type
application/json
{
  • "message": "string",
  • "data": { },
  • "status": "error"
}

analysis_services

Retrieve an Analysis Service by id

Retrieve an Analysis Service by id

path Parameters
analysis_service_id
required
integer

Responses

Response samples

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

Delete an Analysis Service.

Delete an Analysis Service.

path Parameters
analysis_service_id
required
integer

Responses

Response samples

Content type
application/json
{
  • "message": "string",
  • "status": "success"
}

Retrieve all Analysis Services

Retrieve all Analysis Services

Responses

Response samples

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

analysis

Upload an upload_only analysis result

Upload an upload_only analysis result

path Parameters
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

Request Body schema: application/json
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.

Responses

Request samples

Content type
application/json
{
  • "results": { },
  • "show_parameters": true,
  • "show_plots": true,
  • "show_corner": true,
  • "group_ids": [
    ]
}

Response samples

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

Retrieve an Analysis by id

Retrieve an Analysis by id

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

query Parameters
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 is_summary set to true. Defaults to false.

includeFilename
boolean

Boolean indicating whether to include the filename of the data associated with the analysis in the response. Defaults to false.

Responses

Response samples

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

Delete an Analysis.

Delete an Analysis.

path Parameters
analysis_id
required
integer

Responses

Response samples

Content type
application/json
{
  • "message": "string",
  • "status": "success"
}

Retrieve all Analyses

Retrieve all Analyses

Responses

Response samples

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

Begin an analysis run

Begin an analysis run

path Parameters
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

Request Body schema: application/json
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.

Responses

Request samples

Content type
application/json
{
  • "show_parameters": true,
  • "show_plots": true,
  • "show_corner": true,
  • "analysis_parameters": {
    },
  • "group_ids": [
    ]
}

Response samples

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

Retrieve an Analysis by id

Retrieve an Analysis by id

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

query Parameters
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 is_summary set to true. Defaults to false.

includeFilename
boolean

Boolean indicating whether to include the filename of the data associated with the analysis in the response. Defaults to false.

Responses

Response samples

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

Delete an Analysis.

Delete an Analysis.

path Parameters
analysis_id
required
integer

Responses

Response samples

Content type
application/json
{
  • "message": "string",
  • "status": "success"
}

Retrieve all Analyses

Retrieve all Analyses

Responses

Response samples

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

Begin an analysis run

Begin an analysis run

path Parameters
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

Request Body schema: application/json
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.

Responses

Request samples

Content type
application/json
{
  • "show_parameters": true,
  • "show_plots": true,
  • "show_corner": true,
  • "analysis_parameters": {
    },
  • "group_ids": [
    ]
}

Response samples

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

Retrieve primary data associated with an Analysis.

Retrieve primary data associated with an Analysis.

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

Request Body schema: application/json
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)

Responses

Request samples

Content type
application/json
{
  • "download": null,
  • "plot_kwargs": {
    }
}

Response samples

Content type
application/json
{ }

assignments

Retrieve an observing run assignment

Retrieve an observing run assignment

path Parameters
assignment_id
required
integer

Responses

Response samples

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

Update an assignment

Update an assignment

path Parameters
assignment_id
required
integer
Request Body schema: application/json
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.

Responses

Request samples

Content type
application/json
{
  • "requester": null,
  • "last_modified_by": null,
  • "obj": null,
  • "spectra": [
    ],
  • "photometry": [
    ],
  • "photometric_series": [
    ],
  • "run": null,
  • "requester_id": 0,
  • "obj_id": "string",
  • "comment": "string",
  • "status": "string",
  • "priority": "1",
  • "run_id": 0
}

Response samples

Content type
application/json
{
  • "message": "string",
  • "status": "success"
}

Delete assignment.

Delete assignment.

path Parameters
assignment_id
required
string

Responses

Response samples

Content type
application/json
{
  • "message": "string",
  • "status": "success"
}

Retrieve all observing run assignments

Retrieve all observing run assignments

Responses

Response samples

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

Post new target assignment to observing run

Post new target assignment to observing run

Request Body schema: application/json
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

Responses

Request samples

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

Response samples

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

candidates

Retrieve a candidate

Retrieve a candidate

path Parameters
obj_id
required
string
query Parameters
includeComments
boolean

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

includeAlerts
boolean

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

Responses

Response samples

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

Check if a Candidate exists

Check if a Candidate exists

path Parameters
obj_id
required
string

Responses

Response samples

Content type
application/json
{
  • "message": "string",
  • "status": "success"
}

Delete candidate(s)

Delete candidate(s)

path Parameters
obj_id
required
string
filter_id
required
integer

Responses

Response samples

Content type
application/json
{
  • "message": "string",
  • "status": "success"
}

Retrieve all candidates

Retrieve all candidates

query Parameters
numPerPage
integer

Number of candidates to return per paginated request. Defaults to 25. Capped at 500.

pageNumber
integer

Page number for paginated query results. Defaults to 1

totalMatches
integer

Used only in the case of paginating query results - if provided, this allows for avoiding a potentially expensive query.count() call.

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 (YYYY-MM-DDTHH:MM:SS.sss). Each localization is associated with a specific GCNEvent by the date the event happened, and this date is used as a unique identifier. It can be therefore found as Localization.dateobs, queried from the /api/localization endpoint or dateobs in the GcnEvent page table.

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

Responses

Response samples

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

Create new candidate(s) (one per filter).

Create new candidate(s) (one per filter).

Request Body schema: application/json
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. {'gaia': {'info': {'Teff': 5780}}}

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:S/N = phot_detection_threshold (3.0 by default).

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.

Responses

Request samples

Content type
application/json
{
  • "host": null,
  • "comments": [
    ],
  • "reminders": [
    ],
  • "comments_on_spectra": [
    ],
  • "reminders_on_spectra": [
    ],
  • "annotations": [
    ],
  • "annotations_on_spectra": [
    ],
  • "annotations_on_photometry": [
    ],
  • "classifications": [
    ],
  • "photometry": [
    ],
  • "photstats": [
    ],
  • "photometric_series": [
    ],
  • "spectra": [
    ],
  • "thumbnails": [
    ],
  • "followup_requests": [
    ],
  • "assignments": [
    ],
  • "obj_notifications": [
    ],
  • "obj_analyses": [
    ],
  • "sources_in_gcns": [
    ],
  • "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": [
    ],
  • "sources": [
    ],
  • "users": [
    ],
  • "filter_ids": [
    ],
  • "passing_alert_id": 0,
  • "passed_at": "string"
}

Response samples

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

Create new candidate(s) (one per filter).

Create new candidate(s) (one per filter).

Request Body schema: application/json
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. {'gaia': {'info': {'Teff': 5780}}}

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:S/N = phot_detection_threshold (3.0 by default).

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.

Responses

Request samples

Content type
application/json
{
  • "host": null,
  • "comments": [
    ],
  • "reminders": [
    ],
  • "comments_on_spectra": [
    ],
  • "reminders_on_spectra": [
    ],
  • "annotations": [
    ],
  • "annotations_on_spectra": [
    ],
  • "annotations_on_photometry": [
    ],
  • "classifications": [
    ],
  • "photometry": [
    ],
  • "photstats": [
    ],
  • "photometric_series": [
    ],
  • "spectra": [
    ],
  • "thumbnails": [
    ],
  • "followup_requests": [
    ],
  • "assignments": [
    ],
  • "obj_notifications": [
    ],
  • "obj_analyses": [
    ],
  • "sources_in_gcns": [
    ],
  • "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": [
    ],
  • "sources": [
    ],
  • "users": [
    ],
  • "filter_ids": [
    ],
  • "passing_alert_id": 0,
  • "passed_at": "string"
}

Response samples

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

Delete candidate(s)

Delete candidate(s)

path Parameters
obj_id
required
string
filter_id
required
integer

Responses

Response samples

Content type
application/json
{
  • "message": "string",
  • "status": "success"
}

catalog_queries

Submit catalog queries

Submit catalog queries

Request Body schema: application/json
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.

Responses

Request samples

Content type
application/json
{
  • "status": "pending submission",
  • "target_group_ids": [
    ],
  • "allocation_id": 0,
  • "payload": null
}

Response samples

Content type
application/json
{
  • "message": "string",
  • "status": "success"
}

classifications

Vote for a classification.

Vote for a classification.

path Parameters
classification_id
required
string

ID of classification to indicate the vote for

Request Body schema: application/json
vote
required
integer

Upvote or downvote a classification

Responses

Request samples

Content type
application/json
{
  • "vote": 0
}

Response samples

Content type
application/json
{
  • "message": "string",
  • "status": "success"
}

Delete classification vote.

Delete classification vote.

path Parameters
classification_id
required
string

Responses

Response samples

Content type
application/json
{
  • "message": "string",
  • "status": "success"
}

Retrieve a classification

Retrieve a classification

path Parameters
classification_id
required
integer
query Parameters
includeTaxonomy
boolean

Return associated taxonomy.

Responses

Response samples

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

Update a classification

Update a classification

path Parameters
classification
required
integer
Request Body schema: application/json
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.

Responses

Request samples

Content type
application/json
{
  • "taxonomy": null,
  • "author": null,
  • "obj": null,
  • "groups": [
    ],
  • "votes": [
    ],
  • "classification": "string",
  • "taxonomy_id": 0,
  • "probability": 0,
  • "author_id": 0,
  • "author_name": "string",
  • "obj_id": "string",
  • "group_ids": [
    ]
}

Response samples

Content type
application/json
{
  • "message": "string",
  • "status": "success"
}

Delete a classification

Delete a classification

path Parameters
classification_id
required
integer
Request Body schema: application/json
label
boolean or null

Add label associated with classification.

Responses

Request samples

Content type
application/json
{
  • "label": true
}

Response samples

Content type
application/json
{
  • "message": "string",
  • "status": "success"
}

Retrieve all classifications

Retrieve all classifications

query Parameters
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

Responses

Response samples

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

Post a classification

Post a classification

Request Body schema: application/json
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.

Responses

Request samples

Content type
application/json
{
  • "obj_id": "string",
  • "classification": "string",
  • "taxonomy_id": 0,
  • "probability": null,
  • "group_ids": [
    ],
  • "vote": true,
  • "label": true
}

Response samples

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

Retrieve an object's classifications

Retrieve an object's classifications

path Parameters
obj_id
required
string

Responses

Response samples

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

Delete all of an object's classifications

Delete all of an object's classifications

path Parameters
classification_id
required
integer
Request Body schema: application/json
label
boolean or null

Add label associated with classification.

Responses

Request samples

Content type
application/json
{
  • "label": true
}

Response samples

Content type
application/json
{
  • "message": "string",
  • "status": "success"
}

classification_votes

Vote for a classification.

Vote for a classification.

path Parameters
classification_id
required
string

ID of classification to indicate the vote for

Request Body schema: application/json
vote
required
integer

Upvote or downvote a classification

Responses

Request samples

Content type
application/json
{
  • "vote": 0
}

Response samples

Content type
application/json
{
  • "message": "string",
  • "status": "success"
}

Delete classification vote.

Delete classification vote.

path Parameters
classification_id
required
string

Responses

Response samples

Content type
application/json
{
  • "message": "string",
  • "status": "success"
}

source

find the sources with classifications

find the sources with classifications

query Parameters
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

Responses

Response samples

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

find the number of sources with and without a Heal

find the number of sources with and without a Healpix value

Responses

Response samples

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

system_info

Retrieve enum types in the DB

Retrieve enum types in the DB

Responses

Response samples

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

Retrieve basic DB statistics

Retrieve basic DB statistics

Responses

Response samples

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

Retrieve system/deployment info

Retrieve system/deployment info

Responses

Response samples

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

default_followup_requests

Retrieve a single default follow-up request

Retrieve a single default follow-up request

path Parameters
default_followup_request_id
required
integer

Responses

Response samples

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

filters

Delete a default follow-up request

Delete a default follow-up request

path Parameters
default_followup_request_id
required
integer

Responses

Response samples

Content type
application/json
{
  • "message": "string",
  • "status": "success"
}

Retrieve all default follow-up requests

Retrieve all default follow-up requests

Responses

Response samples

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

Delete a default observation plan

Delete a default observation plan

path Parameters
default_observation_plan_id
required
integer

Responses

Response samples

Content type
application/json
{
  • "message": "string",
  • "status": "success"
}

Retrieve all default observation plans

Retrieve all default observation plans

Responses

Response samples

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

Delete a default survey efficiency

Delete a default survey efficiency

path Parameters
default_survey_efficiency_id
required
integer

Responses

Response samples

Content type
application/json
{
  • "message": "string",
  • "status": "success"
}

Retrieve all default survey efficiencies

Retrieve all default survey efficiencies

Responses

Response samples

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

Retrieve a filter

Retrieve a filter

path Parameters
filter_id
required
integer

Responses

Response samples

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

Delete a filter

Delete a filter

path Parameters
filter_id
required
integer

Responses

Response samples

Content type
application/json
{
  • "message": "string",
  • "status": "success"
}

Update filter name

Update filter name

path Parameters
filter_id
required
integer
Request Body schema: application/json
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.

Responses

Request samples

Content type
application/json
{
  • "stream": null,
  • "group": null,
  • "candidates": [
    ],
  • "name": "string",
  • "stream_id": 0,
  • "group_id": 0
}

Response samples

Content type
application/json
{
  • "message": "string",
  • "status": "success"
}

Retrieve all filters

Retrieve all filters

Responses

Response samples

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

POST a new filter.

POST a new filter.

Request Body schema: application/json
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.

Responses

Request samples

Content type
application/json
{
  • "stream": null,
  • "group": null,
  • "candidates": [
    ],
  • "name": "string",
  • "stream_id": 0,
  • "group_id": 0
}

Response samples

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

default_followup_request

Create default follow-up request.

Create default follow-up request.

Request Body schema: application/json
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.

Responses

Request samples

Content type
application/json
{
  • "target_group_ids": [
    ],
  • "allocation_id": 0,
  • "payload": null
}

Response samples

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

default_observation_plans

Retrieve a single default observation plan

Retrieve a single default observation plan

path Parameters
default_observation_plan_id
required
integer

Responses

Response samples

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

default_observation_plan

Create default observation plan requests.

Create default observation plan requests.

Request Body schema: application/json
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.

Responses

Request samples

Content type
application/json
{
  • "target_group_ids": [
    ],
  • "allocation_id": 0,
  • "payload": null
}

Response samples

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

default_survey_efficiencys

Retrieve a single default survey efficiency

Retrieve a single default survey efficiency

path Parameters
default_survey_efficiency_id
required
integer

Responses

Response samples

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

default_survey_efficiency

Create default survey efficiency requests.

Create default survey efficiency requests.

Request Body schema: application/json
default_observationplan_request_id
required
integer

Default observation plan request ID.

payload
any

Content of the default survey efficiency analysis.

Responses

Request samples

Content type
application/json
{
  • "default_observationplan_request_id": 0,
  • "payload": null
}

Response samples

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

facility

Post a message from a remote facility

Post a message from a remote facility

Request Body schema: application/json
One of
new_status
required
string
followup_request_id
required
integer

Responses

Request samples

Content type
application/json
{
  • "new_status": "string",
  • "followup_request_id": 0
}

Response samples

Content type
application/json
{
  • "message": "string",
  • "status": "success"
}

followup_requests

Add follow-up request to watch list

Add follow-up request to watch list

path Parameters
followup_request_id
required
integer

Responses

Response samples

Content type
application/json
{
  • "message": "string",
  • "status": "success"
}

Delete follow-up request from watch list

Delete follow-up request from watch list

path Parameters
followup_request_id
required
integer

Responses

Response samples

Content type
application/json
{
  • "message": "string",
  • "status": "success"
}

Retrieve followup requests schedule

Retrieve followup requests schedule

query Parameters
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

Responses

Response samples

Content type
application/json
{
  • "message": "string",
  • "data": { },
  • "status": "error"
}

Reprioritize followup requests schedule automatica

Reprioritize followup requests schedule automatically based on either magnitude or location within skymap.

Responses

Response samples

Content type
application/json
{
  • "message": "string",
  • "status": "success"
}

Update a follow-up request

Update a follow-up request

path Parameters
request_id
required
string
Request Body schema: application/json
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.

Responses

Request samples

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

Response samples

Content type
application/json
{
  • "message": "string",
  • "status": "success"
}

Delete follow-up request.

Delete follow-up request.

path Parameters
request_id
required
string

Responses

Response samples

Content type
application/json
{
  • "message": "string",
  • "status": "success"
}

Submit follow-up request.

Submit follow-up request.

Request Body schema: application/json
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.

Responses

Request samples

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

Response samples

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

Get photometry request.

Get photometry request.

path Parameters
request_id
required
string

Responses

Response samples

Content type
application/json
{
  • "message": "string",
  • "status": "success"
}

galaxys

Upload galaxies from GLADE+ catalog. If no file_na

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.

Request Body schema: application/json
file_name
string

Name of the file containing the galaxies (in the data directory)

file_url
string

URL of the file containing the galaxies

Responses

Request samples

Content type
application/json
{
  • "file_name": "string",
  • "file_url": "string"
}

Response samples

Content type
application/json
{
  • "message": "string",
  • "status": "success"
}

Upload galaxies from ASCII file

Upload galaxies from ASCII file

Request Body schema: application/json
catalogName
string

Galaxy catalog name.

catalogData
any

Catalog data Ascii string

Responses

Request samples

Content type
application/json
{
  • "catalogName": "string",
  • "catalogData": null
}

Response samples

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

Set an object's host galaxy

Set an object's host galaxy

path Parameters
obj_id
required
string
Request Body schema: application/json
galaxyName
required
string

Name of the galaxy to associate with the object

Responses