SkyPortal (0.9.dev0+git20230606.d1ecac3)

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

Update an allocation on a robotic instrument

Update an allocation on a robotic instrument

path Parameters
allocation_id
required
integer
Request Body schema: application/json
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
{
  • "data": [
    ],
  • "message": "string",
  • "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
{
  • "data": [
    ],
  • "message": "string",
  • "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
{
  • "data": [
    ],
  • "message": "string",
  • "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
{
  • "data": {
    },
  • "message": "string",
  • "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
{
  • "data": [
    ],
  • "message": "string",
  • "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.

groupIDs
object

If provided, save to these group IDs.

Responses

Request samples

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

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.

groupIDs
object

If provided, save to these group IDs.

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

Post new target assignment to observing run

Post new target assignment to observing run

Request Body schema: application/json
priority
required
any
Enum: "1" "2" "3" "4" "5"

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

run_id
required
integer
status
string

The status of the request

comment
string

An optional comment describing the request.

obj_id
required
string

The ID of the object to observe.

Responses

Request samples

Content type
application/json
{
  • "priority": "1",
  • "run_id": 0,
  • "status": "string",
  • "comment": "string",
  • "obj_id": "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
{
  • "data": {
    },
  • "message": "string",
  • "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
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
string
Default: "pending submission"

The status of the request.

Responses

Request samples

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

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

origin
string or null

String describing the source of this classification.

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",
  • "origin": "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
origin
string

String describing the source of this classification.

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

Retrieve a filter

Retrieve a filter

path Parameters
filter_id
required
integer

Responses

Response samples

Content type
application/json
{
  • "data": {
    },
  • "message": "string",
  • "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
{
  • "data": [
    ],
  • "message": "string",
  • "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
{
  • "data": {
    },
  • "message": "string",
  • "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
{
  • "data": {
    },
  • "message": "string",
  • "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
{
  • "data": { },
  • "message": "string",
  • "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
target_group_ids
Array of integers

IDs of groups to share the results of the followup request with.

allocation_id
required
integer

Followup request allocation ID.

status
string
Default: "pending submission"

The status of the request.

obj_id
required
string

ID of the target Obj.

payload
any

Content of the followup request.

Responses

Request samples

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

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

IDs of groups to share the results of the followup request with.

allocation_id
required
integer

Followup request allocation ID.

status
string
Default: "pending submission"

The status of the request.

obj_id
required
string

ID of the target Obj.

payload
any

Content of the followup request.

Responses

Request samples

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

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

Request samples

Content type
application/json
{
  • "galaxyName": "string"
}

Response samples

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

Delete an object's host galaxy

Delete an object's host galaxy

path Parameters
obj_id
required
string

Responses

Response samples

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

Upload spatial catalog from ASCII file

Upload spatial catalog from ASCII file

Request Body schema: application/json
catalogName
string

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

galaxies

Retrieve all galaxies

Retrieve all galaxies

query Parameters
catalog_name
string

Filter by catalog name (exact match)

minDistance
number

If provided, return only galaxies with a distance of at least this value

maxDistance
number

If provided, return only galaxies with a distance of at most this value

minRedshift
number

If provided, return only galaxies with a redshift of at least this value

maxRedshift
number

If provided, return only galaxies with a redshift of at most this value

localizationDateobs
string

Event time in ISO 8601 format (YYYY-MM-DDTHH:MM:SS.sss).

localizationName
string

Name of localization / skymap to use. Can be found in Localization.localization_name queried from /api/localization endopoint or skymap name in GcnEvent page table.

localizationCumprob
number

Cumulative probability up to which to include galaxies

includeGeoJSON
boolean

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

numPerPage
integer

Number of galaxies to return per paginated request. Defaults to 100. Can be no larger than {MAX_OBSERVATIONS}.

pageNumber
integer

Page number for paginated query results. Defaults to 1

catalogNamesOnly
boolean

Boolean indicating whether to just return catalog names. Defaults to false.

returnProbability
boolean

Boolean indicating whether to return probability density. Defaults to false.

Responses

Response samples

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

Ingest a Galaxy catalog

Ingest a Galaxy catalog

Request Body schema: application/json
catalog_data
Array of any

Galaxy catalog data

catalog_name
string

Galaxy catalog name.

Responses

Request samples

Content type
application/json
{
  • "catalog_data": [
    ],
  • "catalog_name": "string"
}

Response samples

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

Ingest a Spatial Catalog

Ingest a Spatial Catalog

Request Body schema: application/json
catalog_data
Array of any

Spatial catalog data

catalog_name
string

Spatial catalog name.

Responses

Request samples

Content type
application/json
{
  • "catalog_data": [
    ],
  • "catalog_name": "string"
}

Response samples

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

instruments

Delete a galaxy catalog

Delete a galaxy catalog

path Parameters
catalog_name
required
str

Responses

Response samples

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

Compute instrument field probabilities for a skyma

Compute instrument field probabilities for a skymap

path Parameters
dateobs
required
string
Instrument ID
required
integer
query Parameters
localization_name
required
string

Localization map name

integrated_probability
float

Cumulative integrated probability threshold

Responses

Response samples

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

Delete fields associated with an instrument

Delete fields associated with an instrument

path Parameters
instrument_id
required
integer

Responses

Response samples

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

Add log messages from an instrument

Add log messages from an instrument

path Parameters
instrument_id
required
integer

The instrument ID to post logs for

Request Body schema: application/json
start_date
required
string

Arrow-parseable date string (e.g. 2020-01-01).

end_date
required
string

Arrow-parseable date string (e.g. 2020-01-01).

logs
required
object

Nested JSON containing the log messages.

Responses

Request samples

Content type
application/json
{
  • "start_date": "string",
  • "end_date": "string",
  • "logs": { }
}

Response samples

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

Retrieve an instrument

Retrieve an instrument

path Parameters
instrument_id
required
integer
query Parameters
includeGeoJSON
boolean

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

includeGeoJSONSummary
boolean

Boolean indicating whether to include associated GeoJSON summary bounding box. Defaults to false.

includeRegion
boolean

Boolean indicating whether to include associated DS9 region. Defaults to false.

localizationDateobs
string

Include fields within a given localization. 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 fields. Defaults to 0.95.

Responses

Response samples

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

Update instrument

Update instrument

path Parameters
instrument_id
required
integer
Request Body schema: application/json
telescope
any or null

The Telescope that hosts the Instrument.

photometry
Array of any
photometric_series
Array of any
spectra
Array of any
allocations
Array of any
observing_runs
Array of any
observations
Array of any
queued_observations
Array of any
fields
Array of any
tiles
Array of any
plans
Array of any
logs
Array of any
name
required
string

Instrument name.

type
required
string <= 20 characters
Enum: "imager" "spectrograph" "imaging spectrograph"

Instrument type, one of Imager, Spectrograph, or Imaging Spectrograph.

band
string or null

The spectral band covered by the instrument (e.g., Optical, IR).

telescope_id
required
integer

The ID of the Telescope that hosts the Instrument.

filters
Array of any

List of filters on the instrument (if any).

sensitivity_data
any or null

JSON describing the filters on the instrument and the filter's corresponding limiting magnitude and exposure time.

configuration_data
any or null

JSON describing instrument configuration properties such as instrument overhead, filter change time, readout, etc.

api_classname
string or null <= 17 characters
Enum: "MMAAPI" "GENERICAPI" "SLACKAPI" "ATLASAPI" "GROWTHINDIAMMAAPI" "KAITAPI" "SEDMAPI" "SEDMV2API" "IOOAPI" "IOIAPI" "SPRATAPI" "SINISTROAPI" "SPECTRALAPI" "FLOYDSAPI" "MUSCATAPI" "NICERAPI" "PS1API" "UVOTXRTAPI" "UVOTXRTMMAAPI" "TESSAPI" "ZTFAPI" "ZTFMMAAPI"

Name of the instrument's API class.

api_classname_obsplan
string or null <= 17 characters
Enum: "MMAAPI" "GENERICAPI" "SLACKAPI" "ATLASAPI" "GROWTHINDIAMMAAPI" "KAITAPI" "SEDMAPI" "SEDMV2API" "IOOAPI" "IOIAPI" "SPRATAPI" "SINISTROAPI" "SPECTRALAPI" "FLOYDSAPI" "MUSCATAPI" "NICERAPI" "PS1API" "UVOTXRTAPI" "UVOTXRTMMAAPI" "TESSAPI" "ZTFAPI" "ZTFMMAAPI"

Name of the instrument's ObservationPlan API class.

listener_classname
string or null <= 12 characters
Value: "SEDMListener"

Name of the instrument's listener class.

treasuremap_id
integer or null

treasuremap.space API ID for this instrument

tns_id
integer or null

TNS API ID for this instrument

region
string or null

Instrument astropy.regions representation.

has_fields
boolean

Whether the instrument has fields or not.

has_region
boolean

Whether the instrument has a region or not.

Responses

Request samples

Content type
application/json
{
  • "telescope": null,
  • "photometry": [
    ],
  • "photometric_series": [
    ],
  • "spectra": [
    ],
  • "allocations": [
    ],
  • "observing_runs": [
    ],
  • "observations": [
    ],
  • "queued_observations": [
    ],
  • "fields": [
    ],
  • "tiles": [
    ],
  • "plans": [
    ],
  • "logs": [
    ],
  • "name": "string",
  • "type": "imager",
  • "band": "string",
  • "telescope_id": 0,
  • "filters": [
    ],
  • "sensitivity_data": null,
  • "configuration_data": null,
  • "api_classname": "MMAAPI",
  • "api_classname_obsplan": "MMAAPI",
  • "listener_classname": "SEDMListener",
  • "treasuremap_id": 0,
  • "tns_id": 0,
  • "region": "string",
  • "has_fields": true,
  • "has_region": true
}

Response samples

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

Delete an instrument

Delete an instrument

path Parameters
instrument_id
required
integer
query Parameters
fieldsOnly
boolean

Boolean indicating whether to just delete the associated fields. Defaults to false.

Responses

Response samples

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

Retrieve all instruments

Retrieve all instruments

query Parameters
name
string

Filter by name (exact match)

includeGeoJSON
boolean

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

includeGeoJSONSummary
boolean

Boolean indicating whether to include associated GeoJSON summary bounding box. Defaults to false.

includeRegion
boolean

Boolean indicating whether to include associated DS9 region. Defaults to false.

localizationDateobs
string

Include fields within a given localization. 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 fields. Defaults to 0.95.

airmassTime
string

Time to use for airmass calculation in ISO 8601 format (YYYY-MM-DDTHH:MM:SS.sss). Defaults to localizationDateobs if not supplied.

Responses

Response samples

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

Add a new instrument

Add a new instrument

Request Body schema: application/json
telescope
any or null

The Telescope that hosts the Instrument.

photometry
Array of any
photometric_series
Array of any
spectra
Array of any
allocations
Array of any
observing_runs
Array of any
observations
Array of any
queued_observations
Array of any
fields
Array of any
tiles
Array of any
plans
Array of any
logs
Array of any
name
required
string

Instrument name.

type
required
string <= 20 characters
Enum: "imager" "spectrograph" "imaging spectrograph"

Instrument type, one of Imager, Spectrograph, or Imaging Spectrograph.

band
string or null

The spectral band covered by the instrument (e.g., Optical, IR).

telescope_id
required
integer

The ID of the Telescope that hosts the Instrument.

filters
Array of strings
Default: []
Items Enum: "bessellux" "bessellb" "bessellv" "bessellr" "besselli" "standard::u" "standard::b" "standard::v" "standard::r" "standard::i" "desu" "desg" "desr" "desi" "desz" "desy" "sdssu" "sdssg" "sdssr" "sdssi" "sdssz" "f435w" "f475w" "f555w" "f606w" "f625w" "f775w" "f850lp" "nicf110w" "nicf160w" "f098m" "f105w" "f110w" "f125w" "f127m" "f139m" "f140w" "f153m" "f160w" "f218w" "f225w" "f275w" "f300x" "f336w" "f350lp" "f390w" "f689m" "f763m" "f845m" "f438w" "uvf475w" "uvf555w" "uvf606w" "uvf625w" "uvf775w" "uvf814w" "uvf850lp" "kepler" "cspb" "csphs" "csphd" "cspjs" "cspjd" "cspv3009" "cspv3014" "cspv9844" "cspys" "cspyd" "cspg" "cspi" "cspk" "cspr" "cspu" "f070w" "f090w" "f115w" "f150w" "f200w" "f277w" "f356w" "f444w" "f140m" "f162m" "f182m" "f210m" "f250m" "f300m" "f335m" "f360m" "f410m" "f430m" "f460m" "f480m" "f560w" "f770w" "f1000w" "f1130w" "f1280w" "f1500w" "f1800w" "f2100w" "f2550w" "f1065c" "f1140c" "f1550c" "f2300c" "lsstu" "lsstg" "lsstr" "lssti" "lsstz" "lssty" "keplercam::us" "keplercam::b" "keplercam::v" "keplercam::r" "keplercam::i" "4shooter2::us" "4shooter2::b" "4shooter2::v" "4shooter2::r" "4shooter2::i" "f062" "f087" "f106" "f129" "f158" "f184" "f213" "f146" "ztfg" "ztfr" "ztfi" "uvot::b" "uvot::u" "uvot::uvm2" "uvot::uvw1" "uvot::uvw2" "uvot::v" "uvot::white" "ps1::open" "ps1::g" "ps1::r" "ps1::i" "ps1::z" "ps1::y" "ps1::w" "atlasc" "atlaso" "2massj" "2massh" "2massks" "gaia::gbp" "gaia::g" "gaia::grp" "gaia::grvs" "tess" "swiftxrt" "nicerxti"

List of filters on the instrument (if any).

object or null

JSON describing the filters on the instrument and the filter's corresponding limiting magnitude and exposure time.

object or null

JSON describing instrument configuration properties such as instrument overhead, filter change time, readout, etc.

api_classname
string or null <= 17 characters
Enum: "MMAAPI" "GENERICAPI" "SLACKAPI" "ATLASAPI" "GROWTHINDIAMMAAPI" "KAITAPI" "SEDMAPI" "SEDMV2API" "IOOAPI" "IOIAPI" "SPRATAPI" "SINISTROAPI" "SPECTRALAPI" "FLOYDSAPI" "MUSCATAPI" "NICERAPI" "PS1API" "UVOTXRTAPI" "UVOTXRTMMAAPI" "TESSAPI" "ZTFAPI" "ZTFMMAAPI"

Name of the instrument's API class.

api_classname_obsplan
string or null <= 17 characters
Enum: "MMAAPI" "GENERICAPI" "SLACKAPI" "ATLASAPI" "GROWTHINDIAMMAAPI" "KAITAPI" "SEDMAPI" "SEDMV2API" "IOOAPI" "IOIAPI" "SPRATAPI" "SINISTROAPI" "SPECTRALAPI" "FLOYDSAPI" "MUSCATAPI" "NICERAPI" "PS1API" "UVOTXRTAPI" "UVOTXRTMMAAPI" "TESSAPI" "ZTFAPI" "ZTFMMAAPI"

Name of the instrument's ObservationPlan API class.

listener_classname
string or null <= 12 characters
Value: "SEDMListener"

Name of the instrument's listener class.

treasuremap_id
integer or null

treasuremap.space API ID for this instrument

tns_id
integer or null

TNS API ID for this instrument

region
string or null

Instrument astropy.regions representation.

has_fields
boolean

Whether the instrument has fields or not.

has_region
boolean

Whether the instrument has a region or not.

field_data
dict

List of ID, RA, and Dec for each field.

field_region
str

Serialized version of a regions.Region describing the shape of the instrument field. Note: should only include field_region or field_fov_type.

references
dict

List of filter, and limiting magnitude for each reference.

field_fov_type
str

Option for instrument field shape. Must be either circle or rectangle. Note: should only include field_region or field_fov_type.

field_fov_attributes
list

Option for instrument field shape parameters. Single float radius in degrees in case of circle or list of two floats (height and width) in case of a rectangle.

Responses

Request samples

Content type
application/json
{
  • "telescope": null,
  • "photometry": [
    ],
  • "photometric_series": [
    ],
  • "spectra": [
    ],
  • "allocations": [
    ],
  • "observing_runs": [
    ],
  • "observations": [
    ],
  • "queued_observations": [
    ],
  • "fields": [
    ],
  • "tiles": [
    ],
  • "plans": [
    ],
  • "logs": [
    ],
  • "name": "string",
  • "type": "imager",
  • "band": "string",
  • "telescope_id": 0,
  • "filters": [
    ],
  • "sensitivity_data": {
    },
  • "configuration_data": {
    },
  • "api_classname": "MMAAPI",
  • "api_classname_obsplan": "MMAAPI",
  • "listener_classname": "SEDMListener",
  • "treasuremap_id": 0,
  • "tns_id": 0,
  • "region": "string",
  • "has_fields": true,
  • "has_region": true,
  • "field_data": null,
  • "field_region": null,
  • "references": null,
  • "field_fov_type": null,
  • "field_fov_attributes": null
}

Response samples

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

Delete a spatial catalog

Delete a spatial catalog

path Parameters
catalog_id
required
integer

Responses

Response samples

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

earthquakeevents

Perform a prediction analysis for the earthquake.

Perform a prediction analysis for the earthquake.

path Parameters
earthquake_id
required
string
mma_detector_id
required
string

Responses

Response samples

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

Retrieve a ground velocity measurement for the ear

Retrieve a ground velocity measurement for the earthquake.

path Parameters
earthquake_id
required
string
mma_detector_id
required
string

Responses

Response samples

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

Provide a ground velocity measurement for the eart

Provide a ground velocity measurement for the earthquake.

path Parameters
earthquake_id
required
string
mma_detector_id
required
string

Responses

Response samples

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

Delete a ground velocity measurement for the earth

Delete a ground velocity measurement for the earthquake.

path Parameters
earthquake_id
required
string
mma_detector_id
required
string

Responses

Response samples

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

Update a ground velocity measurement for the earth

Update a ground velocity measurement for the earthquake.

path Parameters
earthquake_id
required
string
mma_detector_id
required
string

Responses

Response samples

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

Get all Earthquake status tags

Get all Earthquake status tags

Responses

Response samples

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

Delete an Earthquake event

Delete an Earthquake event

path Parameters
event_id
required
integer

Responses

Response samples

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

Retrieve multiple Earthquake events

Retrieve multiple Earthquake events

query Parameters
startDate
string

Arrow-parseable date string (e.g. 2020-01-01). If provided, filter by date >= startDate

endDate
string

Arrow-parseable date string (e.g. 2020-01-01). If provided, filter by date <= endDate

statusKeep
string

Earthquake Status to match against

statusRemove
string

Earthquake Status to filter out

numPerPage
integer

Number of earthquakes. Defaults to 100.

pageNumber
integer

Page number for iterating through all earthquakes. Defaults to 1

Ingest EarthquakeEvent

Ingest EarthquakeEvent

Request Body schema: application/json
sent_by
any or null

The user that saved this EarthquakeEvent

notices
Array of any
predictions
Array of any
measurements
Array of any
comments
Array of any
reminders
Array of any
sent_by_id
required
integer

The ID of the User who created this GcnTag.

event_id
required
string
event_uri
string or null
status
string

The status of the earthquake event.

Responses

Request samples

Content type
application/json
{
  • "sent_by": null,
  • "notices": [
    ],
  • "predictions": [
    ],
  • "measurements": [
    ],
  • "comments": [
    ],
  • "reminders": [
    ],
  • "sent_by_id": 0,
  • "event_id": "string",
  • "event_uri": "string",
  • "status": "string"
}

Response samples

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

comments

Retrieve all comments associated with specified re

Retrieve all comments associated with specified resource

path Parameters
associated_resource_type
required
string
Value: "sources"

What underlying data the comment is on, e.g., "sources" or "spectra" or "gcn_event" or "earthquake" or "shift".

resource_id
required
string

The ID of the underlying data. This would be a string for a source ID or an integer for other data types like spectrum, gcn_event, earthquake, or shift.

Responses

Response samples

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

Update a comment

Update a comment

path Parameters
associated_resource_type
required
string
Enum: "sources" "spectrum" "gcn_event" "shift"

What underlying data the comment is on: "sources" or "spectra" or "gcn_event" or "shift".

resource_id
required
string
Enum: "sources" "spectra" "gcn_event" "shift"

The ID of the source or spectrum that the comment is posted to. This would be a string for an object ID or an integer for a spectrum, gcn_event or shift.

comment_id
required
integer
Request Body schema: application/json
obj
any or null

The Comment's Obj.

author
any or null

Comment's author.

groups
Array of any
obj_id
required
string

ID of the Comment's Obj.

text
required
string

Comment body.

attachment_name
string or null

Filename of the attachment.

_attachment_path
string or null

file path where the data of the attachment is saved.

origin
string or null

Comment origin.

bot
boolean

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

attachment_bytes
string or null

Binary representation of the attachment.

author_id
required
integer

ID of the Comment author's User instance.

group_ids
Array of integers

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

Responses

Request samples

Content type
application/json
{
  • "obj": null,
  • "author": null,
  • "groups": [
    ],
  • "obj_id": "string",
  • "text": "string",
  • "attachment_name": "string",
  • "_attachment_path": "string",
  • "origin": "string",
  • "bot": true,
  • "attachment_bytes": "string",
  • "author_id": 0,
  • "group_ids": [
    ]
}

Response samples

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

Post a comment

Post a comment

path Parameters
associated_resource_type
required
string
Enum: "sources" "spectrum" "gcn_event" "earthquake" "shift"

What underlying data the comment is on: "source" or "spectrum" or "gcn_event" or "earthquake" or "shift".

resource_id
required
string
Enum: "sources" "spectra" "gcn_event" "earthquake" "shift"

The ID of the source or spectrum that the comment is posted to. This would be a string for a source ID or an integer for a spectrum, gcn_event, earthquake, or shift.

Request Body schema: application/json
text
required
string
group_ids
Array of integers

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

object

Responses

Request samples

Content type
application/json
{
  • "text": "string",
  • "group_ids": [
    ],
  • "attachment": {
    }
}

Response samples

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

Delete a comment

Delete a comment

path Parameters
associated_resource_type
required
string

What underlying data the comment is on: "sources" or "spectra".

resource_id
required
string
Enum: "sources" "spectra" "gcn_event"

The ID of the source or spectrum that the comment is posted to. This would be a string for a source ID or an integer for a spectrum or gcn_event.

comment_id
required
integer

Responses

Response samples

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

Retrieve a comment

Retrieve a comment

path Parameters
associated_resource_type
required
string

What underlying data the comment is on: "sources" or "spectra" or "gcn_event" or "earthquake" or "shift".

resource_id
required
string
Enum: "sources" "spectra" "gcn_event"

The ID of the source, spectrum, gcn_event, earthquake, or shift that the comment is posted to. This would be a string for a source ID or an integer for a spectrum, gcn_event, earthquake, or shift.

comment_id
required
integer

Responses

Response samples

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

Update a comment

Update a comment

path Parameters
associated_resource_type
required
string
Enum: "sources" "spectrum" "gcn_event" "shift"

What underlying data the comment is on: "sources" or "spectra" or "gcn_event" or "shift".

resource_id
required
string
Enum: "sources" "spectra" "gcn_event" "shift"

The ID of the source or spectrum that the comment is posted to. This would be a string for an object ID or an integer for a spectrum, gcn_event or shift.

comment_id
required
integer
Request Body schema: application/json
obj
any or null

The Comment's Obj.

author
any or null

Comment's author.

groups
Array of any
obj_id
required
string

ID of the Comment's Obj.

text
required
string

Comment body.

attachment_name
string or null

Filename of the attachment.

_attachment_path
string or null

file path where the data of the attachment is saved.

origin
string or null

Comment origin.

bot
boolean

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

attachment_bytes
string or null

Binary representation of the attachment.

author_id
required
integer

ID of the Comment author's User instance.

group_ids
Array of integers

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

Responses

Request samples

Content type
application/json
{
  • "obj": null,
  • "author": null,
  • "groups": [
    ],
  • "obj_id": "string",
  • "text": "string",
  • "attachment_name": "string",
  • "_attachment_path": "string",
  • "origin": "string",
  • "bot": true,
  • "attachment_bytes": "string",
  • "author_id": 0,
  • "group_ids": [
    ]
}

Response samples

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

Delete a comment

Delete a comment

path Parameters
associated_resource_type
required
string

What underlying data the comment is on: "sources" or "spectra".

resource_id
required
string
Enum: "sources" "spectra" "gcn_event"

The ID of the source or spectrum that the comment is posted to. This would be a string for a source ID or an integer for a spectrum or gcn_event.

comment_id
required
integer

Responses

Response samples

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

Download comment attachment

Download comment attachment

path Parameters
associated_resource_type
required
string
Enum: "sources" "spectrum" "gcn_event"

What underlying data the comment is on: "sources" or "spectra".

resource_id
required
string
Enum: "sources" "spectra" "gcn_event"

The ID of the source or spectrum that the comment is posted to. This would be a string for a source ID or an integer for a spectrum.

comment_id
required
integer
query Parameters
download
boolean

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

preview
boolean

If true, return an attachment preview. False by default.

Responses

Response samples

Content type
No sample

Download comment attachment

Download comment attachment

path Parameters
associated_resource_type
required
string
Enum: "sources" "spectrum" "gcn_event"

What underlying data the comment is on: "sources" or "spectra".

resource_id
required
string
Enum: "sources" "spectra" "gcn_event"

The ID of the source or spectrum that the comment is posted to. This would be a string for a source ID or an integer for a spectrum.

comment_id
required
integer
query Parameters
download
boolean

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

preview
boolean

If true, return an attachment preview. False by default.

Responses

Response samples

Content type
No sample

find the number of comments with and without attac

find the number of comments with and without attachment_bytes

Responses

Response samples

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

create attachments for a batch of comments with at

create attachments for a batch of comments with attachment_bytes

query Parameters
numPerPage
integer

Number of comments to check for updates. Defaults to 100. Max 500.

pageNumber
integer

Page number for iterating through all comments. Defaults to 1

Responses

Response samples

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

spectra

Retrieve all comments associated with specified re

Retrieve all comments associated with specified resource

path Parameters
associated_resource_type
required
string
Value: "sources"

What underlying data the comment is on, e.g., "sources" or "spectra" or "gcn_event" or "earthquake" or "shift".

resource_id
required
string

The ID of the underlying data. This would be a string for a source ID or an integer for other data types like spectrum, gcn_event, earthquake, or shift.

Responses

Response samples

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

Retrieve all annotations associated with specified

Retrieve all annotations associated with specified resource

path Parameters
associated_resource_type
required
string
Enum: "sources" "spectra"

What underlying data the annotation is on: must be one of either "sources" or "spectra".

resource_id
required
string

The ID of the underlying data. This would be a string for a source ID or an integer for other data types like spectra.

Responses

Response samples

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

Retrieve a comment

Retrieve a comment

path Parameters
associated_resource_type
required
string

What underlying data the comment is on: "sources" or "spectra" or "gcn_event" or "earthquake" or "shift".

resource_id
required
string
Enum: "sources" "spectra" "gcn_event"

The ID of the source, spectrum, gcn_event, earthquake, or shift that the comment is posted to. This would be a string for a source ID or an integer for a spectrum, gcn_event, earthquake, or shift.

comment_id
required
integer

Responses

Response samples

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

Retrieve a reminder

Retrieve a reminder

path Parameters
associated_resource_type
required
string
Enum: "source" "spectra" "gcn_event" "shift" "earthquake"

What underlying data the reminder is on: "sources" or "spectra" or "gcn_event" or "shift" or "earthquake"

resource_id
required
string

The ID of the source, spectrum, gcn_event or shift that the reminder is posted to. This would be a string for a source ID or an integer for a spectrum or gcn_event

reminder_id
required
integer

Responses

Response samples

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

Retrieve all reminders associated with specified r

Retrieve all reminders associated with specified resource

path Parameters
associated_resource_type
required
string
Enum: "source" "spectra" "gcn_event" "shift"

What underlying data the reminder is on: "sources" or "spectra" or "gcn_event" or "shift" or "earthquake".

resource_id
required
string

The ID of the underlying data. This would be a string for a source ID or an integer for other data types like spectrum or gcn_event.

Responses

Response samples

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

Retrieve all spectra associated with an Object

Retrieve all spectra associated with an Object

path Parameters
obj_id
required
string

ID of the object to retrieve spectra for

query Parameters
normalization
string

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

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

Responses

Response samples

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

Retrieve all annotations associated with specified

Retrieve all annotations associated with specified resource

path Parameters
associated_resource_type
required
string
Enum: "sources" "spectra"

What underlying data the annotation is on: must be one of either "sources" or "spectra".

resource_id
required
string

The ID of the underlying data. This would be a string for a source ID or an integer for other data types like spectra.

Responses

Response samples

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

Retrieve an annotation

Retrieve an annotation

path Parameters
associated_resource_type
required
string
Enum: "sources" "spectra" "photometry"

What underlying data the annotation is on: must be one of "sources", "spectra", or "photometry."

resource_id
required
string

The ID of the underlying data. This would be a string for a source ID or an integer for other data types like spectra.

annotation_id
required
integer

Responses

Response samples

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

Retrieve a spectrum

Retrieve a spectrum

path Parameters
spectrum_id
required
integer

Responses

Response samples

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

Update spectrum

Update spectrum

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

ID of the Instrument that acquired the Spectrum.

errors
Array of numbers

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

type
string
Enum: "source" "host" "host_center"

Type of spectrum. One of: 'source''host''host_center'. Defaults to 'fsource'.

reduced_by
Array of integers
Default: []

IDs of the Users who reduced this Spectrum, or to use as points of contact given an external reducer.

group_ids
any
Default: []

IDs of the Groups to share this spectrum with. Set to "all" to make this spectrum visible to all users.

assignment_id
integer

ID of the classical assignment that generated this spectrum, if any.

units
string

Units of the fluxes/errors. Options are Jy, AB, or erg/s/cm/cm/AA).

observed_at
required
string <date-time>

The ISO UTC time the spectrum was taken.

external_observer
string or null
Default: null

Free text provided as an external observer

label
string

User defined label (can be used to replace default instrument/date labeling on plot legends).

followup_request_id
integer

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

obj_id
required
string

ID of this Spectrum's Obj.

wavelengths
required
Array of numbers

Wavelengths of the spectrum [Angstrom].

external_reducer
string or null
Default: null

Free text provided as an external reducer

altdata
any

Miscellaneous alternative metadata.

fluxes
required
Array of numbers

Flux of the Spectrum [F_lambda, arbitrary units].

origin
string

Origin of the spectrum.

observed_by
Array of integers
Default: []

IDs of the Users who observed this Spectrum, or to use as points of contact given an external observer.

Responses

Request samples

Content type
application/json
{
  • "instrument_id": 0,
  • "errors": [
    ],
  • "type": "source",
  • "reduced_by": [ ],
  • "group_ids": [ ],
  • "assignment_id": 0,
  • "units": "string",
  • "observed_at": "2019-08-24T14:15:22Z",
  • "external_observer": null,
  • "label": "string",
  • "followup_request_id": 0,
  • "obj_id": "string",
  • "wavelengths": [
    ],
  • "external_reducer": null,
  • "altdata": null,
  • "fluxes": [
    ],
  • "origin": "string",
  • "observed_by": [ ]
}

Response samples

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

Delete a spectrum

Delete a spectrum

path Parameters
spectrum_id
required
integer

Responses

Response samples

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

Retrieve multiple spectra with given criteria

Retrieve multiple spectra with given criteria

query Parameters
minimalPayload
boolean

If true, return only the minimal metadata about each spectrum, instead of returning the potentially large payload that includes wavelength/flux and also comments and annotations. The metadata that is always included is: id, obj_id, owner_id, origin, type, label, observed_at, created_at, modified, instrument_id, instrument_name, original_file_name, followup_request_id, assignment_id, and altdata.

observedBefore
string

Arrow-parseable date string (e.g. 2020-01-01). If provided, return only spectra observed before this time.

observedAfter
string

Arrow-parseable date string (e.g. 2020-01-01). If provided, return only spectra observed after this time.

objID
string

Return any spectra on an object with ID that has a (partial) match to this argument (i.e., the given argument is "in" the object's ID).

instrumentIDs
any

If provided, filter only spectra observed with one of these instrument IDs.

groupIDs
list

If provided, filter only spectra saved to one of these group IDs.

followupRequestIDs
list

If provided, filter only spectra associate with these followup request IDs.

assignmentIDs
list

If provided, filter only spectra associate with these assignment request IDs.

origin
string

Return any spectra that have an origin with a (partial) match to any of the values in this comma separated list.

label
string

Return any spectra that have an origin with a (partial) match to any of the values in this comma separated list.

type
string

Return spectra of the given type or types (match multiple values using a comma separated list). Types of spectra are defined in the config, e.g., source, host or host_center.

commentsFilter
Array of strings

Comma-separated string of comment text to filter for spectra matching.

commentsFilterAuthor
string

Comma separated string of authors. Only comments from these authors are used when filtering with the commentsFilter.

commentsFilterBefore
string

Arrow-parseable date string (e.g. 2020-01-01). If provided, only return sources that have comments before this time.

commentsFilterAfter
string

Arrow-parseable date string (e.g. 2020-01-01). If provided, only return sources that have comments after this time.

Upload spectrum

Upload spectrum

Request Body schema: application/json
instrument_id
required
integer

ID of the Instrument that acquired the Spectrum.

errors
Array of numbers

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

type
string
Enum: "source" "host" "host_center"

Type of spectrum. One of: 'source''host''host_center'. Defaults to 'fsource'.

reduced_by
Array of integers
Default: []

IDs of the Users who reduced this Spectrum, or to use as points of contact given an external reducer.

group_ids
any
Default: []

IDs of the Groups to share this spectrum with. Set to "all" to make this spectrum visible to all users.

assignment_id
integer

ID of the classical assignment that generated this spectrum, if any.

units
string

Units of the fluxes/errors. Options are Jy, AB, or erg/s/cm/cm/AA).

observed_at
required
string <date-time>

The ISO UTC time the spectrum was taken.

external_observer
string or null
Default: null

Free text provided as an external observer

label
string

User defined label (can be used to replace default instrument/date labeling on plot legends).

followup_request_id
integer

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

obj_id
required
string

ID of this Spectrum's Obj.

wavelengths
required
Array of numbers

Wavelengths of the spectrum [Angstrom].

external_reducer
string or null
Default: null

Free text provided as an external reducer

altdata
any

Miscellaneous alternative metadata.

fluxes
required
Array of numbers

Flux of the Spectrum [F_lambda, arbitrary units].

origin
string

Origin of the spectrum.

observed_by
Array of integers
Default: []

IDs of the Users who observed this Spectrum, or to use as points of contact given an external observer.

Responses

Request samples

Content type
application/json
{
  • "instrument_id": 0,
  • "errors": [
    ],
  • "type": "source",
  • "reduced_by": [ ],
  • "group_ids": [ ],
  • "assignment_id": 0,
  • "units": "string",
  • "observed_at": "2019-08-24T14:15:22Z",
  • "external_observer": null,
  • "label": "string",
  • "followup_request_id": 0,
  • "obj_id": "string",
  • "wavelengths": [
    ],
  • "external_reducer": null,
  • "altdata": null,
  • "fluxes": [
    ],
  • "origin": "string",
  • "observed_by": [ ]
}

Response samples

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

Parse spectrum from ASCII file

Parse spectrum from ASCII file

Request Body schema: application/json
ascii
required
string

The content of the ASCII file to be parsed.

The file can optionally contain a header which will be parsed and stored.

The lines that make up the ASCII header must appear at the beginning of the file and all be formatted the same way within a single file. They can be formatted in one of two ways.

1) # KEY: VALUE
2) # KEY = VALUE / COMMENT

astropy.io.ascii.read is used to load the table into Python memory. An attempt is made to parse the header first using method 1, then method 2.

Example of format 1:

# XTENSION: IMAGE
# BITPIX: -32
# NAXIS: 2
# NAXIS1: 433
# NAXIS2: 1
# RA: 230.14

Example of format 2:

# FILTER  = 'clear   '           / Filter
# EXPTIME =              600.003 / Total exposure time (sec); avg. of R&B
# OBJECT  = 'ZTF20abpuxna'       / User-specified object name
# TARGNAME= 'ZTF20abpuxna_S1'    / Target name (from starlist)
# DICHNAME= '560     '           / Dichroic
# GRISNAME= '400/3400'           / Blue grism
# GRANAME = '400/8500'           / Red grating
# WAVELEN =        7829.41406250 / Red specified central wavelength
# BLUFILT = 'clear   '           / Blue filter
# REDFILT = 'Clear   '           / Red filter
# SLITNAME= 'long_1.0'           / Slitmask
# INSTRUME= 'LRIS+LRISBLUE'      / Camera
# TELESCOP= 'Keck I  '           / Telescope name
# BLUDET  = 'LRISB   '           / LRIS blue detector
# REDDET  = 'LRISR3  '           / LRIS red detector
# OBSERVER= 'Andreoni Anand De'  / Observer name
# REDUCER = '        '           / Name of reducer
# LPIPEVER= '2020.06 '           / LPipe version number
# HOSTNAME= 'gayatri '           / LPipe host computer name
# IDLVER  = '8.1     '           / IDL version number
# DATE    = '2020-09-15T09:47:10' / UT end of last exposure

The data must be at least 2 column ascii (wavelength, flux). If flux errors are provided in an additional column, the column must be specified in the call. If more than 2 columns are given, by default the first two are interpreted as (wavelength, flux). The column indices of each of these arguments can be controlled by passing the integer column index to the POST JSON.

Examples of valid data sections:

Many-column ASCII:

   10295.736  2.62912e-16  1.67798e-15  2.24407e-17    4084    75.956  5.48188e+15  0
   10296.924  2.96887e-16  1.57197e-15  2.21469e-17    4085    75.959  5.42569e+15  0
   10298.112  3.20429e-16  1.45017e-15  2.16863e-17    4086    75.962  5.36988e+15  0
   10299.301  3.33367e-16  1.06116e-15  1.94187e-17    4087    75.965  5.31392e+15  0
   10300.489  3.09943e-16  6.99539e-16  1.67183e-17    4088    75.968  5.25836e+15  0
   10301.678  3.48273e-16  5.56194e-16  1.59555e-17    4089    75.972  5.20314e+15  0
   10302.866  3.48102e-16  5.28483e-16  1.58033e-17    4090    75.975  5.15146e+15  0
   10304.055  3.78640e-16  6.00997e-16  1.67462e-17    4091    75.978  5.10058e+15  0
   10305.243  4.28820e-16  7.18759e-16  1.81534e-17    4092    75.981  5.05032e+15  0
   10306.432  4.13152e-16  7.54203e-16  1.83965e-17    4093    75.984  5.00097e+15  0

3-column ASCII:

8993.2 1.148e-16 7.919e-34
9018.7 1.068e-16 6.588e-34
9044.3 1.056e-16 5.660e-34
9069.9 9.763e-17 5.593e-34
9095.4 1.048e-16 8.374e-34
9121.0 1.026e-16 8.736e-34
9146.6 8.472e-17 9.505e-34
9172.1 9.323e-17 7.592e-34
9197.7 1.050e-16 7.863e-34
9223.3 8.701e-17 7.135e-34

2-column ASCII:

      10045.1    0.0217740
      10046.3    0.0182158
      10047.4    0.0204764
      10048.6    0.0231833
      10049.8    0.0207157
      10051.0    0.0185226
      10052.2    0.0200072
      10053.4    0.0205159
      10054.5    0.0199460
      10055.7    0.0210533

2-column ASCII:

7911.60 1.045683
7920.80 1.046414
7930.00 1.235362
7939.20 0.783466
7948.40 1.116153
7957.60 1.375844
7966.80 1.029127
7976.00 1.019637
7985.20 0.732859
7994.40 1.236514
wave_column
integer
Default: 0

The 0-based index of the ASCII column corresponding to the wavelength values of the spectrum (default 0).

fluxerr_column
integer or null
Default: null

The 0-based index of the ASCII column corresponding to the flux error values of the spectrum (default None). If a column for errors is provided, set to the corresponding 0-based column number, otherwise, it will be ignored.

flux_column
integer
Default: 1

The 0-based index of the ASCII column corresponding to the flux values of the spectrum (default 1).

Responses

Request samples

Content type
application/json
{
  • "ascii": "string",
  • "wave_column": 0,
  • "fluxerr_column": null,
  • "flux_column": 1
}

Response samples

Content type
application/json
{
  • "obj": null,
  • "instrument": null,
  • "groups": [
    ],
  • "reducers": [
    ],
  • "observers": [
    ],
  • "followup_request": null,
  • "assignment": null,
  • "owner": null,
  • "comments": [
    ],
  • "reminders": [
    ],
  • "annotations": [
    ],
  • "wavelengths": [
    ],
  • "fluxes": [
    ],
  • "errors": [
    ],
  • "units": "string",
  • "obj_id": "string",
  • "observed_at": "2019-08-24T14:15:22Z",
  • "origin": "string",
  • "type": "source",
  • "label": "string",
  • "instrument_id": 0,
  • "followup_request_id": 0,
  • "assignment_id": 0,
  • "altdata": null,
  • "original_file_string": "string",
  • "original_file_filename": "string"
}

Upload spectrum from ASCII file

Upload spectrum from ASCII file

Request Body schema: application/json
instrument_id
required
integer

The ID of the instrument that took the spectrum.

type
string
Enum: "source" "host" "host_center"

Type of spectrum. One of: 'source', 'host', 'host_center'. Defaults to 'fsource'.

group_ids
Array of integers

The IDs of the groups to share this spectrum with.

fluxerr_column
integer or null
Default: null

The 0-based index of the ASCII column corresponding to the flux error values of the spectrum (default None). If a column for errors is provided, set to the corresponding 0-based column number, otherwise, it will be ignored.

reduced_by
Array of integers
Default: []

IDs of the Users who reduced this Spectrum, or to use as points of contact given an external reducer.

assignment_id
integer

ID of the classical assignment that generated this spectrum, if any.

observed_at
required
string <date-time>

The ISO UTC time the spectrum was taken.

external_reducer
string or null
Default: null

Free text provided as an external reducer

external_observer
string or null
Default: null

Free text provided as an external observer

label
string

User defined label to be placed in plot legends, instead of the default -.

flux_column
integer
Default: 1

The 0-based index of the ASCII column corresponding to the flux values of the spectrum (default 1).

followup_request_id
integer

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

obj_id
required
string

The ID of the object that the spectrum is of.

filename
required
string

The original filename (for bookkeeping purposes).

ascii
required
string

The content of the ASCII file to be parsed.

The file can optionally contain a header which will be parsed and stored.

The lines that make up the ASCII header must appear at the beginning of the file and all be formatted the same way within a single file. They can be formatted in one of two ways.

1) # KEY: VALUE
2) # KEY = VALUE / COMMENT

astropy.io.ascii.read is used to load the table into Python memory. An attempt is made to parse the header first using method 1, then method 2.

Example of format 1:

# XTENSION: IMAGE
# BITPIX: -32
# NAXIS: 2
# NAXIS1: 433
# NAXIS2: 1
# RA: 230.14

Example of format 2:

# FILTER  = 'clear   '           / Filter
# EXPTIME =              600.003 / Total exposure time (sec); avg. of R&B
# OBJECT  = 'ZTF20abpuxna'       / User-specified object name
# TARGNAME= 'ZTF20abpuxna_S1'    / Target name (from starlist)
# DICHNAME= '560     '           / Dichroic
# GRISNAME= '400/3400'           / Blue grism
# GRANAME = '400/8500'           / Red grating
# WAVELEN =        7829.41406250 / Red specified central wavelength
# BLUFILT = 'clear   '           / Blue filter
# REDFILT = 'Clear   '           / Red filter
# SLITNAME= 'long_1.0'           / Slitmask
# INSTRUME= 'LRIS+LRISBLUE'      / Camera
# TELESCOP= 'Keck I  '           / Telescope name
# BLUDET  = 'LRISB   '           / LRIS blue detector
# REDDET  = 'LRISR3  '           / LRIS red detector
# OBSERVER= 'Andreoni Anand De'  / Observer name
# REDUCER = '        '           / Name of reducer
# LPIPEVER= '2020.06 '           / LPipe version number
# HOSTNAME= 'gayatri '           / LPipe host computer name
# IDLVER  = '8.1     '           / IDL version number
# DATE    = '2020-09-15T09:47:10' / UT end of last exposure

The data must be at least 2 column ascii (wavelength, flux). If flux errors are provided in an additional column, the column must be specified in the call. If more than 2 columns are given, by default the first two are interpreted as (wavelength, flux). The column indices of each of these arguments can be controlled by passing the integer column index to the POST JSON.

Examples of valid data sections:

Many-column ASCII:

   10295.736  2.62912e-16  1.67798e-15  2.24407e-17    4084    75.956  5.48188e+15  0
   10296.924  2.96887e-16  1.57197e-15  2.21469e-17    4085    75.959  5.42569e+15  0
   10298.112  3.20429e-16  1.45017e-15  2.16863e-17    4086    75.962  5.36988e+15  0
   10299.301  3.33367e-16  1.06116e-15  1.94187e-17    4087    75.965  5.31392e+15  0
   10300.489  3.09943e-16  6.99539e-16  1.67183e-17    4088    75.968  5.25836e+15  0
   10301.678  3.48273e-16  5.56194e-16  1.59555e-17    4089    75.972  5.20314e+15  0
   10302.866  3.48102e-16  5.28483e-16  1.58033e-17    4090    75.975  5.15146e+15  0
   10304.055  3.78640e-16  6.00997e-16  1.67462e-17    4091    75.978  5.10058e+15  0
   10305.243  4.28820e-16  7.18759e-16  1.81534e-17    4092    75.981  5.05032e+15  0
   10306.432  4.13152e-16  7.54203e-16  1.83965e-17    4093    75.984  5.00097e+15  0

3-column ASCII:

8993.2 1.148e-16 7.919e-34
9018.7 1.068e-16 6.588e-34
9044.3 1.056e-16 5.660e-34
9069.9 9.763e-17 5.593e-34
9095.4 1.048e-16 8.374e-34
9121.0 1.026e-16 8.736e-34
9146.6 8.472e-17 9.505e-34
9172.1 9.323e-17 7.592e-34
9197.7 1.050e-16 7.863e-34
9223.3 8.701e-17 7.135e-34

2-column ASCII:

      10045.1    0.0217740
      10046.3    0.0182158
      10047.4    0.0204764
      10048.6    0.0231833
      10049.8    0.0207157
      10051.0    0.0185226
      10052.2    0.0200072
      10053.4    0.0205159
      10054.5    0.0199460
      10055.7    0.0210533

2-column ASCII:

7911.60 1.045683
7920.80 1.046414
7930.00 1.235362
7939.20 0.783466
7948.40 1.116153
7957.60 1.375844
7966.80 1.029127
7976.00 1.019637
7985.20 0.732859
7994.40 1.236514
wave_column
integer
Default: 0

The 0-based index of the ASCII column corresponding to the wavelength values of the spectrum (default 0).

observed_by
Array of integers
Default: []

IDs of the Users who observed this Spectrum, or to use as points of contact given an external observer.

Responses

Request samples

Content type
application/json
{
  • "instrument_id": 0,
  • "type": "source",
  • "group_ids": [
    ],
  • "fluxerr_column": null,
  • "reduced_by": [ ],
  • "assignment_id": 0,
  • "observed_at": "2019-08-24T14:15:22Z",
  • "external_reducer": null,
  • "external_observer": null,
  • "label": "string",
  • "flux_column": 1,
  • "followup_request_id": 0,
  • "obj_id": "string",
  • "filename": "string",
  • "ascii": "string",
  • "wave_column": 0,
  • "observed_by": [ ]
}

Response samples

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

Create synthetic photometry from a spectrum

Create synthetic photometry from a spectrum

path Parameters
spectrum_id
required
integer
query Parameters
filters
required
list

List of filters

Responses

Response samples

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

Retrieve spectra for given instrument within date

Retrieve spectra for given instrument within date range

query Parameters
instrument_ids
list of integers

Instrument id numbers of spectrum. If None, retrieve for all instruments.

min_date
ISO UTC date string

Minimum UTC date of range in ISOT format. If None, open ended range.

max_date
ISO UTC date string

Maximum UTC date of range in ISOT format. If None, open ended range.

Responses

Response samples

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

Retrieve a spectrum

Retrieve a spectrum

path Parameters
spectrum_id
required
integer

Responses

Response samples

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

Update spectrum

Update spectrum

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

ID of the Instrument that acquired the Spectrum.

errors
Array of numbers

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

type
string
Enum: "source" "host" "host_center"

Type of spectrum. One of: 'source''host''host_center'. Defaults to 'fsource'.

reduced_by
Array of integers
Default: []

IDs of the Users who reduced this Spectrum, or to use as points of contact given an external reducer.

group_ids
any
Default: []

IDs of the Groups to share this spectrum with. Set to "all" to make this spectrum visible to all users.

assignment_id
integer

ID of the classical assignment that generated this spectrum, if any.

units
string

Units of the fluxes/errors. Options are Jy, AB, or erg/s/cm/cm/AA).

observed_at
required
string <date-time>

The ISO UTC time the spectrum was taken.

external_observer
string or null
Default: null

Free text provided as an external observer

label
string

User defined label (can be used to replace default instrument/date labeling on plot legends).

followup_request_id
integer

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

obj_id
required
string

ID of this Spectrum's Obj.

wavelengths
required
Array of numbers

Wavelengths of the spectrum [Angstrom].

external_reducer
string or null
Default: null

Free text provided as an external reducer

altdata
any

Miscellaneous alternative metadata.

fluxes
required
Array of numbers

Flux of the Spectrum [F_lambda, arbitrary units].

origin
string

Origin of the spectrum.

observed_by
Array of integers
Default: []

IDs of the Users who observed this Spectrum, or to use as points of contact given an external observer.

Responses

Request samples

Content type
application/json
{
  • "instrument_id": 0,
  • "errors": [
    ],
  • "type": "source",
  • "reduced_by": [ ],
  • "group_ids": [ ],
  • "assignment_id": 0,
  • "units": "string",
  • "observed_at": "2019-08-24T14:15:22Z",
  • "external_observer": null,
  • "label": "string",
  • "followup_request_id": 0,
  • "obj_id": "string",
  • "wavelengths": [
    ],
  • "external_reducer": null,
  • "altdata": null,
  • "fluxes": [
    ],
  • "origin": "string",
  • "observed_by": [ ]
}

Response samples

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

Delete a spectrum

Delete a spectrum

path Parameters
spectrum_id
required
integer

Responses

Response samples

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

Retrieve multiple spectra with given criteria

Retrieve multiple spectra with given criteria

query Parameters
minimalPayload
boolean

If true, return only the minimal metadata about each spectrum, instead of returning the potentially large payload that includes wavelength/flux and also comments and annotations. The metadata that is always included is: id, obj_id, owner_id, origin, type, label, observed_at, created_at, modified, instrument_id, instrument_name, original_file_name, followup_request_id, assignment_id, and altdata.

observedBefore
string

Arrow-parseable date string (e.g. 2020-01-01). If provided, return only spectra observed before this time.

observedAfter
string

Arrow-parseable date string (e.g. 2020-01-01). If provided, return only spectra observed after this time.

objID
string

Return any spectra on an object with ID that has a (partial) match to this argument (i.e., the given argument is "in" the object's ID).

instrumentIDs
any

If provided, filter only spectra observed with one of these instrument IDs.

groupIDs
list

If provided, filter only spectra saved to one of these group IDs.

followupRequestIDs
list

If provided, filter only spectra associate with these followup request IDs.

assignmentIDs
list

If provided, filter only spectra associate with these assignment request IDs.

origin
string

Return any spectra that have an origin with a (partial) match to any of the values in this comma separated list.

label
string

Return any spectra that have an origin with a (partial) match to any of the values in this comma separated list.

type
string

Return spectra of the given type or types (match multiple values using a comma separated list). Types of spectra are defined in the config, e.g., source, host or host_center.

commentsFilter
Array of strings

Comma-separated string of comment text to filter for spectra matching.

commentsFilterAuthor
string

Comma separated string of authors. Only comments from these authors are used when filtering with the commentsFilter.

commentsFilterBefore
string

Arrow-parseable date string (e.g. 2020-01-01). If provided, only return sources that have comments before this time.

commentsFilterAfter
string

Arrow-parseable date string (e.g. 2020-01-01). If provided, only return sources that have comments after this time.

Upload spectrum

Upload spectrum

Request Body schema: application/json
instrument_id
required
integer

ID of the Instrument that acquired the Spectrum.

errors
Array of numbers

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

type
string
Enum: "source" "host" "host_center"

Type of spectrum. One of: 'source''host''host_center'. Defaults to 'fsource'.

reduced_by
Array of integers
Default: []

IDs of the Users who reduced this Spectrum, or to use as points of contact given an external reducer.

group_ids
any
Default: []

IDs of the Groups to share this spectrum with. Set to "all" to make this spectrum visible to all users.

assignment_id
integer

ID of the classical assignment that generated this spectrum, if any.

units
string

Units of the fluxes/errors. Options are Jy, AB, or erg/s/cm/cm/AA).

observed_at
required
string <date-time>

The ISO UTC time the spectrum was taken.

external_observer
string or null
Default: null

Free text provided as an external observer

label
string

User defined label (can be used to replace default instrument/date labeling on plot legends).

followup_request_id
integer

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

obj_id
required
string

ID of this Spectrum's Obj.

wavelengths
required
Array of numbers

Wavelengths of the spectrum [Angstrom].

external_reducer
string or null
Default: null

Free text provided as an external reducer

altdata
any

Miscellaneous alternative metadata.

fluxes
required
Array of numbers

Flux of the Spectrum [F_lambda, arbitrary units].

origin
string

Origin of the spectrum.

observed_by
Array of integers
Default: []

IDs of the Users who observed this Spectrum, or to use as points of contact given an external observer.

Responses

Request samples

Content type
application/json
{
  • "instrument_id": 0,
  • "errors": [
    ],
  • "type": "source",
  • "reduced_by": [ ],
  • "group_ids": [ ],
  • "assignment_id": 0,
  • "units": "string",
  • "observed_at": "2019-08-24T14:15:22Z",
  • "external_observer": null,
  • "label": "string",
  • "followup_request_id": 0,
  • "obj_id": "string",
  • "wavelengths": [
    ],
  • "external_reducer": null,
  • "altdata": null,
  • "fluxes": [
    ],
  • "origin": "string",
  • "observed_by": [ ]
}

Response samples

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

Parse spectrum from ASCII file

Parse spectrum from ASCII file

Request Body schema: application/json
ascii
required
string

The content of the ASCII file to be parsed.

The file can optionally contain a header which will be parsed and stored.

The lines that make up the ASCII header must appear at the beginning of the file and all be formatted the same way within a single file. They can be formatted in one of two ways.

1) # KEY: VALUE
2) # KEY = VALUE / COMMENT

astropy.io.ascii.read is used to load the table into Python memory. An attempt is made to parse the header first using method 1, then method 2.

Example of format 1:

# XTENSION: IMAGE
# BITPIX: -32
# NAXIS: 2
# NAXIS1: 433
# NAXIS2: 1
# RA: 230.14

Example of format 2:

# FILTER  = 'clear   '           / Filter
# EXPTIME =              600.003 / Total exposure time (sec); avg. of R&B
# OBJECT  = 'ZTF20abpuxna'       / User-specified object name
# TARGNAME= 'ZTF20abpuxna_S1'    / Target name (from starlist)
# DICHNAME= '560     '           / Dichroic
# GRISNAME= '400/3400'           / Blue grism
# GRANAME = '400/8500'           / Red grating
# WAVELEN =        7829.41406250 / Red specified central wavelength
# BLUFILT = 'clear   '           / Blue filter
# REDFILT = 'Clear   '           / Red filter
# SLITNAME= 'long_1.0'           / Slitmask
# INSTRUME= 'LRIS+LRISBLUE'      / Camera
# TELESCOP= 'Keck I  '           / Telescope name
# BLUDET  = 'LRISB   '           / LRIS blue detector
# REDDET  = 'LRISR3  '           / LRIS red detector
# OBSERVER= 'Andreoni Anand De'  / Observer name
# REDUCER = '        '           / Name of reducer
# LPIPEVER= '2020.06 '           / LPipe version number
# HOSTNAME= 'gayatri '           / LPipe host computer name
# IDLVER  = '8.1     '           / IDL version number
# DATE    = '2020-09-15T09:47:10' / UT end of last exposure

The data must be at least 2 column ascii (wavelength, flux). If flux errors are provided in an additional column, the column must be specified in the call. If more than 2 columns are given, by default the first two are interpreted as (wavelength, flux). The column indices of each of these arguments can be controlled by passing the integer column index to the POST JSON.

Examples of valid data sections:

Many-column ASCII:

   10295.736  2.62912e-16  1.67798e-15  2.24407e-17    4084    75.956  5.48188e+15  0
   10296.924  2.96887e-16  1.57197e-15  2.21469e-17    4085    75.959  5.42569e+15  0
   10298.112  3.20429e-16  1.45017e-15  2.16863e-17    4086    75.962  5.36988e+15  0
   10299.301  3.33367e-16  1.06116e-15  1.94187e-17    4087    75.965  5.31392e+15  0
   10300.489  3.09943e-16  6.99539e-16  1.67183e-17    4088    75.968  5.25836e+15  0
   10301.678  3.48273e-16  5.56194e-16  1.59555e-17    4089    75.972  5.20314e+15  0
   10302.866  3.48102e-16  5.28483e-16  1.58033e-17    4090    75.975  5.15146e+15  0
   10304.055  3.78640e-16  6.00997e-16  1.67462e-17    4091    75.978  5.10058e+15  0
   10305.243  4.28820e-16  7.18759e-16  1.81534e-17    4092    75.981  5.05032e+15  0
   10306.432  4.13152e-16  7.54203e-16  1.83965e-17    4093    75.984  5.00097e+15  0

3-column ASCII:

8993.2 1.148e-16 7.919e-34
9018.7 1.068e-16 6.588e-34
9044.3 1.056e-16 5.660e-34
9069.9 9.763e-17 5.593e-34
9095.4 1.048e-16 8.374e-34
9121.0 1.026e-16 8.736e-34
9146.6 8.472e-17 9.505e-34
9172.1 9.323e-17 7.592e-34
9197.7 1.050e-16 7.863e-34
9223.3 8.701e-17 7.135e-34

2-column ASCII:

      10045.1    0.0217740
      10046.3    0.0182158
      10047.4    0.0204764
      10048.6    0.0231833
      10049.8    0.0207157
      10051.0    0.0185226
      10052.2    0.0200072
      10053.4    0.0205159
      10054.5    0.0199460
      10055.7    0.0210533

2-column ASCII:

7911.60 1.045683
7920.80 1.046414
7930.00 1.235362
7939.20 0.783466
7948.40 1.116153
7957.60 1.375844
7966.80 1.029127
7976.00 1.019637
7985.20 0.732859
7994.40 1.236514
wave_column
integer
Default: 0

The 0-based index of the ASCII column corresponding to the wavelength values of the spectrum (default 0).

fluxerr_column
integer or null
Default: null

The 0-based index of the ASCII column corresponding to the flux error values of the spectrum (default None). If a column for errors is provided, set to the corresponding 0-based column number, otherwise, it will be ignored.

flux_column
integer
Default: 1

The 0-based index of the ASCII column corresponding to the flux values of the spectrum (default 1).

Responses

Request samples

Content type
application/json
{
  • "ascii": "string",
  • "wave_column": 0,
  • "fluxerr_column": null,
  • "flux_column": 1
}

Response samples

Content type
application/json
{
  • "obj": null,
  • "instrument": null,
  • "groups": [
    ],
  • "reducers": [
    ],
  • "observers": [
    ],
  • "followup_request": null,
  • "assignment": null,
  • "owner": null,
  • "comments": [
    ],
  • "reminders": [
    ],
  • "annotations": [
    ],
  • "wavelengths": [
    ],
  • "fluxes": [
    ],
  • "errors": [
    ],
  • "units": "string",
  • "obj_id": "string",
  • "observed_at": "2019-08-24T14:15:22Z",
  • "origin": "string",
  • "type": "source",
  • "label": "string",
  • "instrument_id": 0,
  • "followup_request_id": 0,
  • "assignment_id": 0,
  • "altdata": null,
  • "original_file_string": "string",
  • "original_file_filename": "string"
}

Upload spectrum from ASCII file

Upload spectrum from ASCII file

Request Body schema: application/json
instrument_id
required
integer

The ID of the instrument that took the spectrum.

type
string
Enum: "source" "host" "host_center"

Type of spectrum. One of: 'source', 'host', 'host_center'. Defaults to 'fsource'.

group_ids
Array of integers

The IDs of the groups to share this spectrum with.

fluxerr_column
integer or null
Default: null

The 0-based index of the ASCII column corresponding to the flux error values of the spectrum (default None). If a column for errors is provided, set to the corresponding 0-based column number, otherwise, it will be ignored.

reduced_by
Array of integers
Default: []

IDs of the Users who reduced this Spectrum, or to use as points of contact given an external reducer.

assignment_id
integer

ID of the classical assignment that generated this spectrum, if any.

observed_at
required
string <date-time>

The ISO UTC time the spectrum was taken.

external_reducer
string or null
Default: null

Free text provided as an external reducer

external_observer
string or null
Default: null

Free text provided as an external observer

label
string

User defined label to be placed in plot legends, instead of the default -.

flux_column
integer
Default: 1

The 0-based index of the ASCII column corresponding to the flux values of the spectrum (default 1).

followup_request_id
integer

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

obj_id
required
string

The ID of the object that the spectrum is of.

filename
required
string

The original filename (for bookkeeping purposes).

ascii
required
string

The content of the ASCII file to be parsed.

The file can optionally contain a header which will be parsed and stored.

The lines that make up the ASCII header must appear at the beginning of the file and all be formatted the same way within a single file. They can be formatted in one of two ways.

1) # KEY: VALUE
2) # KEY = VALUE / COMMENT

astropy.io.ascii.read is used to load the table into Python memory. An attempt is made to parse the header first using method 1, then method 2.

Example of format 1:

# XTENSION: IMAGE
# BITPIX: -32
# NAXIS: 2
# NAXIS1: 433
# NAXIS2: 1
# RA: 230.14

Example of format 2:

# FILTER  = 'clear   '           / Filter
# EXPTIME =              600.003 / Total exposure time (sec); avg. of R&B
# OBJECT  = 'ZTF20abpuxna'       / User-specified object name
# TARGNAME= 'ZTF20abpuxna_S1'    / Target name (from starlist)
# DICHNAME= '560     '           / Dichroic
# GRISNAME= '400/3400'           / Blue grism
# GRANAME = '400/8500'           / Red grating
# WAVELEN =        7829.41406250 / Red specified central wavelength
# BLUFILT = 'clear   '           / Blue filter
# REDFILT = 'Clear   '           / Red filter
# SLITNAME= 'long_1.0'           / Slitmask
# INSTRUME= 'LRIS+LRISBLUE'      / Camera
# TELESCOP= 'Keck I  '           / Telescope name
# BLUDET  = 'LRISB   '           / LRIS blue detector
# REDDET  = 'LRISR3  '           / LRIS red detector
# OBSERVER= 'Andreoni Anand De'  / Observer name
# REDUCER = '        '           / Name of reducer
# LPIPEVER= '2020.06 '           / LPipe version number
# HOSTNAME= 'gayatri '           / LPipe host computer name
# IDLVER  = '8.1     '           / IDL version number
# DATE    = '2020-09-15T09:47:10' / UT end of last exposure

The data must be at least 2 column ascii (wavelength, flux). If flux errors are provided in an additional column, the column must be specified in the call. If more than 2 columns are given, by default the first two are interpreted as (wavelength, flux). The column indices of each of these arguments can be controlled by passing the integer column index to the POST JSON.

Examples of valid data sections:

Many-column ASCII:

   10295.736  2.62912e-16  1.67798e-15  2.24407e-17    4084    75.956  5.48188e+15  0
   10296.924  2.96887e-16  1.57197e-15  2.21469e-17    4085    75.959  5.42569e+15  0
   10298.112  3.20429e-16  1.45017e-15  2.16863e-17    4086    75.962  5.36988e+15  0
   10299.301  3.33367e-16  1.06116e-15  1.94187e-17    4087    75.965  5.31392e+15  0
   10300.489  3.09943e-16  6.99539e-16  1.67183e-17    4088    75.968  5.25836e+15  0
   10301.678  3.48273e-16  5.56194e-16  1.59555e-17    4089    75.972  5.20314e+15  0
   10302.866  3.48102e-16  5.28483e-16  1.58033e-17    4090    75.975  5.15146e+15  0
   10304.055  3.78640e-16  6.00997e-16  1.67462e-17    4091    75.978  5.10058e+15  0
   10305.243  4.28820e-16  7.18759e-16  1.81534e-17    4092    75.981  5.05032e+15  0
   10306.432  4.13152e-16  7.54203e-16  1.83965e-17    4093    75.984  5.00097e+15  0

3-column ASCII:

8993.2 1.148e-16 7.919e-34
9018.7 1.068e-16 6.588e-34
9044.3 1.056e-16 5.660e-34
9069.9 9.763e-17 5.593e-34
9095.4 1.048e-16 8.374e-34
9121.0 1.026e-16 8.736e-34
9146.6 8.472e-17 9.505e-34
9172.1 9.323e-17 7.592e-34
9197.7 1.050e-16 7.863e-34
9223.3 8.701e-17 7.135e-34

2-column ASCII:

      10045.1    0.0217740
      10046.3    0.0182158
      10047.4    0.0204764
      10048.6    0.0231833
      10049.8    0.0207157
      10051.0    0.0185226
      10052.2    0.0200072
      10053.4    0.0205159
      10054.5    0.0199460
      10055.7    0.0210533

2-column ASCII:

7911.60 1.045683
7920.80 1.046414
7930.00 1.235362
7939.20 0.783466
7948.40 1.116153
7957.60 1.375844
7966.80 1.029127
7976.00 1.019637
7985.20 0.732859
7994.40 1.236514
wave_column
integer
Default: 0

The 0-based index of the ASCII column corresponding to the wavelength values of the spectrum (default 0).

observed_by
Array of integers
Default: []

IDs of the Users who observed this Spectrum, or to use as points of contact given an external observer.

Responses

Request samples

Content type
application/json
{
  • "instrument_id": 0,
  • "type": "source",
  • "group_ids": [
    ],
  • "fluxerr_column": null,
  • "reduced_by": [ ],
  • "assignment_id": 0,
  • "observed_at": "2019-08-24T14:15:22Z",
  • "external_reducer": null,
  • "external_observer": null,
  • "label": "string",
  • "flux_column": 1,
  • "followup_request_id": 0,
  • "obj_id": "string",
  • "filename": "string",
  • "ascii": "string",
  • "wave_column": 0,
  • "observed_by": [ ]
}

Response samples

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

Retrieve spectra for given instrument within date

Retrieve spectra for given instrument within date range

query Parameters
instrument_ids
list of integers

Instrument id numbers of spectrum. If None, retrieve for all instruments.

min_date
ISO UTC date string

Minimum UTC date of range in ISOT format. If None, open ended range.

max_date
ISO UTC date string

Maximum UTC date of range in ISOT format. If None, open ended range.

Responses

Response samples

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

Submit a (classification) spectrum to TNS

Submit a (classification) spectrum to TNS

path Parameters
spectrum_id
required
integer
query Parameters
tnsrobotID
required
int

SkyPortal TNS Robot ID

classificationID
string

Classification ID (see TNS documentation at https://www.wis-tns.org/content/tns-getting-started for options)

classifiers
string

List of those performing classification.

spectrumType
string

Type of spectrum that this is. Valid options are: ['object', 'host', 'sky', 'arcs', 'synthetic']

spectrumComment
string

Comment on the spectrum.

classificationComment
string

Comment on the classification.

Responses

Response samples

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

sources

Retrieve all comments associated with specified re

Retrieve all comments associated with specified resource

path Parameters
associated_resource_type
required
string
Value: "sources"

What underlying data the comment is on, e.g., "sources" or "spectra" or "gcn_event" or "earthquake" or "shift".

resource_id
required
string

The ID of the underlying data. This would be a string for a source ID or an integer for other data types like spectrum, gcn_event, earthquake, or shift.

Responses

Response samples

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

Retrieve all annotations associated with specified

Retrieve all annotations associated with specified resource

path Parameters
associated_resource_type
required
string
Enum: "sources" "spectra"

What underlying data the annotation is on: must be one of either "sources" or "spectra".

resource_id
required
string

The ID of the underlying data. This would be a string for a source ID or an integer for other data types like spectra.

Responses

Response samples

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

Retrieve a comment

Retrieve a comment

path Parameters
associated_resource_type
required
string

What underlying data the comment is on: "sources" or "spectra" or "gcn_event" or "earthquake" or "shift".

resource_id
required
string
Enum: "sources" "spectra" "gcn_event"

The ID of the source, spectrum, gcn_event, earthquake, or shift that the comment is posted to. This would be a string for a source ID or an integer for a spectrum, gcn_event, earthquake, or shift.

comment_id
required
integer

Responses

Response samples

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

Retrieve a reminder

Retrieve a reminder

path Parameters
associated_resource_type
required
string
Enum: "source" "spectra" "gcn_event" "shift" "earthquake"

What underlying data the reminder is on: "sources" or "spectra" or "gcn_event" or "shift" or "earthquake"

resource_id
required
string

The ID of the source, spectrum, gcn_event or shift that the reminder is posted to. This would be a string for a source ID or an integer for a spectrum or gcn_event

reminder_id
required
integer

Responses

Response samples

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

Retrieve all reminders associated with specified r

Retrieve all reminders associated with specified resource

path Parameters
associated_resource_type
required
string
Enum: "source" "spectra" "gcn_event" "shift"

What underlying data the reminder is on: "sources" or "spectra" or "gcn_event" or "shift" or "earthquake".

resource_id
required
string

The ID of the underlying data. This would be a string for a source ID or an integer for other data types like spectrum or gcn_event.

Responses

Response samples

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

calculate healpix values for a batch of sources wi

calculate healpix values for a batch of sources without a Healpix value

query Parameters
numPerPage
integer

Number of sources to check for updates. Defaults to 100. Max 500.

pageNumber
integer

Page number for iterating through all sources. Defaults to 1

Responses

Response samples

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

Get a summary of all the activity of shift users o

Get a summary of all the activity of shift users on skyportal for a given period

path Parameters
shift_id
required
integer
query Parameters
startDate
string

Arrow-parseable date string (e.g. 2020-01-01). If provided, filter by shift.start_date >= startDate

Responses

Response samples

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

Copy all photometry points from one source to anot

Copy all photometry points from one source to another

path Parameters
target_id
required
string

The obj_id of the target Source (to which the photometry is being copied to)

Request Body schema: application/json
group_ids
required
Array of integers

List of IDs of groups to give photometry access to

origin_id
required
string

The ID of the Source's Obj the photometry is being copied from

Responses

Request samples

Content type
application/json
{
  • "group_ids": [
    ],
  • "origin_id": "string"
}

Response samples

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

Retrieve offset stars to aid in spectroscopy

Retrieve offset stars to aid in spectroscopy

path Parameters
obj_id
required
string
query Parameters
facility
string
Enum: "Keck" "Shane" "P200"

Which facility to generate the starlist for

num_offset_stars
integer [ 0 .. 10 ]

Requested number of offset stars (set to zero to get starlist of just the source itself)

obstime
string

datetime of observation in isoformat (e.g. 2020-12-30T12:34:10)

use_ztfref
boolean

Use ZTFref catalog for offset star positions, otherwise Gaia DR3

Responses

Response samples

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

Generate a PDF/PNG finding chart to aid in spectro

Generate a PDF/PNG finding chart to aid in spectroscopy

path Parameters
obj_id
required
string
query Parameters
imsize
float [ 2 .. 15 ]

Image size in arcmin (square)

facility
string
Enum: "Keck" "Shane" "P200"
image_source
string
Enum: "desi" "dss" "ztfref" "ps1"

Source of the image used in the finding chart. Defaults to ps1

use_ztfref
boolean

Use ZTFref catalog for offset star positions, otherwise DR3

obstime
string

datetime of observation in isoformat (e.g. 2020-12-30T12:34:10)

type
string
Enum: "png" "pdf"

output type

num_offset_stars
integer [ 0 .. 4 ]

output desired number of offset stars [0,5] (default: 3)

Responses

Response samples

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

Retrieve an object's classifications

Retrieve an object's classifications

path Parameters
obj_id
required
string

Responses

Response samples

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

Retrieve basic info on Groups that an Obj is saved

Retrieve basic info on Groups that an Obj is saved to

path Parameters
obj_id
required
integer

Responses

Response samples

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

Note that a source has been labelled.

Note that a source has been labelled.

path Parameters
obj_id
required
string

ID of object to indicate source labelling for

Request Body schema: application/json
groupIds
required
Array of integers

List of IDs of groups to indicate labelling for

Responses

Request samples

Content type
application/json
{
  • "groupIds": [
    ]
}

Response samples

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

Delete source labels

Delete source labels

path Parameters
obj_id
required
string
Request Body schema: application/json
groupIds
required
Array of integers

List of IDs of groups to indicate scanning for

Responses

Request samples

Content type
application/json
{
  • "groupIds": [
    ]
}

Response samples

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

Retrieve all annotations associated with specified

Retrieve all annotations associated with specified resource

path Parameters
associated_resource_type
required
string
Enum: "sources" "spectra"

What underlying data the annotation is on: must be one of either "sources" or "spectra".

resource_id
required
string

The ID of the underlying data. This would be a string for a source ID or an integer for other data types like spectra.

Responses

Response samples

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

Retrieve an annotation

Retrieve an annotation

path Parameters
associated_resource_type
required
string
Enum: "sources" "spectra" "photometry"

What underlying data the annotation is on: must be one of "sources", "spectra", or "photometry."

resource_id
required
string

The ID of the underlying data. This would be a string for a source ID or an integer for other data types like spectra.

annotation_id
required
integer

Responses

Response samples

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

Retrieve a source

Retrieve a source

path Parameters
obj_id
required
string
query Parameters
includePhotometry
boolean

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

includeComments
boolean

Boolean indicating whether to include comment metadata in response. Defaults to false.

includeAnalyses
boolean

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

includePhotometryExists
boolean

Boolean indicating whether to return if a source has any photometry points. Defaults to false.

includeSpectrumExists
boolean

Boolean indicating whether to return if a source has a spectra. Defaults to false.

includeCommentExists
boolean

Boolean indicating whether to return if a source has a comment. Defaults to false.

includePeriodExists
boolean

Boolean indicating whether to return if a source has a period set. Defaults to false.

includeThumbnails
boolean

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

Responses

Response samples

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

Delete a source

Delete a source

path Parameters
obj_id
required
string
group_id
required
string

Responses

Response samples

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

Check if a Source exists

Check if a Source exists

path Parameters
obj_id
required
string

Responses

Response samples

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

Update a source

Update a source

path Parameters
obj_id
required
string
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
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.

redshift_history
any or null

Record of who set which redshift values and when.

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.

internal_key
string

Internal key used for secure websocket messaging.

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

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": [
    ],
  • "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": [
    ],
  • "sources": [
    ],
  • "users": [
    ]
}

Response samples

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

Retrieve all sources

Retrieve all sources

query Parameters
ra
number

RA for spatial filtering (in decimal degrees)

dec
number

Declination for spatial filtering (in decimal degrees)

radius
number

Radius for spatial filtering if ra & dec are provided (in decimal degrees)

sourceID
string

Portion of ID to filter on

rejectedSourceIDs
str

Comma-separated string of object IDs not to be returned, useful in cases where you are looking for new sources passing a query.

simbadClass
string

Simbad class to filter on

alias
Array of any

additional name for the same object

origin
string

who posted/discovered this source

hasTNSname
boolean

If true, return only those matches with TNS names

hasBeenLabelled
boolean

If true, return only those objects which have been labelled

hasNotBeenLabelled
boolean

If true, return only those objects which have not been labelled

currentUserLabeller
boolean

If true and one of hasBeenLabeller or hasNotBeenLabelled is true, return only those objects which have been labelled/not labelled by the current user. Otherwise, return results for all users.

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

totalMatches
integer

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

startDate
string

Arrow-parseable date string (e.g. 2020-01-01). If provided, filter by PhotStat.first_detected_mjd >= startDate

endDate
string

Arrow-parseable date string (e.g. 2020-01-01). If provided, filter by PhotStat.last_detected_mjd <= endDate

listName
string

Get only sources saved to the querying user's list, e.g., "favorites".

group_ids
list

If provided, filter only sources saved to one of these group IDs.

includeColorMagnitude
boolean

Boolean indicating whether to include the color-magnitude data from Gaia. This will only include data for objects that have an annotation with the appropriate format: an annotation that contains a dictionary with keys named Mag_G, Mag_Bp, Mag_Rp, and Plx (underscores and case are ignored when matching all the above keys). The result is saved in a field named 'color_magnitude'. If no data is available, returns an empty array. Defaults to false (do not search for nor include this info).

includeRequested
boolean

Boolean indicating whether to include requested saves. Defaults to false.

pendingOnly
boolean

Boolean indicating whether to only include requested/pending saves. Defaults to false.

savedBefore
string

Only return sources that were saved before this UTC datetime.

savedAfter
string

Only return sources that were saved after this UTC datetime.

hasSpectrumAfter
string

Only return sources with a spectrum saved after this UTC datetime

hasSpectrumBefore
string

Only return sources with a spectrum saved before this UTC datetime

saveSummary
boolean

Boolean indicating whether to only return the source save information in the response (defaults to false). If true, the response will contain a list of dicts with the following schema under response['data']['sources']:

    {
      "group_id": 2,
      "created_at": "2020-11-13T22:11:25.910271",
      "saved_by_id": 1,
      "saved_at": "2020-11-13T22:11:25.910271",
      "requested": false,
      "unsaved_at": null,
      "modified": "2020-11-13T22:11:25.910271",
      "obj_id": "16fil",
      "active": true,
      "unsaved_by_id": null
    }
sortBy
string

The field to sort by. Currently allowed options are ["id", "ra", "dec", "redshift", "saved_at"]

sortOrder
string

The sort order - either "asc" or "desc". Defaults to "asc"

includeComments
boolean

Boolean indicating whether to include comment metadata in response. Defaults to false.

includePhotometryExists
boolean

Boolean indicating whether to return if a source has any photometry points. Defaults to false.

includeSpectrumExists
boolean

Boolean indicating whether to return if a source has a spectra. Defaults to false.

includeLabellers
boolean

Boolean indicating whether to return list of users who have labelled this source. Defaults to false.

includeHosts
boolean

Boolean indicating whether to return source host galaxies. Defaults to false.

includeCommentExists
boolean

Boolean indicating whether to return if a source has a comment. Defaults to false.

removeNested
boolean

Boolean indicating whether to remove nested output. Defaults to false.

includeThumbnails
boolean

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

includeDetectionStats
boolean

Boolean indicating whether to include photometry detection statistics for each source (last detection and peak detection). Defaults to false.

classifications
Array of strings

Comma-separated string of "taxonomy: classification" pair(s) to filter for sources matching that/those classification(s), i.e. "Sitewide Taxonomy: Type II, Sitewide Taxonomy: AGN"

classifications_simul
boolean

Boolean indicating whether object must satisfy all classifications if query (i.e. an AND rather than an OR). Defaults to false.

nonclassifications
Array of strings

Comma-separated string of "taxonomy: classification" pair(s) to filter for sources NOT matching that/those classification(s), i.e. "Sitewide Taxonomy: Type II, Sitewide Taxonomy: AGN"

unclassified
boolean

Boolean indicating whether to reject any sources with classifications. Defaults to false.

annotationsFilter
Array of strings

Comma-separated string of "annotation: value: operator" triplet(s) to filter for sources matching that/those annotation(s), i.e. "redshift: 0.5: lt"

annotationsFilterOrigin
string

Comma separated string of origins. Only annotations from these origins are used when filtering with the annotationsFilter.

annotationsFilterBefore
string

Only return sources that have annotations before this UTC datetime.

annotationsFilterAfter
string

Only return sources that have annotations after this UTC datetime.

commentsFilter
Array of strings

Comma-separated string of comment text to filter for sources matching.

commentsFilterAuthor
string

Comma separated string of authors. Only comments from these authors are used when filtering with the commentsFilter.

commentsFilterBefore
string

Only return sources that have comments before this UTC datetime.

commentsFilterAfter
string

Only return sources that have comments after this UTC datetime.

minRedshift
number

If provided, return only sources with a redshift of at least this value

maxRedshift
number

If provided, return only sources with a redshift of at most this value

minPeakMagnitude
number

If provided, return only sources with a peak photometry magnitude of at least this value

maxPeakMagnitude
number

If provided, return only sources with a peak photometry magnitude of at most this value

minLatestMagnitude
number

If provided, return only sources whose latest photometry magnitude is at least this value

maxLatestMagnitude
number

If provided, return only sources whose latest photometry magnitude is at most this value

numberDetections
number

If provided, return only sources who have at least numberDetections detections.

hasSpectrum
boolean

If true, return only those matches with at least one associated spectrum

hasFollowupRequest
boolean

If true, return only those matches with at least one associated followup request

followupRequestStatus
string

If provided, string to match status of followup_request against

createdOrModifiedAfter
string

Arrow-parseable date-time string (e.g. 2020-01-01 or 2020-01-01T00:00:00 or 2020-01-01T00:00:00+00:00). If provided, filter by created_at or modified > createdOrModifiedAfter

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

localizationRejectSources
bool

Remove sources rejected in localization. Defaults to false.

spatialCatalogName
string

Name of spatial catalog to use. spatialCatalogEntryName must also be defined for use.

spatialCatalogEntryName
string

Name of spatial catalog entry to use. spatialCatalogName must also be defined for use.

includeGeoJSON
boolean

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

Responses

Response samples

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

Add a new source

Add a new source

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

List of associated group IDs. If not specified, all of the user or token's groups will be used.

refresh_source
bool

Refresh source upon post. Defaults to True.

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": [
    ],
  • "group_ids": [
    ],
  • "refresh_source": null
}

