Spectra Web Services

GET /api/v0.1/spectra/{planet_name}/plot

Get curated Spectra plots for particular exoplanet

Handler for DataDelivery Bokeh queries.

Get curated Spectra plots for particular exoplanet

This web method uses the archive webservice to request curated spectra for a given exoplanet.

Returns

Bokeh spectra plots or JSON with plots and information

Example request:

GET /api/v0.1/spectra/HAT-P-11%20b/plot/?embed HTTP/1.1
Host: exo.mast.stsci.edu

Example response:

HTTP/1.1 200 OK
Vary: Accept
Content-Type: text/javascript

{
  "resources": {"js": ..., "css": ...},
  "dvplots": {
    "script": script,
    "divs": [plotdiv1,plotdiv2,],
    "filenames": filenames,
    "bibcodes": bibcodes
  }
}
Status Codes
Parameters
  • planet_name (string) – Exoplanet name or id

Query Parameters
  • embed (string) – This flag tells the request render a html page or return components to embed

GET /api/v0.1/spectra/{planet_name}/file/{filename}/

Get

Get the Spectra datafile

This web method pulls a States datafile off of the filesystem and retrieves it for the caller. This is used in the UI when a user wants to retrieve the source data for one of our spectra plots.

Returns

text/plain file with the data

Example request:

GET /api/v0.1/spectra/WASP-101b/file/WASP-101b_transmission_Wakeford2017.txt HTTP/1.1
Host: exo.mast.stsci.edu

Example response:

HTTP/1.1 200 OK
Vary: Accept
Content-Type: text/plain

...
Parameters
  • planet_name (string) –

  • filename (string) –

Status Codes
GET /api/v0.1/spectra/{planet_name}/filelist

Get the list of Spectra datafiles

Get the list of Spectra datafiles

This web method pulls a list of available datafiles for a given planet. The user may then call the /file/ method to retrieve the data.

Example request:

GET /api/v0.1/spectra/WASP-101b/filelist/ HTTP/1.1
Host: exo.mast.stsci.edu

Example response:

HTTP/1.1 200 OK
Vary: Accept
Content-Type: text/json

{"filenames": ["WASP-101b_transmission_Wakeford2017.txt"]}
Parameters
  • planet_name (string) – Exoplanet name or id

Status Codes