Response samples

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

Retrieve a source

Retrieve a source

path Parameters
obj_id
required
string

Retrieve all sources

Retrieve all sources

query Parameters
ra
number

RA for spatial filtering (in decimal degrees)

dec
number

Declination for spatial filtering (in decimal degrees)

radius
number

Radius for spatial filtering if ra & dec are provided (in decimal degrees)

Save or request group(s) to save source, and optio

Save or request group(s) to save source, and optionally unsave from group(s).

Request Body schema: application/json
objId
required
string

ID of the object in question.

inviteGroupIds
required
Array of integers

List of group IDs to save or invite to save specified source.

unsaveGroupIds
Array of integers

List of group IDs from which specified source is to be unsaved.

Responses

Request samples

Content type
application/json
{
  • "objId": "string",
  • "inviteGroupIds": [
    ],
  • "unsaveGroupIds": [
    ]
}

Response samples

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

Update a Source table row

Update a Source table row

path Parameters
obj_id
required
integer
Request Body schema: application/json
groupID
required
integer
active
required
boolean
requested
required
boolean

Responses

Request samples

Content type
application/json
{
  • "groupID": 0,
  • "active": true,
  • "requested": true
}

Response samples

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

gcn_events

Retrieve all comments associated with specified re

Retrieve all comments associated with specified resource

path Parameters
associated_resource_type
required
string
Value: "sources"

What underlying data the comment is on, e.g., "sources" or "spectra" or "gcn_event" or "earthquake" or "shift".

resource_id
required
string

The ID of the underlying data. This would be a string for a source ID or an integer for other data types like spectrum, gcn_event, earthquake, or shift.

Responses

Response samples

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

earthquakes

Retrieve all comments associated with specified re

Retrieve all comments associated with specified resource

path Parameters
associated_resource_type
required
string
Value: "sources"

What underlying data the comment is on, e.g., "sources" or "spectra" or "gcn_event" or "earthquake" or "shift".

resource_id
required
string

The ID of the underlying data. This would be a string for a source ID or an integer for other data types like spectrum, gcn_event, earthquake, or shift.

Responses

Response samples

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

Retrieve a comment

Retrieve a comment

path Parameters
associated_resource_type
required
string

What underlying data the comment is on: "sources" or "spectra" or "gcn_event" or "earthquake" or "shift".

resource_id
required
string
Enum: "sources" "spectra" "gcn_event"

The ID of the source, spectrum, gcn_event, earthquake, or shift that the comment is posted to. This would be a string for a source ID or an integer for a spectrum, gcn_event, earthquake, or shift.

comment_id
required
integer

Responses

Response samples

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

shifts

Retrieve all comments associated with specified re

Retrieve all comments associated with specified resource

path Parameters
associated_resource_type
required
string
Value: "sources"

What underlying data the comment is on, e.g., "sources" or "spectra" or "gcn_event" or "earthquake" or "shift".

resource_id
required
string

The ID of the underlying data. This would be a string for a source ID or an integer for other data types like spectrum, gcn_event, earthquake, or shift.

Responses

Response samples

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

Retrieve a comment

Retrieve a comment

path Parameters
associated_resource_type
required
string

What underlying data the comment is on: "sources" or "spectra" or "gcn_event" or "earthquake" or "shift".

resource_id
required
string
Enum: "sources" "spectra" "gcn_event"

The ID of the source, spectrum, gcn_event, earthquake, or shift that the comment is posted to. This would be a string for a source ID or an integer for a spectrum, gcn_event, earthquake, or shift.

comment_id
required
integer

Responses

Response samples

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

Get a summary of all the activity of shift users o

Get a summary of all the activity of shift users on skyportal for a given period

path Parameters
shift_id
required
integer
query Parameters
startDate
string

Arrow-parseable date string (e.g. 2020-01-01). If provided, filter by shift.start_date >= startDate

Responses

Response samples

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

Retrieve shifts

Retrieve shifts

path Parameters
shift_id
required
integer
query Parameters
group_id
integer

Responses

Response samples

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

Delete a shift

Delete a shift

path Parameters
shift_id
required
integer

Responses

Response samples

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

Update a shift

Update a shift

path Parameters
shift_id
required
integer
Request Body schema: application/json
group
any or null

The Shift's Group.

users
Array of any
shift_users
Array of any
comments
Array of any
reminders
Array of any
name
string or null

Name of the shift.

description
string or null

Longer description of the shift.

start_date
required
string <date-time>

The start time of this shift.

end_date
required
string <date-time>

The end time of this shift.

group_id
required
integer

ID of the Shift's Group.

required_users_number
integer or null

The number of users required to join this shift for it to be considered full

Responses

Request samples

Content type
application/json
{
  • "group": null,
  • "users": [
    ],
  • "shift_users": [
    ],
  • "comments": [
    ],
  • "reminders": [
    ],
  • "name": "string",
  • "description": "string",
  • "start_date": "2019-08-24T14:15:22Z",
  • "end_date": "2019-08-24T14:15:22Z",
  • "group_id": 0,
  • "required_users_number": 0
}

Response samples

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

Add a new shift

Add a new shift

Request Body schema: application/json
group
any or null

The Shift's Group.

users
Array of any
shift_users
Array of any
comments
Array of any
reminders
Array of any
name
string or null

Name of the shift.

description
string or null

Longer description of the shift.

start_date
required
string <date-time>

The start time of this shift.

end_date
required
string <date-time>

The end time of this shift.

group_id
required
integer

ID of the Shift's Group.

required_users_number
integer or null

The number of users required to join this shift for it to be considered full

shift_admins
Array of integers

List of IDs of users to be shift admins. Current user will automatically be added as a shift admin.

Responses

Request samples

Content type
application/json
{
  • "group": null,
  • "users": [
    ],
  • "shift_users": [
    ],
  • "comments": [
    ],
  • "reminders": [
    ],
  • "name": "string",
  • "description": "string",
  • "start_date": "2019-08-24T14:15:22Z",
  • "end_date": "2019-08-24T14:15:22Z",
  • "group_id": 0,
  • "required_users_number": 0,
  • "shift_admins": [
    ]
}

Response samples

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

Add a shift user

Add a shift user

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

Responses

Request samples

Content type
application/json
{
  • "userID": 0,
  • "admin": true
}

Response samples

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

Delete a shift user

Delete a shift user

path Parameters
shift_id
required
integer
user_id
required
integer

Responses

Response samples

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

Update a shift user's admin status, or needs_repla

Update a shift user's admin status, or needs_replacement status

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

Boolean indicating whether user is shift admin.

needs_replacement
boolean

Boolean indicating whether user needs replacement or not

Responses

Request samples

Content type
application/json
{
  • "userID": 0,
  • "admin": true,
  • "needs_replacement": true
}

Response samples

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

annotations

Retrieve all annotations associated with specified

Retrieve all annotations associated with specified resource

path Parameters
associated_resource_type
required
string
Enum: "sources" "spectra"

What underlying data the annotation is on: must be one of either "sources" or "spectra".

resource_id
required
string

The ID of the underlying data. This would be a string for a source ID or an integer for other data types like spectra.

Responses

Response samples

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

Retrieve all annotations associated with specified

Retrieve all annotations associated with specified resource

path Parameters
associated_resource_type
required
string
Enum: "sources" "spectra"

What underlying data the annotation is on: must be one of either "sources" or "spectra".

resource_id
required
string

The ID of the underlying data. This would be a string for a source ID or an integer for other data types like spectra.

Responses

Response samples

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

Update an annotation

Update an annotation

path Parameters
associated_resource_type
required
string

What underlying data the annotation is on: must be one of "sources", "spectra", or "photometry."

resource_id
required
string

The ID of the underlying data. This would be a string for a source ID or an integer for other data types like spectrum.

annotation_id
required
integer
Request Body schema: application/json
author
any or null

Annotation's author.

obj
any or null

The Annotation's Obj.

groups
Array of any
data
required
any

Searchable data in JSON format

origin
required
string

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

author_id
required
integer

ID of the Annotation author's User instance.

obj_id
required
string

ID of the Annotation's Obj.

group_ids
Array of integers

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

Responses

Request samples

Content type
application/json
{
  • "author": null,
  • "obj": null,
  • "groups": [
    ],
  • "data": null,
  • "origin": "string",
  • "author_id": 0,
  • "obj_id": "string",
  • "group_ids": [
    ]
}

Response samples

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

Post an annotation

Post an annotation

path Parameters
associated_resource_type
required
string

What underlying data the annotation is on: must be one of "sources", "spectra", or "photometry."

resource_id
required
string

The ID of the underlying data. This would be a string for an object ID, or an integer for other data types, e.g., a spectrum.

Request Body schema: application/json
origin
required
string

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

data
required
object
group_ids
Array of integers

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

Responses

Request samples

Content type
application/json
{
  • "origin": "string",
  • "data": { },
  • "group_ids": [
    ]
}

Response samples

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

Delete an annotation

Delete an annotation

path Parameters
associated_resource_type
required
string

What underlying data the annotation is on: must be one of "sources", "spectra", or "photometry."

resource_id
required
string

The ID of the underlying data. This would be a string for a source ID or an integer for a spectrum.

annotation_id
required
integer

Responses

Response samples

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

Retrieve an annotation

Retrieve an annotation

path Parameters
associated_resource_type
required
string
Enum: "sources" "spectra" "photometry"

What underlying data the annotation is on: must be one of "sources", "spectra", or "photometry."

resource_id
required
string

The ID of the underlying data. This would be a string for a source ID or an integer for other data types like spectra.

annotation_id
required
integer

Responses

Response samples

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

Update an annotation

Update an annotation

path Parameters
associated_resource_type
required
string

What underlying data the annotation is on: must be one of "sources", "spectra", or "photometry."

resource_id
required
string

The ID of the underlying data. This would be a string for a source ID or an integer for other data types like spectrum.

annotation_id
required
integer
Request Body schema: application/json
author
any or null

Annotation's author.

obj
any or null

The Annotation's Obj.

groups
Array of any
data
required
any

Searchable data in JSON format

origin
required
string

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

author_id
required
integer

ID of the Annotation author's User instance.

obj_id
required
string

ID of the Annotation's Obj.

group_ids
Array of integers

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

Responses

Request samples

Content type
application/json
{
  • "author": null,
  • "obj": null,
  • "groups": [
    ],
  • "data": null,
  • "origin": "string",
  • "author_id": 0,
  • "obj_id": "string",
  • "group_ids": [
    ]
}

Response samples

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

Delete an annotation

Delete an annotation

path Parameters
associated_resource_type
required
string

What underlying data the annotation is on: must be one of "sources", "spectra", or "photometry."

resource_id
required
string

The ID of the underlying data. This would be a string for a source ID or an integer for a spectrum.

annotation_id
required
integer

Responses

Response samples

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

photometry

Retrieve all annotations associated with specified

Retrieve all annotations associated with specified resource

path Parameters
associated_resource_type
required
string
Enum: "sources" "spectra"

What underlying data the annotation is on: must be one of either "sources" or "spectra".

resource_id
required
string

The ID of the underlying data. This would be a string for a source ID or an integer for other data types like spectra.

Responses

Response samples

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

Get all GCN Event tags

Get all GCN Event tags

Responses

Response samples

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

Get all GCN Event properties

Get all GCN Event properties

Responses

Response samples

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

retrieve the PhotStat associated with the obj_id.

retrieve the PhotStat associated with the obj_id.

path Parameters
obj_id
required
string

object ID to get statistics on

Responses

Response samples

Content type
application/json
{
  • "obj": null,
  • "last_update": "2019-08-24T14:15:22Z",
  • "last_full_update": "2019-08-24T14:15:22Z",
  • "obj_id": "string",
  • "num_obs_global": 0,
  • "num_obs_per_filter": null,
  • "num_det_global": 0,
  • "num_det_per_filter": null,
  • "first_detected_mjd": 0,
  • "first_detected_mag": 0,
  • "first_detected_filter": "string",
  • "last_detected_mjd": 0,
  • "last_detected_mag": 0,
  • "last_detected_filter": "string",
  • "recent_obs_mjd": 0,
  • "predetection_mjds": null,
  • "last_non_detection_mjd": 0,
  • "time_to_non_detection": 0,
  • "mean_mag_global": 0,
  • "mean_mag_per_filter": null,
  • "mean_color": null,
  • "peak_mjd_global": 0,
  • "peak_mjd_per_filter": null,
  • "peak_mag_global": 0,
  • "peak_mag_per_filter": null,
  • "faintest_mag_global": 0,
  • "faintest_mag_per_filter": null,
  • "deepest_limit_global": 0,
  • "deepest_limit_per_filter": null,
  • "rise_rate": 0,
  • "decay_rate": 0,
  • "mag_rms_global": 0,
  • "mag_rms_per_filter": null,
  • "id": 0
}

create or update the PhotStat associated with the

create or update the PhotStat associated with the obj_id.

path Parameters
obj_id
required
string

object ID to get statistics on

Responses

Response samples

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

create a new PhotStat to be associated with the ob

create a new PhotStat to be associated with the obj_id.

path Parameters
obj_id
required
string

object ID to get statistics on

Responses

Response samples

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

delete the PhotStat associated with the obj_id.

delete the PhotStat associated with the obj_id.

path Parameters
obj_id
required
string

object ID to get statistics on

Responses

Response samples

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

find the number of sources with and without a Phot

find the number of sources with and without a PhotStat object

query Parameters
createdAtStartTime
string

arrow parseable string, only objects that have been created after this time will be checked for missing/existing PhotStats.

createdAtEndTime
string

arrow parseable string, only objects that have been created before this time will be checked for missing/existing PhotStats.

quickUpdateStartTime
string

arrow parseable string, any object's PhotStat that has been updated (either full update or an update at insert time) after this time will be recalculated.

quickUpdateEndTime
string

arrow parseable string, any object's PhotStat that has been updated (either full update or an update at insert time) before this time will be recalculated.

fullUpdateStartTime
string

arrow parseable string, any object's PhotStat that has been fully updated after this time will be counted.

fullUpdateEndTime
string

arrow parseable string, any object's PhotStat that has been fully updated before this time will be counted.

Responses

Response samples

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

calculate photometric stats for a batch of sources

calculate photometric stats for a batch of sources without a PhotStat

query Parameters
numPerPage
integer

Number of sources to check for updates. Defaults to 100. Max 500.

pageNumber
integer

Page number for iterating through all sources. Defaults to 1

createdAtStartTime
string

arrow parseable string, only objects that have been created after this time will be checked for missing PhotStats.

createdAtEndTime
string

arrow parseable string, only objects that have been created before this time will be checked for missing PhotStats.

Responses

Response samples

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

manually recalculate the photometric stats for a b

manually recalculate the photometric stats for a batch of sources

query Parameters
numPerPage
integer

Number of sources to check for updates. Defaults to 100. Max 500.

pageNumber
integer

Page number for iterating through all sources. Defaults to 1

createdAtStartTime
string

arrow parseable string, only objects that have been created after this time will be checked for missing/existing PhotStats.

createdAtEndTime
string

arrow parseable string, only objects that have been created before this time will be checked for missing/existing PhotStats.

quickUpdateStartTime
string

arrow parseable string, any object's PhotStat that has been updated (either full update or an update at insert time) after this time will be recalculated.

quickUpdateEndTime
string

arrow parseable string, any object's PhotStat that has been updated (either full update or an update at insert time) before this time will be recalculated.

fullUpdateStartTime
string

arrow parseable string, any object's PhotStat that has been fully updated after this time will be recalculated.

fullUpdateEndTime
string

arrow parseable string, any object's PhotStat that has been fully updated before this time will be recalculated.

Responses

Response samples

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

Get all Localization tags

Get all Localization tags

Responses

Response samples

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

Get all Localization properties

Get all Localization properties

Responses

Response samples

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

Retrieve photometry

Retrieve photometry

path Parameters
photometry_id
required
integer
query Parameters
format
string
Enum: "mag" "flux"

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

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

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

Responses

Response samples

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

Delete photometry

Delete photometry

path Parameters
photometry_id
required
integer

Responses

Response samples

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

Update photometry

Update photometry

path Parameters
photometry_id
required
integer
Request Body schema: application/json
One of
instrument_id
required
integer

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

ra_unc
number or null
Default: null

Uncertainty on RA [arcsec].

e_magref
any or null
Default: null

Gaussian error on the reference magnitude. Can be given as a scalar or a 1D list. If a scalar, will be broadcast to all values given as lists. Null values allowed.

mag
number or null
Default: null

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

dec_unc
number or null
Default: null

Uncertainty on dec [arcsec].

magerr
number or null
Default: null

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

obj_id
required
string

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

magsys
required
any
Enum: "jla1" "ab" "vega" "bd17" "csp" "ab-b12"

The magnitude system to which the flux and the zeropoint are tied.

ra
number or null
Default: null

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

magref
any or null
Default: null

Magnitude of the reference image. in the magnitude system magsys. Can be given as a scalar or a 1D list. If a scalar, will be broadcast to all values given as lists. Null values allowed if no reference is given.

limiting_mag
required
number

Limiting magnitude of the image in the magnitude system magsys.

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

The bandpass of the observation.

origin
any or null
Default: null

Provenance of the Photometry. If a record is already present with identical origin, only the groups or streams list will be updated (other data assumed identical). Defaults to None.

alert_id
integer or null
Default: null

Corresponding alert ID. If a record is already present with identical alert ID, only the groups list will be updated (other alert data assumed identical). Defaults to None.

altdata
object or null
Default: null

Misc. alternative metadata stored in JSON format, e.g. {'calibration': {'source': 'ps1','color_term': 0.012}, 'photometry_method': 'allstar', 'method_reference': 'Masci et al. (2015)'}

dec
number or null
Default: null

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

mjd
required
number

MJD of the observation.

assignment_id
integer or null
Default: null

ID of the classical assignment which generated the photometry

Responses

Request samples

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

Response samples

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

Update and/or upload photometry, resolving potenti

Update and/or upload photometry, resolving potential duplicates

Request Body schema: application/json
One of
instrument_id
required
any

ID of the Instrument(s) with which the photometry was acquired. Can be given as a scalar or a 1D list. If a scalar, will be broadcast to all values given as lists. Null values are not allowed.

dec_unc
any or null
Default: null

Uncertainty on dec [arcsec]. Can be given as a scalar or a 1D list. If a scalar, will be broadcast to all values given as lists. Null values allowed.

magref
any or null
Default: null

Magnitude of the reference image. in the magnitude system magsys. Can be given as a scalar or a 1D list. If a scalar, will be broadcast to all values given as lists. Null values allowed if no reference is given.

stream_ids
any
Default: []

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

magsys
required
any

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

altdata
any or null
Default: null

Misc. alternative metadata stored in JSON format, e.g. {'calibration': {'source': 'ps1','color_term': 0.012}, 'photometry_method': 'allstar', 'method_reference': 'Masci et al. (2015)'}. Can be a list of dicts or a single dict which will be broadcast to all values.

ra_unc
any or null
Default: null

Uncertainty on RA [arcsec]. Can be given as a scalar or a 1D list. If a scalar, will be broadcast to all values given as lists. Null values allowed.

mag
any or null
Default: null

Magnitude of the observation in the magnitude system magsys. Can be given as a scalar or a 1D list. If a scalar, will be broadcast to all values given as lists. Null values allowed for non-detections. If mag is null, the corresponding magerr must also be null.

dec
any or null
Default: null

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

assignment_id
integer or null
Default: null

ID of the classical assignment which generated the photometry

limiting_mag_nsigma
any
Default: 3

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

ra
any or null
Default: null

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

filter
required
any

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

origin
any or null
Default: null

Provenance of the Photometry. If a record is already present with identical origin, only the groups or streams list will be updated (other data assumed identical). Defaults to None.

mjd
required
any

MJD of the observation(s). Can be a given as a scalar or a 1D list. If a scalar, will be broadcast to all values given as lists. Null values not allowed.

group_ids
any
Default: []

List of group IDs to which photometry points will be visible. If 'all', will be shared with site-wide public group (visible to all users who can view associated source).

e_magref
any or null
Default: null

Gaussian error on the reference magnitude. Can be given as a scalar or a 1D list. If a scalar, will be broadcast to all values given as lists. Null values allowed.

obj_id
required
any

ID of the Obj(s) to which the photometry will be attached. Can be given as a scalar or a 1D list. If a scalar, will be broadcast to all values given as lists. Null values are not allowed.

magerr
any or null
Default: null

Error on the magnitude in the magnitude system magsys. Can be given as a scalar or a 1D list. If a scalar, will be broadcast to all values given as lists. Null values allowed for non-detections. If magerr is null, the corresponding mag must also be null.

limiting_mag
required
any

Limiting magnitude of the image in the magnitude system magsys. Can be given as a scalar or a 1D list. If a scalar, will be broadcast to all values given as lists. Null values not allowed.

Responses

Request samples

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

Response samples

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

Retrieve a photometric series

Retrieve a photometric series

path Parameters
photometric_series_id
required
integer
query Parameters
dataFormat
string
Enum: "json" "hdf5" "none"

Format of the data to return. If none, the data will not be returned. If hdf5, the data will be returned as a bytestream in HDF5 format. (to see how to unpack this data format, look at photometric_series.md) If json, the data will be returned as a JSON object, where each key is a list of values for that column.

Responses

Response samples

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

Delete a photometric series

Delete a photometric series

path Parameters
photometric_series_id
required
integer

Responses

Response samples

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

Retrieve all photometric series, based on various

Retrieve all photometric series, based on various cuts.

query Parameters
dataFormat
string
Enum: "json" "hdf5" "none"

Format of the data to return. If none, the data will not be returned. If hdf5, the data will be returned as a bytestream in HDF5 format. (to see how to unpack this data format, look at photometric_series.md) If json, the data will be returned as a JSON object, where each key is a list of values for that column. Note that when querying multiple series, the actual data is not returned by default. To specifically request the data, use dataFormat=json or dataFormat=hdf5. Keep in mind this could be a large amount of data if the query arguments do not filter down the number of returned series.

ra
number

RA for spatial filtering (in decimal degrees)

dec
number

Declination for spatial filtering (in decimal degrees)

radius
number

Radius for spatial filtering if ra & dec are provided (in decimal degrees)

objectID
string

Portion of ID to filter on

rejectedObjectIDs
str

Comma-separated string of object IDs not to be returned, useful in cases where you are looking for new objects passing a query.

seriesName
string

Get series that match this name. The match must be exact. This is useful when getting photometry for multiple objects taken at the same time (e.g., for calibrating against each other). The series name can be, e.g., a TESS sector, or a date/field name identifier. Generally a series name is shared only by data taken over that same time period.

seriesObjID
string

Get only photometry for the objects named by this object id. This is the internal naming used inside each photometric series, i.e., the index used for each source in the images that were used to create the photometric series. Not the same as the SkyPortal object ID. E.g., this could be a TESS TIC ID, or some internal numbering used in the specific field that was observed.

filter
string

Retrieve only series matching this filter, e.g., "ztfg".

channel
string

The channel name/id to filter on.

origin
string

The origin can be anything that gives an idea of the provenance of the photometric series. This can be, e.g., the name of the pipeline that produced the photometry from the images, or the level of calibration, or any other pre-defined string that identifies where the data came from that isn't covered by the other fields (like channel or filter or instrument).

filename
string

Portion of filename to filter on. If the filename is a relative path, will append the data directory from the config file to the beginning of the filename. (by default that is 'persistentdata/phot_series').

startBefore
string

Arrow-parseable date string (e.g. 2020-01-01). If provided, return only series that started before this time.

startAfter
string

Arrow-parseable date string (e.g. 2020-01-01). If provided, return only series that started after this time.

midTimeBefore
string

Arrow-parseable date string (e.g. 2020-01-01). If provided, return only series where the middle of the series was observed before this time.

midTimeAfter
string

Arrow-parseable date string (e.g. 2020-01-01). If provided, return only series where the middle of the series was observed after this time.

endBefore
string

Arrow-parseable date string (e.g. 2020-01-01). If provided, return only series that ended before this time.

endAfter
string

Arrow-parseable date string (e.g. 2020-01-01). If provided, return only series that ended after this time.

detected
boolean

If true, get only series with one or more detections. If false, get only series with no detections. If left out, do not filter at all on detection status.

expTime
number

Get only series with this exact exposure time (seconds).

minExpTime
number

Get only series with an exposure time above/equal to this. If the series was not uploaded with one specific number, the exposure time for the series is the median of the exposure times of the individual images.

maxExpTime
number

Get only series with an exposure time under/equal to this. If the series was not uploaded with one specific number, the exposure time for the series is the median of the exposure times of the individual images.

minFrameRate
number

Get only series with a frame rate higher/equal to than this. Frame rates are the inverse of the median time between exposures, in units of 1/s (Hz).

maxFrameRate
number

Get only series with a frame rate lower/equal to than this. Frame rates are the inverse of the median time between exposures, in units of 1/s (Hz).

minNumExposures
number

Get only series with this many exposures, or more.

maxNumExposures
number

Get only series with this many exposures, or less.

instrumentID
number

get only series taken with this instrument.

followupRequestID
number

get only series taken with this followup request.

assignmentID
number

get only series taken with this assignment.

ownerID
number

get only series uploaded by this user.

magBrighterThan
number

get only series with mean_mag brighter or equal to this value.

magFainterThan
number

get only series with mean_mag fainter or equal to this value.

limitingMagBrighterThan
number

Retrieve only series with limiting mags brighter or equal to this value.

limitingMagFainterThan
number

Retrieve only series with limiting mags fainter or equal to this value.

limitingMagIsNone
boolean

Retrieve only series that do not have limiting mag.

magrefBrighterThan
number

Get only series that have a magref, and that the magref is brighter or equal to this value.

magrefFainterThan
number

Get only series that have a magref, and that the magref is fainter or equal to this value.

maxRMS
number

get only series with rms_mag less than this.

minRMS
number

get only series with rms_mag more than this.

useRobustMagAndRMS
boolean

If true, will use the robust_mag and robust_rms values instead of mean_mag and rms_mag when filtering on mean magnitude or RMS. Does not affect the magref query.

maxMedianSNR
number

Get only series where the median S/N is less than this. The S/N is calculated using the robust RMS.

minMedianSNR
number

Get only series where the median S/N is more than this. The S/N is calculated using the robust RMS.

maxBestSNR
number

Get only series where the maximum S/N is less than this. The S/N is calculated using the robust RMS.

minBestSNR
number

Get only series where the maximum S/N is more than this. The S/N is calculated using the robust RMS.

maxWorstSNR
number

Get only series where the lowest S/N is less than this. The S/N is calculated using the robust RMS.

minWorstSNR
number

Get only series where the lowest S/N is more than this. The S/N is calculated using the robust RMS.

hash
string

Get only a series that matches this file hash. This is useful if you have an HDF5 file downloaded from the SkyPortal backend, and want to associate it with a PhotometrySeries object. We use an MD5 hash of the file contents.

sortBy
string

The field to sort by. Currently allowed options are ["id", "ra", "dec", "redshift", "saved_at"]

sortOrder
string

The sort order - either "asc" or "desc". Defaults to "asc"

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": {
    }
}

Delete bulk-uploaded photometry set

Delete bulk-uploaded photometry set

path Parameters
upload_id
required
string

Responses

Response samples

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

Get photometry taken by specific instruments over

Get photometry taken by specific instruments over a date range

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

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

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

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

Request Body schema: application/json
min_date
string or null <date-time>
Default: null

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

max_date
string or null <date-time>
Default: null

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

instrument_ids
Array of integers or null
Default: null

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

Responses

Request samples

Content type
application/json
{
  • "min_date": null,
  • "max_date": null,
  • "instrument_ids": null
}

Response samples

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

Get all photometry origins

Get all photometry origins

Responses

Response samples

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

Copy all photometry points from one source to anot

Copy all photometry points from one source to another

path Parameters
target_id
required
string

The obj_id of the target Source (to which the photometry is being copied to)

Request Body schema: application/json
group_ids
required
Array of integers

List of IDs of groups to give photometry access to

origin_id
required
string

The ID of the Source's Obj the photometry is being copied from

Responses

Request samples

Content type
application/json
{
  • "group_ids": [
    ],
  • "origin_id": "string"
}

Response samples

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

Retrieve all photometry associated with an Object

Retrieve all photometry associated with an Object

path Parameters
obj_id
required
string

ID of the object to retrieve photometry for

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

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

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

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

individualOrSeries
string
Enum: "individual" "series" "both"

Whether to return individual photometry points, photometric series, or both (Default).

phaseFoldData
boolean

Boolean indicating whether to phase fold the light curve. Defaults to false.

Responses

Response samples

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

Delete object photometry

Delete object photometry

path Parameters
obj_id
required
string

Responses

Response samples

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

Retrieve all annotations associated with specified

Retrieve all annotations associated with specified resource

path Parameters
associated_resource_type
required
string
Enum: "sources" "spectra"

What underlying data the annotation is on: must be one of either "sources" or "spectra".

resource_id
required
string

The ID of the underlying data. This would be a string for a source ID or an integer for other data types like spectra.

Responses

Response samples

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

Retrieve an annotation

Retrieve an annotation

path Parameters
associated_resource_type
required
string
Enum: "sources" "spectra" "photometry"

What underlying data the annotation is on: must be one of "sources", "spectra", or "photometry."

resource_id
required
string

The ID of the underlying data. This would be a string for a source ID or an integer for other data types like spectra.

annotation_id
required
integer

Responses

Response samples

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

gcnevents

Get observation plan requests of the GcnEvent.

Get observation plan requests of the GcnEvent.

path Parameters
gcnevent_id
required
string

Responses

Response samples

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

Get survey efficiency analyses of the GcnEvent.

Get survey efficiency analyses of the GcnEvent.

path Parameters
gcnevent_id
required
string

Responses

Response samples

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

Get catalog queries of the GcnEvent.

Get catalog queries of the GcnEvent.

path Parameters
gcnevent_id
required
string

Responses

Response samples

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

Post a GCN Event alias

Post a GCN Event alias

path Parameters
dateobs
required
string

The dateobs of the event, as an arrow parseable string

Request Body schema: application/json
alias
required
string

Alias to add to the event

Responses

Request samples

Content type
application/json
{
  • "alias": "string"
}

Response samples

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

Delete a GCN event alias

Delete a GCN event alias

path Parameters
dateobs
required
dateobs
Request Body schema: application/json
alias
required
string

Alias to remove from the event

Responses

Request samples

Content type
application/json
{
  • "alias": "string"
}

Response samples

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

Delete a GCN event tag

Delete a GCN event tag

path Parameters
dateobs
required
dateobs
query Parameters
tag
required
tag

Responses

Response samples

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

Ingest GCN xml file

Ingest GCN xml file

Request Body schema: application/json
xml
string

VOEvent XML content.

Responses

Request samples

Content type
application/json
{
  • "xml": "string"
}

Response samples

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

Delete a GCN event

Delete a GCN event

path Parameters
dateobs
required
dateobs

Responses

Response samples

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

reminders

Retrieve a reminder

Retrieve a reminder

path Parameters
associated_resource_type
required
string
Enum: "source" "spectra" "gcn_event" "shift" "earthquake"

What underlying data the reminder is on: "sources" or "spectra" or "gcn_event" or "shift" or "earthquake"

resource_id
required
string

The ID of the source, spectrum, gcn_event or shift that the reminder is posted to. This would be a string for a source ID or an integer for a spectrum or gcn_event

reminder_id
required
integer

Responses

Response samples

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

Post a reminder

Post a reminder

path Parameters
associated_resource_type
required
string
Enum: "source" "spectra" "gcn_event" "shift"

What underlying data the reminder is on: "sources" or "spectra" or "gcn_event" or "shift".

resource_id
required
string

The ID of the source or spectrum that the reminder is posted to. This would be a string for a source ID or an integer for a spectrum.

Request Body schema: application/json
text
required
string
group_ids
Array of integers

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

Responses

Request samples

Content type
application/json
{
  • "text": "string",
  • "group_ids": [
    ]
}

Response samples

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

Delete a reminder

Delete a reminder

path Parameters
associated_resource_type
required
string
Enum: "source" "spectra" "gcn_event" "shift"

What underlying data the reminder is on: "sources" or "spectra" or "gcn_event" or "shift".

resource_id
required
string

The ID of the source or spectrum that the reminder is posted to. This would be a string for a source ID or an integer for a spectrum or gcn_event.

reminder_id
required
integer

Responses

Response samples

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

Update a reminder

Update a reminder

path Parameters
associated_resource_type
required
string
Enum: "source" "spectra" "gcn_event" "shift"

What underlying data the reminder is on: "sources" or "spectra" or "gcn_event" or "shift".

resource_id
required
string

The ID of the source or spectrum that the reminder is posted to. This would be a string for an object ID or an integer for a spectrum, gcn_event or shift.

reminder_id
required
integer
Request Body schema: application/json
obj
any or null

The Reminder's Obj.

user
any or null

Reminder's user.

groups
Array of any
obj_id
required
string

ID of the Reminder's Obj.

text
required
string

Reminder body.

origin
string or null

Reminder origin.

bot
boolean

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

next_reminder
required
string <date-time>

Next reminder.

reminder_delay
required
number

Delay until next reminder in days.

number_of_reminders
required
integer

Number of remaining requests.

user_id
required
integer

ID of the Reminder User instance.

group_ids
Array of integers

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

Responses

Request samples

Content type
application/json
{
  • "obj": null,
  • "user": null,
  • "groups": [
    ],
  • "obj_id": "string",
  • "text": "string",
  • "origin": "string",
  • "bot": true,
  • "next_reminder": "2019-08-24T14:15:22Z",
  • "reminder_delay": 0,
  • "number_of_reminders": 0,
  • "user_id": 0,
  • "group_ids": [
    ]
}

Response samples

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

Retrieve all reminders associated with specified r

Retrieve all reminders associated with specified resource

path Parameters
associated_resource_type
required
string
Enum: "source" "spectra" "gcn_event" "shift"

What underlying data the reminder is on: "sources" or "spectra" or "gcn_event" or "shift" or "earthquake".

resource_id
required
string

The ID of the underlying data. This would be a string for a source ID or an integer for other data types like spectrum or gcn_event.

Responses

Response samples

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

gcn_event

Retrieve all reminders associated with specified r

Retrieve all reminders associated with specified resource

path Parameters
associated_resource_type
required
string
Enum: "source" "spectra" "gcn_event" "shift"

What underlying data the reminder is on: "sources" or "spectra" or "gcn_event" or "shift" or "earthquake".

resource_id
required
string

The ID of the underlying data. This would be a string for a source ID or an integer for other data types like spectrum or gcn_event.

Responses

Response samples

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

Scrape data of a GCN Event from GraceDB

Scrape data of a GCN Event from GraceDB

path Parameters
dateobs
required
string

The dateobs of the event, as an arrow parseable string

Responses

Response samples

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

Scrape aliases of a GCN Event from GCNs notice/cir

Scrape aliases of a GCN Event from GCNs notice/circulars

path Parameters
dateobs
required
string

The dateobs of the event, as an arrow parseable string

Responses

Response samples

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

earthquake

Retrieve all reminders associated with specified r

Retrieve all reminders associated with specified resource

path Parameters
associated_resource_type
required
string
Enum: "source" "spectra" "gcn_event" "shift"

What underlying data the reminder is on: "sources" or "spectra" or "gcn_event" or "shift" or "earthquake".

resource_id
required
string

The ID of the underlying data. This would be a string for a source ID or an integer for other data types like spectrum or gcn_event.

Responses

Response samples

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

earthquakenotices

Ingest EarthquakeEvent

Ingest EarthquakeEvent

Request Body schema: application/json
sent_by
any or null

The user that saved this EarthquakeEvent

notices
Array of any
predictions
Array of any
measurements
Array of any
comments
Array of any
reminders
Array of any
sent_by_id
required
integer

The ID of the User who created this GcnTag.

event_id
required
string
event_uri
string or null
status
string

The status of the earthquake event.

Responses

Request samples

Content type
application/json
{
  • "sent_by": null,
  • "notices": [
    ],
  • "predictions": [
    ],
  • "measurements": [
    ],
  • "comments": [
    ],
  • "reminders": [
    ],
  • "sent_by_id": 0,
  • "event_id": "string",
  • "event_uri": "string",
  • "status": "string"
}

Response samples

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

gcn

Retrieve a GCN summary

Retrieve a GCN summary

path Parameters
dateobs
required
string
summary_id
required
integer

Responses

Response samples

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

Delete a GCN summary

Delete a GCN summary

path Parameters
summary_id
required
integer

Responses

Response samples

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

Get a summary of all the activity of shift users o

Get a summary of all the activity of shift users on skyportal for a given period

path Parameters
shift_id
required
integer
query Parameters
startDate
string

Arrow-parseable date string (e.g. 2020-01-01). If provided, filter by shift.start_date >= startDate

Responses

Response samples

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

gcnsummarys

Post a summary of a GCN event.

Post a summary of a GCN event.

Responses

Response samples

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

localizations

Compute instrument field probabilities for a skyma

Compute instrument field probabilities for a skymap

path Parameters
dateobs
required
string
Instrument ID
required
integer
query Parameters
localization_name
required
string

Localization map name

integrated_probability
float

Cumulative integrated probability threshold

Responses

Response samples

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

Ingest GCN xml file

Ingest GCN xml file

Request Body schema: application/json
xml
string

VOEvent XML content.

Responses

Request samples

Content type
application/json
{
  • "xml": "string"
}

Response samples

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

Create a summary plot for the observability for a

Create a summary plot for the observability for a given event.

path Parameters
localization_id
required
integer

ID of localization to generate observability plot for

query Parameters
maximumAirmass
number

Maximum airmass to consider. Defaults to 2.5.

twilight
string

Twilight definition. Choices are astronomical (-18 degrees), nautical (-12 degrees), and civil (-6 degrees).

Responses

Response samples

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

Create a summary plot for the observability for a

Create a summary plot for the observability for a given event.

path Parameters
localization_id
required
integer

ID of localization to generate map for

query Parameters
maximumAirmass
number

Maximum airmass to consider. Defaults to 2.5.

twilight
string

Twilight definition. Choices are astronomical (-18 degrees), nautical (-12 degrees), and civil (-6 degrees).

Responses

Response samples

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

Download a GCN localization skymap

Download a GCN localization skymap

path Parameters
dateobs
required
string
localization_name
required
string

Responses

Response samples

Content type
application/json
{
  • "flat_2d": [
    ],
  • "dateobs": "string",
  • "localization_name": "string",
  • "contour": null
}

Retrieve a GCN localization

Retrieve a GCN localization

path Parameters
dateobs
required
dateobs
localization_name
required
localization_name
query Parameters
include2DMap
boolean

Boolean indicating whether to include flatted skymap. Defaults to false.

Responses

Response samples

Content type
application/json
{
  • "flat_2d": [
    ],
  • "dateobs": "string",
  • "localization_name": "string",
  • "contour": null
}

Delete a GCN localization

Delete a GCN localization

path Parameters
dateobs
required
string
localization_name
required
string

Responses

Response samples

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

A fits file corresponding to the intersection of t

A fits file corresponding to the intersection of the input fits files.

path Parameters
dateobs
required
dateobs
localization_name
required
localization_name

Responses

Response samples

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

Post a skymap-based trigger

Post a skymap-based trigger

Request Body schema: application/json
localization_id
required
integer

Localization ID.

allocation_id
required
integer

Followup request allocation ID.

integrated_probability
number

Integrated probability within skymap.

Responses

Request samples

Content type
application/json
{
  • "localization_id": 0,
  • "allocation_id": 0,
  • "integrated_probability": 0
}

Response samples

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

Create a summary plot for the observability for a

Create a summary plot for the observability for a given source.

path Parameters
obj_id
required
string

ID of object to generate observability plot for

query Parameters
maximumAirmass
number

Maximum airmass to consider. Defaults to 2.5.

twilight
string

Twilight definition. Choices are astronomical (-18 degrees), nautical (-12 degrees), and civil (-6 degrees).

Responses

Response samples

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

gcntags

Post a GCN Event tag

Post a GCN Event tag

Request Body schema: application/json
dateobs
any

UTC event timestamp

text
any

GCN Event tag

Responses

Request samples

Content type
application/json
{
  • "dateobs": null,
  • "text": null
}

Response samples

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

Ingest GCN xml file

Ingest GCN xml file

Request Body schema: application/json
xml
string

VOEvent XML content.

Responses

Request samples

Content type
application/json
{
  • "xml": "string"
}

Response samples

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

gcnnotices

Ingest GCN xml file

Ingest GCN xml file

Request Body schema: application/json
xml
string

VOEvent XML content.

Responses

Request samples

Content type
application/json
{
  • "xml": "string"
}

Response samples

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

sources_confirmed_in_gcn

Post sources that have been confirmed in a GCN to

Post sources that have been confirmed in a GCN to TNS

path Parameters
dateobs
required
string

The dateobs of the event, as an arrow parseable string

Request Body schema: application/json
tnsrobotID
required
int

TNS Robot ID.

reporters
string

Reporters for the TNS report.

archival
boolean

Report sources as archival (i.e. no upperlimit). Defaults to False.

archivalComment
string

Comment on archival source. Required if archival is True.

sourcesIDList
string

A comma-separated list of source_id's to post. If not provided, all sources confirmed in GCN will be posted.

confirmed
boolean

Only post sources noted as confirmed / highlighted. Defaults to True.

Responses

Request samples

Content type
application/json
{
  • "tnsrobotID": null,
  • "reporters": "string",
  • "archival": true,
  • "archivalComment": "string",
  • "sourcesIDList": "string",
  • "confirmed": true
}

Response samples

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

Retrieve sources that have been confirmed/rejected

Retrieve sources that have been confirmed/rejected in a GCN

path Parameters
dateobs
required
string

The dateobs of the event, as an arrow parseable string

query Parameters
sourcesIDList
string

A comma-separated list of source_id's to retrieve. If not provided, all sources confirmed or rejected in GCN will be returned.

Responses

Response samples

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

source_confirmed_in_gcn

Retrieve a source that has been confirmed or rejec

Retrieve a source that has been confirmed or rejected in a GCN

path Parameters
dateobs
required
string

The dateobs of the event, as an arrow parseable string

source_id
required
string

The source_id of the source to retrieve

Responses

Response samples

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

Deletes the confirmed or rejected status of source

Deletes the confirmed or rejected status of source in a GCN. Its status can be considered as 'undefined'.

path Parameters
dateobs
required
string
source_id
required
string

Responses

Response samples

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

Update the confirmed or rejected status of a sourc

Update the confirmed or rejected status of a source in a GCN

path Parameters
dateobs
required
string
source_id
required
string
Request Body schema: application/json
confirmed
required
boolean

Whether the source is confirmed (True) or rejected (False)

Responses

Request samples

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

Response samples

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

Retrieve a source that has been confirmed or rejec

Retrieve a source that has been confirmed or rejected in a GCN

path Parameters
dateobs
required
string

The dateobs of the event, as an arrow parseable string

source_id
required
string

The source_id of the source to retrieve

Responses

Response samples

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

Confirm or reject a source in a gcn

Confirm or reject a source in a gcn

path Parameters
dateobs
required
string

The dateobs of the event, as an arrow parseable string

Request Body schema: application/json
localization_name
required
string

The name of the localization of the event

localization_cumprob
required
string

The cumprob of the localization of the event

source_id
required
string

The source_id of the source to confirm or reject

confirmed
required
boolean

Whether the source is confirmed (True) or rejected (False)

start_date
required
string

Choose sources with a first detection after start_date, as an arrow parseable string

end_date
required
string

Choose sources with a last detection before end_date, as an arrow parseable string

Responses

Request samples

Content type
application/json
{
  • "localization_name": "string",
  • "localization_cumprob": "string",
  • "source_id": "string",
  • "confirmed": true,
  • "start_date": "string",
  • "end_date": "string"
}

Response samples

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

Deletes the confirmed or rejected status of source

Deletes the confirmed or rejected status of source in a GCN. Its status can be considered as 'undefined'.

path Parameters
dateobs
required
string
source_id
required
string

Responses

Response samples

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

Update the confirmed or rejected status of a sourc

Update the confirmed or rejected status of a source in a GCN

path Parameters
dateobs
required
string
source_id
required
string
Request Body schema: application/json
confirmed
required
boolean

Whether the source is confirmed (True) or rejected (False)

Responses

Request samples

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

Response samples

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

gcn_associated_to_source

Get the GCNs associated with a source (GCNs for wh

Get the GCNs associated with a source (GCNs for which the source has been confirmed)

path Parameters
source_id
required
string

Responses

Response samples

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

observation_plan_requests

Get an airmass chart for the GcnEvent

Get an airmass chart for the GcnEvent

path Parameters
localization_id
required
integer

ID of localization to generate airmass chart for

telescope_id
required
integer

ID of telescope to generate airmass chart for

Responses

Response samples

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

Submit the observation plan to treasuremap.space

Submit the observation plan to treasuremap.space

path Parameters
instrument_id
required
string

ID for the instrument to submit

query Parameters
startDate
required
string

Filter by start date

endDate
required
string

Filter by end date

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 fields. Defaults to 0.95.

Responses

Response samples

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

Submit manual observation plan.

Submit manual observation plan.

Request Body schema: application/json
localization_id
required
integer

Localization ID.

target_group_ids
Array of integers

IDs of groups to share the results of the observation plan request with.

allocation_id
required
integer

Observation plan request allocation ID.

status
string
Default: "pending submission"

The status of the request.

observation_plan_data
any

Observation plan data json

gcnevent_id
required
integer

ID of the GcnEvent.

Responses

Request samples

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

Response samples

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

Submit observation plan request.

Submit observation plan request.

Request Body schema: application/json
localization_id
required
integer

Localization ID.

target_group_ids
Array of integers

IDs of groups to share the results of the observation plan request with.

allocation_id
required
integer

Observation plan request allocation ID.

status
string
Default: "pending submission"

The status of the request.

payload
any

Content of the observation plan request.

gcnevent_id
required
integer

ID of the GcnEvent.

Responses

Request samples

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

Response samples

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

Delete observation plan.

Delete observation plan.

path Parameters
observation_plan_id
required
string

Responses

Response samples

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

Submit the observation plan to treasuremap.space

Submit the observation plan to treasuremap.space

path Parameters
observation_plan_id
required
string

Responses

Response samples

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

Get a GCN-izable summary of the observation plan.

Get a GCN-izable summary of the observation plan.

path Parameters
observation_plan_id
required
string

Responses

Response samples

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

Submit an observation plan.

Submit an observation plan.

path Parameters
observation_plan_id
required
string

Responses

Response samples

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

Remove an observation plan from the queue.

Remove an observation plan from the queue.

path Parameters
observation_plan_id
required
string

Responses

Response samples

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

Get a movie summary of the observation plan.

Get a movie summary of the observation plan.

path Parameters
observation_plan_id
required
string

Responses

Response samples

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

Perform an efficiency analysis of the observation

Perform an efficiency analysis of the observation plan.

path Parameters
observation_plan_id
required
string
query Parameters
numberInjections
number

Number of simulations to evaluate efficiency with. Defaults to 1000.

numberDetections
number

Number of detections required for detection. Defaults to 1.

detectionThreshold
number

Threshold (in sigmas) required for detection. Defaults to 5.

minimumPhase
number

Minimum phase (in days) post event time to consider detections. Defaults to 0.

maximumPhase
number

Maximum phase (in days) post event time to consider detections. Defaults to 3.

model_name
string

Model to simulate efficiency for. Must be one of kilonova, afterglow, or linear. Defaults to kilonova.

optionalInjectionParameters
any
group_ids
Array of integers

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

Responses

Response samples

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

Get GeoJSON summary of the observation plan.

Get GeoJSON summary of the observation plan.

path Parameters
observation_plan_id
required
string

Responses

Response samples

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

Get survey efficiency analyses of the observation

Get survey efficiency analyses of the observation plan.

path Parameters
observation_plan_id
required
string

Responses

Response samples

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

Submit the fields in the observation plan to an ob

Submit the fields in the observation plan to an observing run

path Parameters
observation_plan_id
required
integer

ID of observation plan request to create observing run for

Responses

Response samples

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

Delete selected fields from the observation plan.

Delete selected fields from the observation plan.

path Parameters
observation_plan_id
required
string
Request Body schema: application/json
fieldIds
Array of integers

List of field IDs to remove from the plan

Responses

Request samples

Content type
application/json
{
  • "fieldIds": [
    ]
}

Response samples

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

groups

Retrieve the public group

Retrieve the public group

Responses

Response samples

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

Add alert stream access to group

Add alert stream access to group

path Parameters
group_id
required
integer
Request Body schema: application/json
stream_id
required
integer

Responses

Request samples

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

Response samples

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

Delete an alert stream from group

Delete an alert stream from group

path Parameters
group_id
required
integer
stream_id
required
integer

Responses

Response samples

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

Add a group user

Add a group user

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

Boolean indicating whether user can save sources to group. Defaults to true.

Responses

Request samples

Content type
application/json
{
  • "userID": 0,
  • "admin": true,
  • "canSave": true
}

Response samples

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

Update a group user's admin or save access status

Update a group user's admin or save access status

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

Boolean indicating whether user is group admin. Either this or canSave must be provided in request body.

canSave
boolean

Boolean indicating whether user can save sources to group. Either this or admin must be provided in request body.

Responses

Request samples

Content type
application/json
{
  • "userID": 0,
  • "admin": true,
  • "canSave": true
}

Response samples

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

Delete a group user

Delete a group user

path Parameters
group_id
required
integer
user_id
required
integer

Responses

Response samples

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

Add users from other group(s) to specified group

Add users from other group(s) to specified group

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

Responses

Request samples

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

Response samples

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

Retrieve a group

Retrieve a group

path Parameters
group_id
required
integer
query Parameters
includeGroupUsers
boolean

Boolean indicating whether to include group users. Defaults to true.

Responses

Response samples

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

Update a group

Update a group

path Parameters
group_id
required
integer
Request Body schema: application/json
streams
Array of any
filters
Array of any
shifts
Array of any
users
Array of any
group_users
Array of any
observing_runs
Array of any
photometry
Array of any
photometric_series
Array of any
spectra
Array of any
mmadetector_spectra
Array of any
mmadetector_time_intervals
Array of any
allocations
Array of any
source_labels
Array of any
admission_requests
Array of any
tnsrobots
Array of any
gcnsummaries
Array of any
name
required
string

Name of the group.

nickname
string or null

Short group nickname.

description
string or null

Longer description of the group.

private
boolean

Boolean indicating whether group is invisible to non-members.

single_user_group
boolean or null

Flag indicating whether this group is a singleton group for one user only.

Responses

Request samples

Content type
application/json
{
  • "streams": [
    ],
  • "filters": [
    ],
  • "shifts": [
    ],
  • "users": [
    ],
  • "group_users": [
    ],
  • "observing_runs": [
    ],
  • "photometry": [
    ],
  • "photometric_series": [
    ],
  • "spectra": [
    ],
  • "mmadetector_spectra": [
    ],
  • "mmadetector_time_intervals": [
    ],
  • "allocations": [
    ],
  • "source_labels": [
    ],
  • "admission_requests": [
    ],
  • "tnsrobots": [
    ],
  • "gcnsummaries": [
    ],
  • "name": "string",
  • "nickname": "string",
  • "description": "string",
  • "private": true,
  • "single_user_group": true
}

Response samples

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

Delete a group

Delete a group

path Parameters
group_id
required
integer

Responses

Response samples

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

Retrieve all groups

Retrieve all groups

query Parameters
name
string

Fetch by name (exact match)

includeSingleUserGroups
boolean

Bool indicating whether to include single user groups. Defaults to false.

Responses

Response samples

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

Create a new group

Create a new group

Request Body schema: application/json
streams
Array of any
filters
Array of any
shifts
Array of any
users
Array of any
group_users
Array of any
observing_runs
Array of any
photometry
Array of any
photometric_series
Array of any
spectra
Array of any
mmadetector_spectra
Array of any
mmadetector_time_intervals
Array of any
allocations
Array of any
source_labels
Array of any
admission_requests
Array of any
tnsrobots
Array of any
gcnsummaries
Array of any
name
required
string

Name of the group.

nickname
string or null

Short group nickname.

description
string or null

Longer description of the group.

private
boolean

Boolean indicating whether group is invisible to non-members.

single_user_group
boolean or null

Flag indicating whether this group is a singleton group for one user only.

group_admins
Array of integers

List of IDs of users to be group admins. Current user will automatically be added as a group admin.

Responses

Request samples

Content type
application/json
{
  • "streams": [
    ],
  • "filters": [
    ],
  • "shifts": [
    ],
  • "users": [
    ],
  • "group_users": [
    ],
  • "observing_runs": [
    ],
  • "photometry": [
    ],
  • "photometric_series": [
    ],
  • "spectra": [
    ],
  • "mmadetector_spectra": [
    ],
  • "mmadetector_time_intervals": [
    ],
  • "allocations": [
    ],
  • "source_labels": [
    ],
  • "admission_requests": [
    ],
  • "tnsrobots": [
    ],
  • "gcnsummaries": [
    ],
  • "name": "string",
  • "nickname": "string",
  • "description": "string",
  • "private": true,
  • "single_user_group": true,
  • "group_admins": [
    ]
}

Response samples

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

Retrieve a group admission request

Retrieve a group admission request

path Parameters
admission_request_id
required
integer

Responses

Response samples

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

Delete a group admission request

Delete a group admission request

path Parameters
admission_request_id
required
integer

Responses

Response samples

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

Update a group admission request's status

Update a group admission request's status

path Parameters
admission_request_id
required
integer
Request Body schema: application/json
status
required
string

One of either 'accepted', 'declined', or 'pending'.

Responses

Request samples

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

Response samples

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

Retrieve all group admission requests

Retrieve all group admission requests

query Parameters
groupID
integer

ID of group for which admission requests are desired

Responses

Response samples

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

Create a new group admission request

Create a new group admission request

Request Body schema: application/json
groupID
required
integer
userID
required
integer

Responses

Request samples

Content type
application/json
{
  • "groupID": 0,
  • "userID": 0
}

Response samples

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

Retrieve basic info on Groups that an Obj is saved

Retrieve basic info on Groups that an Obj is saved to

path Parameters
obj_id
required
integer

Responses

Response samples

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

Save or request group(s) to save source, and optio

Save or request group(s) to save source, and optionally unsave from group(s).

Request Body schema: application/json
objId
required
string

ID of the object in question.

inviteGroupIds
required
Array of integers

List of group IDs to save or invite to save specified source.

unsaveGroupIds
Array of integers

List of group IDs from which specified source is to be unsaved.

Responses

Request samples

Content type
application/json
{
  • "objId": "string",
  • "inviteGroupIds": [
    ],
  • "unsaveGroupIds": [
    ]
}

Response samples

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

Update a Source table row

Update a Source table row

path Parameters
obj_id
required
integer
Request Body schema: application/json
groupID
required
integer
active
required
boolean
requested
required
boolean

Responses

Request samples

Content type
application/json
{
  • "groupID": 0,
  • "active": true,
  • "requested": true
}

Response samples

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

streams

Add alert stream access to group

Add alert stream access to group

path Parameters
group_id
required
integer
Request Body schema: application/json
stream_id
required
integer

Responses

Request samples

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

Response samples

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

Delete an alert stream from group

Delete an alert stream from group

path Parameters
group_id
required
integer
stream_id
required
integer

Responses

Response samples

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

Grant stream access to a user

Grant stream access to a user

path Parameters
stream_id
required
integer
Request Body schema: application/json
user_id
required
integer

Responses

Request samples

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

Response samples

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

Delete a stream user (revoke stream access for use

Delete a stream user (revoke stream access for user)

path Parameters
stream_id
required
integer
user_id
required
integer

Responses

Response samples

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

Retrieve a stream

Retrieve a stream

path Parameters
filter_id
required
integer

Responses

Response samples

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

Delete a stream

Delete a stream

path Parameters
stream_id
required
integer

Responses

Response samples

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

Update a stream

Update a stream

path Parameters
stream_id
required
integer
Request Body schema: application/json
name
string
altdata
object

Responses

Request samples

Content type
application/json
{
  • "name": "string",
  • "altdata": { }
}

Response samples

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

Retrieve all streams

Retrieve all streams

Responses

Response samples

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

POST a new stream.

POST a new stream.

Request Body schema: application/json
name
required
string
altdata
object

Responses

Request samples

Content type
application/json
{
  • "name": "string",
  • "altdata": { }
}

Response samples

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

users

Add a group user

Add a group user

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

Boolean indicating whether user can save sources to group. Defaults to true.

Responses

Request samples

Content type
application/json
{
  • "userID": 0,
  • "admin": true,
  • "canSave": true
}

Response samples

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

Update a group user's admin or save access status

Update a group user's admin or save access status

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

Boolean indicating whether user is group admin. Either this or canSave must be provided in request body.

canSave
boolean

Boolean indicating whether user can save sources to group. Either this or admin must be provided in request body.

Responses

Request samples

Content type
application/json
{
  • "userID": 0,
  • "admin": true,
  • "canSave": true
}

Response samples

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

Delete a group user

Delete a group user

path Parameters
group_id
required
integer
user_id
required
integer

Responses

Response samples

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

Add users from other group(s) to specified group

Add users from other group(s) to specified group

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

Responses

Request samples

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

Response samples

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

Retrieve a group admission request

Retrieve a group admission request

path Parameters
admission_request_id
required
integer

Responses

Response samples

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

Delete a group admission request

Delete a group admission request

path Parameters
admission_request_id
required
integer

Responses

Response samples

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

Update a group admission request's status

Update a group admission request's status

path Parameters
admission_request_id
required
integer
Request Body schema: application/json
status
required
string

One of either 'accepted', 'declined', or 'pending'.

Responses

Request samples

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

Response samples

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

Retrieve all group admission requests

Retrieve all group admission requests

query Parameters
groupID
integer

ID of group for which admission requests are desired

Responses

Response samples

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

Create a new group admission request

Create a new group admission request

Request Body schema: application/json
groupID
required
integer
userID
required
integer

Responses

Request samples

Content type
application/json
{
  • "groupID": 0,
  • "userID": 0
}

Response samples

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

Get a summary of all the activity of shift users o

Get a summary of all the activity of shift users on skyportal for a given period

path Parameters
shift_id
required
integer
query Parameters
startDate
string

Arrow-parseable date string (e.g. 2020-01-01). If provided, filter by shift.start_date >= startDate

Responses

Response samples

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

Add a shift user

Add a shift user

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

Responses

Request samples

Content type
application/json
{
  • "userID": 0,
  • "admin": true
}

Response samples

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

Delete a shift user

Delete a shift user

path Parameters
shift_id
required
integer
user_id
required
integer

Responses

Response samples

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

Update a shift user's admin status, or needs_repla

Update a shift user's admin status, or needs_replacement status

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

Boolean indicating whether user is shift admin.

needs_replacement
boolean

Boolean indicating whether user needs replacement or not

Responses

Request samples

Content type
application/json
{
  • "userID": 0,
  • "admin": true,
  • "needs_replacement": true
}

Response samples

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

Grant stream access to a user

Grant stream access to a user

path Parameters
stream_id
required
integer
Request Body schema: application/json
user_id
required
integer

Responses

Request samples

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

Response samples

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

Delete a stream user (revoke stream access for use

Delete a stream user (revoke stream access for user)

path Parameters
stream_id
required
integer
user_id
required
integer

Responses

Response samples

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

Retrieve a user

Retrieve a user

path Parameters
user_id
required
integer

Responses

Response samples

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

Delete a user

Delete a user

path Parameters
user_id
required
integer

Responses

Response samples

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

Update a User record

Update a User record

path Parameters
user_id
required
integer
Request Body schema: application/json
expirationDate
string

Arrow-parseable date string (e.g. 2020-01-01). Set a user's expiration date, after which the user's account will be deactivated and will be unable to access the application.

Responses

Request samples

Content type
application/json
{
  • "expirationDate": "string"
}

Response samples

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

Retrieve all users

Retrieve all users

query Parameters
numPerPage
integer

Number of candidates to return per paginated request. Defaults to all users

pageNumber
integer

Page number for paginated query results. Defaults to 1

firstName
string

Get users whose first name contains this string.

lastName
string

Get users whose last name contains this string.

username
string

Get users whose username contains this string.

email
string

Get users whose email contains this string.

role
string

Get users with the role.

acl
string

Get users with this ACL.

group
string

Get users part of the group with name given by this parameter.

stream
string

Get users with access to the stream with name given by this parameter.

Responses

Response samples

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

Add a new user

Add a new user

Request Body schema: application/json
username
required
string
first_name
string
last_name
string
affiliations
Array of strings
contact_email
string
oauth_uid
string
contact_phone
string
roles
Array of strings

List of user roles. Defaults to [Full user]. Will be overridden by groupIDsAndAdmin on a per-group basis.

groupIDsAndAdmin
Array of arrays

Array of 2-element arrays [groupID, admin] where groupID is the ID of a group that the new user will be added to and admin is a boolean indicating whether they will be an admin in that group, e.g. [[group_id_1, true], [group_id_2, false]]

Responses

Request samples

Content type
application/json
{
  • "username": "string",
  • "first_name": "string",
  • "last_name": "string",
  • "affiliations": [
    ],
  • "contact_email": "string",
  • "oauth_uid": "string",
  • "contact_phone": "string",
  • "roles": [
    ],
  • "groupIDsAndAdmin": [
    ]
}

Response samples

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

mmadetectors

Retrieve a Multimessenger Astronomical Detector (M

Retrieve a Multimessenger Astronomical Detector (MMADetector)

path Parameters
mmadetector_id
required
integer

Responses

Response samples

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

Delete a Multimessenger Astronomical Detector (MMA

Delete a Multimessenger Astronomical Detector (MMADetector)

path Parameters
mmadetector_id
required
integer

Responses

Response samples

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

Update a Multimessenger Astronomical Detector (MMA

Update a Multimessenger Astronomical Detector (MMADetector)

path Parameters
mmadetector_id
required
integer
Request Body schema: application/json
events
Array of any
spectra
Array of any
time_intervals
Array of any
name
required
string

Unabbreviated facility name (e.g., LIGO Hanford Observatory.

nickname
required
string

Abbreviated facility name (e.g., H1).

type
required
string <= 18 characters
Enum: "gravitational-wave" "neutrino" "gamma-ray-burst"

MMA detector type, one of gravitational wave, neutrino, or gamma-ray burst.

lat
number or null

Latitude in deg.

lon
number or null

Longitude in deg.

elevation
number or null

Elevation in meters.

fixed_location
boolean

Does this telescope have a fixed location (lon, lat, elev)?

Responses

Request samples

Content type
application/json
{
  • "events": [
    ],
  • "spectra": [
    ],
  • "time_intervals": [
    ],
  • "name": "string",
  • "nickname": "string",
  • "type": "gravitational-wave",
  • "lat": 0,
  • "lon": 0,
  • "elevation": 0,
  • "fixed_location": true
}

Response samples

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

Retrieve all Multimessenger Astronomical Detectors

Retrieve all Multimessenger Astronomical Detectors (MMADetectors)

query Parameters
name
string

Filter by name

Responses

Response samples

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

Create a Multimessenger Astronomical Detector (MMA

Create a Multimessenger Astronomical Detector (MMADetector)

Request Body schema: application/json
events
Array of any
spectra
Array of any
time_intervals
Array of any
name
required
string

Unabbreviated facility name (e.g., LIGO Hanford Observatory.

nickname
required
string

Abbreviated facility name (e.g., H1).

type
required
string <= 18 characters
Enum: "gravitational-wave" "neutrino" "gamma-ray-burst"

MMA detector type, one of gravitational wave, neutrino, or gamma-ray burst.

lat
number or null

Latitude in deg.

lon
number or null

Longitude in deg.

elevation
number or null

Elevation in meters.

fixed_location
boolean

Does this telescope have a fixed location (lon, lat, elev)?

Responses

Request samples

Content type
application/json
{
  • "events": [
    ],
  • "spectra": [
    ],
  • "time_intervals": [
    ],
  • "name": "string",
  • "nickname": "string",
  • "type": "gravitational-wave",
  • "lat": 0,
  • "lon": 0,
  • "elevation": 0,
  • "fixed_location": true
}

Response samples

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

mmadetector_spectra

Retrieve an mmadetector spectrum

Retrieve an mmadetector spectrum

path Parameters
spectrum_id
required
integer

Responses

Response samples

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

Delete an mmadetector spectrum

Delete an mmadetector spectrum

path Parameters
spectrum_id
required
integer

Responses

Response samples

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

Update mmadetector spectrum

Update mmadetector spectrum

path Parameters
spectrum_id
required
integer
Request Body schema: application/json
group_ids
any
Default: []

IDs of the Groups to share this spectrum with. Set to "all" to make this spectrum visible to all users.

start_time
required
string <date-time>

The ISO UTC start time the spectrum was taken.

amplitudes
required
Array of numbers

Amplitude of the Spectrum [1/sqrt(Hz).

detector_id
required
integer

ID of the MMADetector that acquired the Spectrum.

end_time
required
string <date-time>

The ISO UTC end time the spectrum was taken.

frequencies
required
Array of numbers

Frequencies of the spectrum [Hz].

Responses

Request samples

Content type
application/json
{
  • "group_ids": [ ],
  • "start_time": "2019-08-24T14:15:22Z",
  • "amplitudes": [
    ],
  • "detector_id": 0,
  • "end_time": "2019-08-24T14:15:22Z",
  • "frequencies": [
    ]
}

Response samples

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

Retrieve multiple spectra with given criteria

Retrieve multiple spectra with given criteria

query Parameters
observedBefore
string

Arrow-parseable date string (e.g. 2020-01-01). If provided, return only spectra observed before this time.

observedAfter
string

Arrow-parseable date string (e.g. 2020-01-01). If provided, return only spectra observed after this time.

detectorIDs
any

If provided, filter only spectra observed with one of these mmadetector IDs.

groupIDs
list

If provided, filter only spectra saved to one of these group IDs.

Upload a Multimessenger Astronomical Detector (MMA

Upload a Multimessenger Astronomical Detector (MMADetector) spectrum

Request Body schema: application/json
group_ids
any
Default: []

IDs of the Groups to share this spectrum with. Set to "all" to make this spectrum visible to all users.

start_time
required
string <date-time>

The ISO UTC start time the spectrum was taken.

amplitudes
required
Array of numbers

Amplitude of the Spectrum [1/sqrt(Hz).

detector_id
required
integer

ID of the MMADetector that acquired the Spectrum.

end_time
required
string <date-time>

The ISO UTC end time the spectrum was taken.

frequencies
required
Array of numbers

Frequencies of the spectrum [Hz].

Responses

Request samples

Content type
application/json
{
  • "group_ids": [ ],
  • "start_time": "2019-08-24T14:15:22Z",
  • "amplitudes": [
    ],
  • "detector_id": 0,
  • "end_time": "2019-08-24T14:15:22Z",
  • "frequencies": [
    ]
}

Response samples

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

mmadetector_time_intervals

Retrieve an mmadetector time_interval

Retrieve an mmadetector time_interval

path Parameters
time_interval_id
required
integer

Responses

Response samples

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

Delete an mmadetector time_interval

Delete an mmadetector time_interval

path Parameters
time_interval_id
required
integer

Responses

Response samples

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

Update mmadetector time_interval

Update mmadetector time_interval

path Parameters
time_interval_id
required
integer
Request Body schema: application/json
detector
any or null

The MMADetector that acquired the Time Interval.

groups
Array of any
owner
any or null

The User who uploaded the detector time interval.

detector_id
required
integer

ID of the MMADetector that acquired the Time Interval.

Responses

Request samples

Content type
application/json
{
  • "detector": null,
  • "groups": [
    ],
  • "owner": null,
  • "detector_id": 0
}

Response samples

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

Retrieve multiple time_intervals with given criter

Retrieve multiple time_intervals with given criteria

query Parameters
observedBefore
string

Arrow-parseable date string (e.g. 2020-01-01). If provided, return only time_interval observed before this time.

observedAfter
string

Arrow-parseable date string (e.g. 2020-01-01). If provided, return only time_interval observed after this time.

detectorIDs
any

If provided, filter only time_intervals observed with one of these mmadetector IDs.

groupIDs
list

If provided, filter only time_interval saved to one of these group IDs.

Upload a Multimessenger Astronomical Detector (MMA

Upload a Multimessenger Astronomical Detector (MMADetector) time_interval(s)

Request Body schema: application/json
detector
any or null

The MMADetector that acquired the Time Interval.

groups
Array of any
owner
any or null

The User who uploaded the detector time interval.

detector_id
required
integer

ID of the MMADetector that acquired the Time Interval.

Responses

Request samples

Content type
application/json
{
  • "detector": null,
  • "groups": [
    ],
  • "owner": null,
  • "detector_id": 0
}

Response samples

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

listings

Retrieve sources from a user's lists

Retrieve sources from a user's lists

path Parameters
user_id
required
string
query Parameters
listName
string

name of the list to retrieve objects from. If not given will return all objects saved by the user to all lists.

Responses

Response samples

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

Add a listing.

Add a listing.

Request Body schema: application/json
user_id
integer

ID of user that you want to add the listing to. If not given, will default to the associated user object that is posting.

obj_id
string
list_name
string

Listing name for this item, e.g., "favorites". Multiple objects can be saved by the same user to different lists, where the list names are user-defined. List name must be a non-empty string starting with an alphanumeric character or underscore. (it must match the regex: /^\w+/)

params
object

Optional parameters for "watchlist" type listings, when searching for new candidates around a given object. For example, if you want to search for new candidates around a given object, you can specify the search radius and the number of candidates to return. The parameters are passed to the microservice that is responsible for processing the listing. The microservice will return a list of candidates that match the given parameters, and ingest them.

Responses

Request samples

Content type
application/json
{
  • "user_id": 0,
  • "obj_id": "string",
  • "list_name": "string",
  • "params": { }
}

Response samples

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

Remove an existing listing

Remove an existing listing

path Parameters
listing_id
required
integer

ID of the listing object. If not given, must supply the listing's obj_id and list_name (and user_id) to find the correct listing id from that info.

Request Body schema: application/json
user_id
integer

ID of user that you want to add the listing to. If not given, will default to the associated user object that is posting.

obj_id
string
list_name
string

Listing name for this item, e.g., "favorites".

Responses

Request samples

Content type
application/json
{
  • "user_id": 0,
  • "obj_id": "string",
  • "list_name": "string"
}

Response samples

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

Update an existing listing

Update an existing listing

path Parameters
listing_id
required
integer
Request Body schema: application/json
user_id
integer
obj_id
string
list_name
string

Listing name for this item, e.g., "favorites". Multiple objects can be saved by the same user to different lists, where the list names are user-defined. List name must be a non-empty string starting with an alphanumeric character or underscore. (it must match the regex: /^\w+/)

Responses

Request samples

Content type
application/json
{
  • "user_id": 0,
  • "obj_id": "string",
  • "list_name": "string"
}

Response samples

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

group_admission_requests

Retrieve a group admission request

Retrieve a group admission request

path Parameters
admission_request_id
required
integer

Responses

Response samples

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

Delete a group admission request

Delete a group admission request

path Parameters
admission_request_id
required
integer

Responses

Response samples

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

Update a group admission request's status

Update a group admission request's status

path Parameters
admission_request_id
required
integer
Request Body schema: application/json
status
required
string

One of either 'accepted', 'declined', or 'pending'.

Responses

Request samples

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

Response samples

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

Retrieve all group admission requests

Retrieve all group admission requests

query Parameters
groupID
integer

ID of group for which admission requests are desired

Responses

Response samples

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

Create a new group admission request

Create a new group admission request

Request Body schema: application/json
groupID
required
integer
userID
required
integer

Responses

Request samples

Content type
application/json
{
  • "groupID": 0,
  • "userID": 0
}

Response samples

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

instrumentlogs

Add log messages from an instrument

Add log messages from an instrument

path Parameters
instrument_id
required
integer

The instrument ID to post logs for

Request Body schema: application/json
start_date
required
string

Arrow-parseable date string (e.g. 2020-01-01).

end_date
required
string

Arrow-parseable date string (e.g. 2020-01-01).

logs
required
object

Nested JSON containing the log messages.

Responses

Request samples

Content type
application/json
{
  • "start_date": "string",
  • "end_date": "string",
  • "logs": { }
}

Response samples

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

invitations

Retrieve invitations

Retrieve invitations

query Parameters
includeUsed
boolean

Bool indicating whether to include used invitations. Defaults to false.

numPerPage
integer

Number of candidates to return per paginated request. Defaults to 25

pageNumber
integer

Page number for paginated query results. Defaults to 1

email
string

Get invitations whose email contains this string.

group
string

Get invitations part of the group with name given by this parameter.

stream
string

Get invitations with access to the stream with name given by this parameter.

invitedBy
string

Get invitations invited by users whose username contains this string.

Responses

Response samples

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

Invite a new user

Invite a new user

Request Body schema: application/json
userEmail
required
string
role
string

The role the new user will have in the system. If provided, must be one of either "Full user" or "View only". Defaults to "Full user".

streamIDs
Array of integers

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

groupIDs
required
Array of integers

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

groupAdmin
Array of booleans

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

canSave
Array of booleans

List of booleans indicating whether user should be able to save sources to respective specified group(s). Defaults to all true.

userExpirationDate
string

Arrow-parseable date string (e.g. 2020-01-01). Set a user's expiration date, after which the user's account will be deactivated and will be unable to access the application.

Responses

Request samples

Content type
application/json
{
  • "userEmail": "string",
  • "role": "string",
  • "streamIDs": [
    ],
  • "groupIDs": [
    ],
  • "groupAdmin": [
    ],
  • "canSave": [
    ],
  • "userExpirationDate": "string"
}

Response samples

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

Delete an invitation

Delete an invitation

path Parameters
invitation_id
required
integer

Responses

Response samples

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

Update a pending invitation

Update a pending invitation

Request Body schema: application/json
groupIDs
Array of integers
streamIDs
Array of integers
role
string
userExpirationDate
string

Arrow-parseable date string (e.g. 2020-01-01). Set a user's expiration date, after which the user's account will be deactivated and will be unable to access the application.

Responses

Request samples

Content type
application/json
{
  • "groupIDs": [
    ],
  • "streamIDs": [
    ],
  • "role": "string",
  • "userExpirationDate": "string"
}

Response samples

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

observations

Retrieve all observations

Retrieve all observations

query Parameters
telescopeName
string

Filter by telescope name

instrumentName
string

Filter by instrument name

startDate
required
string

Filter by start date

endDate
required
string

Filter by end date

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 fields. Defaults to 0.95.

returnStatistics
boolean

Boolean indicating whether to include integrated probability and area. Defaults to false.

statsMethod
string

Method to use for computing integrated probability and area. Defaults to 'python'. To use the database/postgres based method, use 'db'.

statsLogging
boolean

Boolean indicating whether to log the stats computation time. Defaults to false.

includeGeoJSON
boolean

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

observationStatus
str

Whether to include queued or executed observations. Defaults to executed.

numPerPage
integer

Number of followup requests to return per paginated request. Defaults to 100. Can be no larger than {MAX_OBSERVATIONS}.

pageNumber
integer

Page number for paginated query results. Defaults to 1

sortBy
string

The field to sort by.

sortOrder
string

The sort order - either "asc" or "desc". Defaults to "asc"

Responses

Response samples

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

Ingest a set of ExecutedObservations

Ingest a set of ExecutedObservations

Request Body schema: application/json
observationData
any

Observation data dictionary list

instrumentName
required
string

The instrument name associated with the fields

telescopeName
required
string

The telescope name associated with the fields

Responses

Request samples

Content type
application/json
{
  • "observationData": null,
  • "instrumentName": "string",
  • "telescopeName": "string"
}

Response samples

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

Delete an observation

Delete an observation

path Parameters
observation_id
required
integer

Responses

Response samples

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

Upload observation from ASCII file

Upload observation from ASCII file

Request Body schema: application/json
observationData
any

Observation data Ascii string

instrumentID
required
string

The instrument ID associated with the fields

Responses

Request samples

Content type
application/json
{
  • "observationData": null,
  • "instrumentID": "string"
}

Response samples

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

Perform simsurvey efficiency calculation

Perform simsurvey efficiency calculation

path Parameters
instrument_id
required
string

ID for the instrument to submit

query Parameters
startDate
required
string

Filter by start date

endDate
required
string

Filter by end date

localizationDateobs
required
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 fields. Defaults to 0.95.

numberInjections
number

Number of simulations to evaluate efficiency with. Defaults to 1000.

numberDetections
number

Number of detections required for detection. Defaults to 1.

detectionThreshold
number

Threshold (in sigmas) required for detection. Defaults to 5.

minimumPhase
number

Minimum phase (in days) post event time to consider detections. Defaults to 0.

maximumPhase
number

Maximum phase (in days) post event time to consider detections. Defaults to 3.

model_name
string

Model to simulate efficiency for. Must be one of kilonova, afterglow, or linear. Defaults to kilonova.

optionalInjectionParameters
any
group_ids
Array of integers

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

Responses

Response samples

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

Retrieve queued observations from external API

Retrieve queued observations from external API

path Parameters
allocation_id
required
string

ID for the allocation to retrieve

query Parameters
startDate
string

Filter by start date

endDate
string

Filter by end date

queuesOnly
bool

Return queue only (do not commit observations)

Responses

Response samples

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

Retrieve queued observations from external API

Retrieve queued observations from external API

path Parameters
allocation_id
required
string

ID for the allocation to delete queue

query Parameters
queueName
required
string

Queue name to remove

Responses

Response samples

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

Retrieve observations from external API

Retrieve observations from external API

Request Body schema: application/json
end_date
required
any

end date of the request.

allocation_id
required
integer

Followup request allocation ID.

start_date
required
any

start date of the request.

Responses

Request samples

Content type
application/json
{
  • "end_date": null,
  • "allocation_id": 0,
  • "start_date": null
}

Response samples

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

Retrieve skymap-based trigger from external API

Retrieve skymap-based trigger from external API

path Parameters
allocation_id
required
string

ID for the allocation to retrieve

Responses

Response samples

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

Delete skymap-based trigger from external API

Delete skymap-based trigger from external API

path Parameters
allocation_id
required
string

ID for the allocation to delete queue

query Parameters
queueName
required
string

Queue name to remove

Responses

Response samples

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

survey_efficiency_for_observations

Create a summary plot for a simsurvey efficiency c

Create a summary plot for a simsurvey efficiency calculation.

path Parameters
survey_efficiency_analysis_id
required
string

Responses

Response samples

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

Create a summary plot for a simsurvey efficiency c

Create a summary plot for a simsurvey efficiency calculation.

path Parameters
survey_efficiency_analysis_id
required
string

Responses

Response samples

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

Retrieve an observation efficiency analysis

Retrieve an observation efficiency analysis

path Parameters
survey_efficiency_analysis_id
required
integer

Responses

Response samples

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

observationplan_requests

Remove observations from treasuremap.space.

Remove observations from treasuremap.space.

path Parameters
instrument_id
required
string

ID for the instrument to submit

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

Responses

Response samples

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

Remove observation plan from treasuremap.space.

Remove observation plan from treasuremap.space.

path Parameters
observation_plan_id
required
string

Responses

Response samples

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

observing_runs

Retrieve an observing run

Retrieve an observing run

path Parameters
run_id
required
integer

Responses

Response samples

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

Update observing run

Update observing run

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

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

group_id
integer

The ID of the group this run is associated with.

observers
string

The names of the observers

pi
string

The PI of the observing run.

calendar_date
required
string <date>

The local calendar date of the run.

Responses

Request samples

Content type
application/json
{
  • "instrument_id": 0,
  • "group_id": 0,
  • "observers": "string",
  • "pi": "string",
  • "calendar_date": "2019-08-24"
}

Response samples

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

Delete an observing run

Delete an observing run

path Parameters
run_id
required
integer

Responses

Response samples

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

Retrieve all observing runs

Retrieve all observing runs

Responses

Response samples

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

Add a new observing run

Add a new observing run

Request Body schema: application/json
instrument_id
required
integer

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

group_id
integer

The ID of the group this run is associated with.

observers
string

The names of the observers

pi
string

The PI of the observing run.

calendar_date
required
string <date>

The local calendar date of the run.

Responses

Request samples

Content type
application/json
{
  • "instrument_id": 0,
  • "group_id": 0,
  • "observers": "string",
  • "pi": "string",
  • "calendar_date": "2019-08-24"
}

Response samples

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

observation_plans

Get all Observation Plan names

Get all Observation Plan names

Responses

Response samples

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

photometric series

Retrieve a photometric series

Retrieve a photometric series

path Parameters
photometric_series_id
required
integer
query Parameters
dataFormat
string
Enum: "json" "hdf5" "none"

Format of the data to return. If none, the data will not be returned. If hdf5, the data will be returned as a bytestream in HDF5 format. (to see how to unpack this data format, look at photometric_series.md) If json, the data will be returned as a JSON object, where each key is a list of values for that column.

Responses

Response samples

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

Delete a photometric series

Delete a photometric series

path Parameters
photometric_series_id
required
integer

Responses

Response samples

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

Retrieve all photometric series, based on various

Retrieve all photometric series, based on various cuts.

query Parameters
dataFormat
string
Enum: "json" "hdf5" "none"

Format of the data to return. If none, the data will not be returned. If hdf5, the data will be returned as a bytestream in HDF5 format. (to see how to unpack this data format, look at photometric_series.md) If json, the data will be returned as a JSON object, where each key is a list of values for that column. Note that when querying multiple series, the actual data is not returned by default. To specifically request the data, use dataFormat=json or dataFormat=hdf5. Keep in mind this could be a large amount of data if the query arguments do not filter down the number of returned series.

ra
number

RA for spatial filtering (in decimal degrees)

dec
number

Declination for spatial filtering (in decimal degrees)

radius
number

Radius for spatial filtering if ra & dec are provided (in decimal degrees)

objectID
string

Portion of ID to filter on

rejectedObjectIDs
str

Comma-separated string of object IDs not to be returned, useful in cases where you are looking for new objects passing a query.

seriesName
string

Get series that match this name. The match must be exact. This is useful when getting photometry for multiple objects taken at the same time (e.g., for calibrating against each other). The series name can be, e.g., a TESS sector, or a date/field name identifier. Generally a series name is shared only by data taken over that same time period.

seriesObjID
string

Get only photometry for the objects named by this object id. This is the internal naming used inside each photometric series, i.e., the index used for each source in the images that were used to create the photometric series. Not the same as the SkyPortal object ID. E.g., this could be a TESS TIC ID, or some internal numbering used in the specific field that was observed.

filter
string

Retrieve only series matching this filter, e.g., "ztfg".

channel
string

The channel name/id to filter on.

origin
string

The origin can be anything that gives an idea of the provenance of the photometric series. This can be, e.g., the name of the pipeline that produced the photometry from the images, or the level of calibration, or any other pre-defined string that identifies where the data came from that isn't covered by the other fields (like channel or filter or instrument).

filename
string

Portion of filename to filter on. If the filename is a relative path, will append the data directory from the config file to the beginning of the filename. (by default that is 'persistentdata/phot_series').

startBefore
string

Arrow-parseable date string (e.g. 2020-01-01). If provided, return only series that started before this time.

startAfter
string

Arrow-parseable date string (e.g. 2020-01-01). If provided, return only series that started after this time.

midTimeBefore
string

Arrow-parseable date string (e.g. 2020-01-01). If provided, return only series where the middle of the series was observed before this time.

midTimeAfter
string

Arrow-parseable date string (e.g. 2020-01-01). If provided, return only series where the middle of the series was observed after this time.

endBefore
string

Arrow-parseable date string (e.g. 2020-01-01). If provided, return only series that ended before this time.

endAfter
string

Arrow-parseable date string (e.g. 2020-01-01). If provided, return only series that ended after this time.

detected
boolean

If true, get only series with one or more detections. If false, get only series with no detections. If left out, do not filter at all on detection status.

expTime
number

Get only series with this exact exposure time (seconds).

minExpTime
number

Get only series with an exposure time above/equal to this. If the series was not uploaded with one specific number, the exposure time for the series is the median of the exposure times of the individual images.

maxExpTime
number

Get only series with an exposure time under/equal to this. If the series was not uploaded with one specific number, the exposure time for the series is the median of the exposure times of the individual images.

minFrameRate
number

Get only series with a frame rate higher/equal to than this. Frame rates are the inverse of the median time between exposures, in units of 1/s (Hz).

maxFrameRate
number

Get only series with a frame rate lower/equal to than this. Frame rates are the inverse of the median time between exposures, in units of 1/s (Hz).

minNumExposures
number

Get only series with this many exposures, or more.

maxNumExposures
number

Get only series with this many exposures, or less.

instrumentID
number

get only series taken with this instrument.

followupRequestID
number

get only series taken with this followup request.

assignmentID
number

get only series taken with this assignment.

ownerID
number

get only series uploaded by this user.

magBrighterThan
number

get only series with mean_mag brighter or equal to this value.

magFainterThan
number

get only series with mean_mag fainter or equal to this value.

limitingMagBrighterThan
number

Retrieve only series with limiting mags brighter or equal to this value.

limitingMagFainterThan
number

Retrieve only series with limiting mags fainter or equal to this value.

limitingMagIsNone
boolean

Retrieve only series that do not have limiting mag.

magrefBrighterThan
number

Get only series that have a magref, and that the magref is brighter or equal to this value.

magrefFainterThan
number

Get only series that have a magref, and that the magref is fainter or equal to this value.

maxRMS
number

get only series with rms_mag less than this.

minRMS
number

get only series with rms_mag more than this.

useRobustMagAndRMS
boolean

If true, will use the robust_mag and robust_rms values instead of mean_mag and rms_mag when filtering on mean magnitude or RMS. Does not affect the magref query.

maxMedianSNR
number

Get only series where the median S/N is less than this. The S/N is calculated using the robust RMS.

minMedianSNR
number

Get only series where the median S/N is more than this. The S/N is calculated using the robust RMS.

maxBestSNR
number

Get only series where the maximum S/N is less than this. The S/N is calculated using the robust RMS.

minBestSNR
number

Get only series where the maximum S/N is more than this. The S/N is calculated using the robust RMS.

maxWorstSNR
number

Get only series where the lowest S/N is less than this. The S/N is calculated using the robust RMS.

minWorstSNR
number

Get only series where the lowest S/N is more than this. The S/N is calculated using the robust RMS.

hash
string

Get only a series that matches this file hash. This is useful if you have an HDF5 file downloaded from the SkyPortal backend, and want to associate it with a PhotometrySeries object. We use an MD5 hash of the file contents.

sortBy
string

The field to sort by. Currently allowed options are ["id", "ra", "dec", "redshift", "saved_at"]

sortOrder
string

The sort order - either "asc" or "desc". Defaults to "asc"

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": {
    }
}

summary

Get a list of sources with summaries matching the

Get a list of sources with summaries matching the query

query Parameters
q
string

The query string. E.g. "What sources are associated with an NGC galaxy?"

objID
string

The objID of the source which has a summary to be used as the query. That is, return the list of sources most similar to the summary of this source. Ignored if q is provided.

k
int

Max number of sources to return. Default 5.

z_min
float

Minimum redshift to consider of queries sources. If None or missing, then no lower limit is applied.

z_max
float

Maximum redshift to consider of queries sources. If None or missing, then no upper limit is applied.

classificationTypes
Array of strings

List of classification types to consider. If [] or missing, then all classification types are considered.

Responses

Response samples

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

data_sharing

Share data with additional groups/users

Share data with additional groups/users

Request Body schema: application/json
photometryIDs
Array of integers

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

spectrumIDs
Array of integers

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

groupIDs
required
Array of integers

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

Responses

Request samples

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

Response samples

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

recurring_apis

Retrieve an Recurring API by id

Retrieve an Recurring API by id

path Parameters
recurring_api_id
required
integer

Responses

Response samples

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

Delete an Recurring API.

Delete an Recurring API.

path Parameters
recurring_api_id
required
integer

Responses

Response samples

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

Retrieve all Recurring APIs

Retrieve all Recurring APIs

Responses

Response samples

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

POST a new Recurring APIs.

POST a new Recurring APIs.

Request Body schema: application/json
endpoint
required
string

Endpoint of the API call.

method
required
string

HTTP method of the API call.

next_call
required
datetime

Time of the next API call.

call_delay
required
number

Delay until next API call in days.

number_of_retries
integer

Number of retries before service is deactivated.

payload
required
object

Payload of the API call.

Responses

Request samples

Content type
application/json
{
  • "endpoint": "string",
  • "method": "string",
  • "next_call": null,
  • "call_delay": 0,
  • "number_of_retries": 0,
  • "payload": { }
}

Response samples

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

roles

Retrieve list of all Role IDs (strings)

Retrieve list of all Role IDs (strings)

Responses

Response samples

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

Grant new Role(s) to a user

Grant new Role(s) to a user

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

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

Responses

Request samples

Content type
application/json
{
  • "roleIds": [
    ]
}

Response samples

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

Delete user role

Delete user role

path Parameters
user_id
required
integer
role_id
required
string

Responses

Response samples

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

objs

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

Request samples

Content type
application/json
{
  • "galaxyName": "string"
}

Response samples

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

Delete an object's host galaxy

Delete an object's host galaxy

path Parameters
obj_id
required
string

Responses

Response samples

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

Retrieve an object's in-out critera for GcnEvents

Retrieve an object's in-out critera for GcnEvents

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

Arrow-parseable date string (e.g. 2020-01-01). If provided, filter by GcnEvent.dateobs >= startDate.

endDate
string

Arrow-parseable date string (e.g. 2020-01-01). If provided, filter by GcnEvent.dateobs <= startDate.

Responses

Request samples

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

Response samples

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

Retrieve an object's status from Minor Planet Cent

Retrieve an object's status from Minor Planet Center

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

Minor planet center observatory code. Defaults to 500, corresponds to geocentric.

date
string

Time to check MPC for. Defaults to current time.

limiting_magnitude
float

Limiting magnitude down which to search. Defaults to 24.0.

search_radius
float

Search radius for MPC [in arcmin]. Defaults to 1 arcminute.

Responses

Request samples

Content type
application/json
{
  • "obscode": "string",
  • "date": "string",
  • "limiting_magnitude": null,
  • "search_radius": null
}

Response samples

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

Retrieve an Obj from TNS

Retrieve an Obj from TNS

path Parameters
obj_id
required
string

Responses

Response samples

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

Post an Obj to TNS

Post an Obj to TNS

path Parameters
obj_id
required
string

Responses

Response samples

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

Retrieve objects from TNS

Retrieve objects from TNS

Request Body schema: application/json
tnsrobotID
required
int

TNS Robot ID.

startDate
string

Arrow-parseable date string (e.g. 2020-01-01). Filter by public_timestamp >= startDate. Defaults to one day ago.

groupIds
Array of integers

List of IDs of groups to indicate labelling for

Responses

Request samples

Content type
application/json
{
  • "tnsrobotID": null,
  • "startDate": "string",
  • "groupIds": [
    ]
}

Response samples

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

source_scans

Note that a source has been labelled.

Note that a source has been labelled.

path Parameters
obj_id
required
string

ID of object to indicate source labelling for

Request Body schema: application/json
groupIds
required
Array of integers

List of IDs of groups to indicate labelling for

Responses

Request samples

Content type
application/json
{
  • "groupIds": [
    ]
}

Response samples

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

notifications

Send out a new source notification

Send out a new source notification

Request Body schema: application/json
additionalNotes
string

Notes to append to the message sent out

groupIds
required
Array of integers

List of IDs of groups whose members should get the notification (if they've opted in)

sourceId
required
string

The ID of the Source's Obj the notification is being sent about

level
required
string

Either 'soft' or 'hard', determines whether to send an email or email+SMS notification

Responses

Request samples

Content type
application/json
{
  • "additionalNotes": "string",
  • "groupIds": [
    ],
  • "sourceId": "string",
  • "level": "string"
}

Response samples

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

spatial_catalogs

Retrieve a SpatialCatalog

Retrieve a SpatialCatalog

path Parameters
catalog_id
required
integer

Retrieve all SpatialCatalogs

Retrieve all SpatialCatalogs

survey_efficiency_for_observation_plans

Retrieve an observation plan efficiency analysis

Retrieve an observation plan efficiency analysis

path Parameters
survey_efficiency_analysis_id
required
integer

Responses

Response samples

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

config

Retrieve parts of the config file that are exposed

Retrieve parts of the config file that are exposed to the user/browser

Responses

Response samples

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

taxonomies

Retrieve a taxonomy

Retrieve a taxonomy

path Parameters
taxonomy_id
required
integer

Responses

Response samples

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

Update taxonomy

Update taxonomy

path Parameters
taxonomy_id
required
integer
Request Body schema: application/json
groups
Array of any
classifications
Array of any
name
required
string

Short string to make this taxonomy memorable to end users.

hierarchy
required
any

Nested JSON describing the taxonomy which should be validated against a schema before entry.

provenance
string or null

Identifier (e.g., URL or git hash) that uniquely ties this taxonomy back to an origin or place of record.

version
required
string

Semantic version of this taxonomy

isLatest
boolean

Consider this the latest version of the taxonomy with this name? Defaults to True.

Responses

Request samples

Content type
application/json
{
  • "groups": [
    ],
  • "classifications": [
    ],
  • "name": "string",
  • "hierarchy": null,
  • "provenance": "string",
  • "version": "string",
  • "isLatest": true
}

Response samples

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

Delete a taxonomy

Delete a taxonomy

path Parameters
taxonomy_id
required
integer

Responses

Response samples

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

Get all the taxonomies

Get all the taxonomies

Responses

Response samples

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

Post new taxonomy

Post new taxonomy

Request Body schema: application/json
name
required
string

Short string to make this taxonomy memorable to end users.

hierarchy
required
object

Nested JSON describing the taxonomy which should be validated against a schema before entry

group_ids
Array of integers

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

version
required
string

Semantic version of this taxonomy name

provenance
string

Identifier (e.g., URL or git hash) that uniquely ties this taxonomy back to an origin or place of record

isLatest
boolean

Consider this version of the taxonomy with this name the latest? Defaults to True.

Responses

Request samples

Content type
application/json
{
  • "name": "string",
  • "hierarchy": { },
  • "group_ids": [
    ],
  • "version": "string",
  • "provenance": "string",
  • "isLatest": true
}

Response samples

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

telescopes

Retrieve a telescope

Retrieve a telescope

path Parameters
telescope_id
required
integer

Responses

Response samples

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

Update telescope

Update telescope

path Parameters
telescope_id
required
integer
Request Body schema: application/json
instruments
Array of any
name
required
string

Unabbreviated facility name (e.g., Palomar 200-inch Hale Telescope).

nickname
required
string

Abbreviated facility name (e.g., P200).

lat
number or null

Latitude in deg.

lon
number or null

Longitude in deg.

elevation
number or null

Elevation in meters.

diameter
required
number

Diameter in meters.

skycam_link
string or null

Link to the telescope's sky camera.

weather_link
string or null

Link to the preferred weather site

robotic
boolean

Is this telescope robotic?

fixed_location
boolean

Does this telescope have a fixed location (lon, lat, elev)?

Responses

Request samples

Content type
application/json
{
  • "instruments": [
    ],
  • "name": "string",
  • "nickname": "string",
  • "lat": 0,
  • "lon": 0,
  • "elevation": 0,
  • "diameter": 0,
  • "skycam_link": "string",
  • "weather_link": "string",
  • "robotic": true,
  • "fixed_location": true
}

Response samples

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

Delete a telescope

Delete a telescope

path Parameters
telescope_id
required
integer

Responses

Response samples

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

Retrieve all telescopes

Retrieve all telescopes

query Parameters
name
string

Filter by name (exact match)

latitudeMin
number

Filter by latitude >= latitudeMin

latitudeMax
number

Filter by latitude <= latitudeMax

longitudeMin
number

Filter by longitude >= longitudeMin

longitudeMax
number

Filter by longitude <= longitudeMax

Responses

Response samples

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

Create telescopes

Create telescopes

Request Body schema: application/json
instruments
Array of any
name
required
string

Unabbreviated facility name (e.g., Palomar 200-inch Hale Telescope).

nickname
required
string

Abbreviated facility name (e.g., P200).

lat
number or null

Latitude in deg.

lon
number or null

Longitude in deg.

elevation
number or null

Elevation in meters.

diameter
required
number

Diameter in meters.

skycam_link
string or null

Link to the telescope's sky camera.

weather_link
string or null

Link to the preferred weather site

robotic
boolean

Is this telescope robotic?

fixed_location
boolean

Does this telescope have a fixed location (lon, lat, elev)?

Responses

Request samples

Content type
application/json
{
  • "instruments": [
    ],
  • "name": "string",
  • "nickname": "string",
  • "lat": 0,
  • "lon": 0,
  • "elevation": 0,
  • "diameter": 0,
  • "skycam_link": "string",
  • "weather_link": "string",
  • "robotic": true,
  • "fixed_location": true
}

Response samples

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

Retrieve weather info at the telescope site saved

Retrieve weather info at the telescope site saved by user or telescope specified by telescope_id parameter

query Parameters
telescope_id
integer

Responses

Response samples

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

thumbnails

Retrieve a thumbnail

Retrieve a thumbnail

path Parameters
thumbnail_id
required
integer

Responses

Response samples

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

Update thumbnail

Update thumbnail

path Parameters
thumbnail_id
required
integer
Request Body schema: application/json
obj
any or null

The Thumbnail's Obj.

type
string or null <= 6 characters
Enum: "new" "ref" "sub" "sdss" "dr8" "ls" "ps1" "new_gz" "ref_gz" "sub_gz"

Thumbnail type (e.g., ref, new, sub, ls, ps1, ...)

file_uri
string or null

Path of the Thumbnail on the machine running SkyPortal.

public_url
string or null

Publically accessible URL of the thumbnail.

origin
string or null

Origin of the Thumbnail.

obj_id
required
string

ID of the thumbnail's obj.

is_grayscale
boolean

Boolean indicating whether the thumbnail is (mostly) grayscale or not.

Responses

Request samples

Content type
application/json
{
  • "obj": null,
  • "type": "new",
  • "file_uri": "string",
  • "public_url": "string",
  • "origin": "string",
  • "obj_id": "string",
  • "is_grayscale": true
}

Response samples

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

Delete a thumbnail

Delete a thumbnail

path Parameters
thumbnail_id
required
integer

Responses

Response samples

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

Upload thumbnails

Upload thumbnails

Request Body schema: application/json
obj_id
string

ID of object associated with thumbnails.

data
required
string <byte>

base64-encoded PNG image file contents. Image size must be between 16px and 500px on a side.

ttype
required
string

Thumbnail type. Must be one of 'new', 'ref', 'sub', 'sdss', 'dr8', 'new_gz', 'ref_gz', 'sub_gz'

Responses

Request samples

Content type
application/json
{
  • "obj_id": "string",
  • "data": "string",
  • "ttype": "string"
}

Response samples

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

Get information on thumbnails that are or are not

Get information on thumbnails that are or are not in the correct folder/path.

query Parameters
types
Array of strings

types of thumbnails to check The default is ['new', 'ref', 'sub'] which are all the thumbnail types stored locally.

requiredDepth
integer

number of subdirectories that are desired for thumbnails. For example if requiredDepth is 2, then thumbnails will be stored in a folder like /skyportal/static/thumbnails/ab/cd/_.png where "ab" and "cd" are the first characters of the hash of the source name. If requiredDepth is 0, then thumbnails are expected to be all in one folder under /skyportal/static/thumbnails.

Responses

Response samples

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

Delete all empty subfolders under "thumbnails". Th

Delete all empty subfolders under "thumbnails". These can be left over if moving thumbnails to a different folder structure.

Responses

Response samples

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

Update the file path and file_uri of the database

Update the file path and file_uri of the database rows of thumbnails that are not in the correct folder/path.

query Parameters
types
Array of strings

types of thumbnails to check The default is ['new', 'ref', 'sub'] which are all the thumbnail types stored locally.

requiredDepth
integer

number of subdirectories that are desired for thumbnails. For example if requiredDepth is 2, then thumbnails will be stored in a folder like /skyportal/static/thumbnails/ab/cd/_.png where "ab" and "cd" are the first characters of the hash of the source name. If requiredDepth is 0, then thumbnails are expected to be all in one folder under /skyportal/static/thumbnails.

numPerPage
integer

Number of sources to check for updates. Defaults to 100. Max 500.

pageNumber
integer

Page number for iterating through all sources. Defaults to 1

Responses

Response samples

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

tnsrobots

Retrieve a TNS robot

Retrieve a TNS robot

path Parameters
tnsrobot_id
required
integer
query Parameters
groupID
integer

Filter by group ID

Responses

Response samples

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

Update TNS robot

Update TNS robot

path Parameters
tnsrobot_id
required
integer
Request Body schema: application/json
group
any or null

The Group the TNS robot is associated with.

group_id
required
integer

The ID of the Group the TNS robot is associated with.

bot_name
required
string

Name of the TNS bot.

bot_id
required
integer

ID of the TNS bot.

source_group_id
required
integer

Source group ID of the TNS bot.

_altdata
string or null
auto_report_group_ids
Array of integers or null
auto_reporters
string or null

Auto report reporters.

id
integer

Unique object identifier.

Responses

Request samples

Content type
application/json
{
  • "group": null,
  • "group_id": 0,
  • "bot_name": "string",
  • "bot_id": 0,
  • "source_group_id": 0,
  • "_altdata": "string",
  • "auto_report_group_ids": [
    ],
  • "auto_reporters": "string",
  • "id": 0
}

Response samples

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

Delete TNS robot.

Delete TNS robot.

path Parameters
tnsrobot_id
required
string

Responses

Response samples

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

Retrieve all TNS robots

Retrieve all TNS robots

Responses

Response samples

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

Post new TNS robot

Post new TNS robot

Request Body schema: application/json
group
any or null

The Group the TNS robot is associated with.

group_id
required
integer

The ID of the Group the TNS robot is associated with.

bot_name
required
string

Name of the TNS bot.

bot_id
required
integer

ID of the TNS bot.

source_group_id
required
integer

Source group ID of the TNS bot.

_altdata
string or null
auto_report_group_ids
Array of integers or null
auto_reporters
string or null

Auto report reporters.

Responses

Request samples

Content type
application/json
{
  • "group": null,
  • "group_id": 0,
  • "bot_name": "string",
  • "bot_id": 0,
  • "source_group_id": 0,
  • "_altdata": "string",
  • "auto_report_group_ids": [
    ],
  • "auto_reporters": "string"
}

Response samples

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

acls

Grant new ACL(s) to a user

Grant new ACL(s) to a user

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

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

Responses

Request samples

Content type
application/json
{
  • "aclIds": [
    ]
}

Response samples

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

Remove ACL from user permissions

Remove ACL from user permissions

path Parameters
user_id
required
integer
acl_id
required
string

Responses

Response samples

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

weather

Retrieve weather info at the telescope site saved

Retrieve weather info at the telescope site saved by user or telescope specified by telescope_id parameter

query Parameters
telescope_id
integer

Responses

Response samples

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

webhook

Return the results of an analysis

Return the results of an analysis

path Parameters
analysis_resource_type
required
string

What underlying data the analysis was performed on: must be "obj" (more to be added in the future)

token
required
string

The unique token for this analysis.

Request Body schema: application/json
results
object

Results data of this analysis

Responses

Request samples

Content type
application/json
{
  • "results": { }
}

Response samples

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