The Jdaviz.MAST API provides programmatic access to a variety of parameters and metadata related to JWST data products and observations. This article provides a brief summary of the available API endpoints. See the complete API documentation for more details.
On this page...
The Jdaviz.MAST API
The global URL for the Jdaviz.MAST API is https://mast.stsci.edu/viz/api/v0.1/, which has the following service endpoints:
- parameters: return observation parameters
- keywords/search: return instrument keywords
- products: return related data products
- info/keywords: return instrument keyword metadata
- info/mnemonics: return engineering mnemonic metadata
Basics of an API
The examples on this page assume basic knowledge of APIs and making HTTP requests. For a refresher, see the Basics of an API. Unless otherwise specified, all API calls and URLS on this page are HTTP GET requests.
Accessing Observation Parameters
You can access the observations parameters for any JWST data product given a MAST DATA URI. Use the endpoint https://mast.stsci.edu/viz/api/v0.1/parameters, which accepts a URI query parameter with syntax "uri=[MAST_DATA_URI]". See the Parameters API Documentation for complete details. The parameters returned by this endpoint, in JSON format, are the same as the Portal Product File Details.
Accessing Science Instrument Keywords
You can access the science instrument (SI) keywords for any JWST data product given a MAST DATA URI or product filename. Use the endpoint https://mast.stsci.edu/viz/api/v0.1/keywords/search, which accepts a URI query parameter with syntax "uri=[MAST_DATA_URI]". See the Keywords API Documentation for complete details. This endpoint returns the SI keywords in JSON format.
Accessing Related Data Products
You can access all related data product for any JWST data product given a MAST DATA URI. Use the endpoint https://mast.stsci.edu/viz/api/v0.1/products, which accepts a URI query parameter with syntax "uri=[MAST_DATA_URI]", and level query parameter, indicating the MAST Calibration Level of the products. See the Products API Documentation for complete details. This endpoint returns a list of data products for a given JWST observation ID. Each item in the list is a dictionary of data product parameters.
Accessing Metadata Information
You can access metadata information about the JWST Science Instrument (SI) keywords and Engineering Mnemonics using the API endpoint https://mast.stsci.edu/viz/api/v0.1/info/. See the Info API Documentation for complete details.
Science Instrument Keywords
To access the metadata information about the science instrument keywords, use the endpoint https://mast.stsci.edu/viz/api/v0.1/info/keywords/. You can optionally specify a name query parameter, specifying the name of the keyword you wish to return information on. This endpoint returns the Instrument Keyword schema information in JSON format, the same information as displayed in the JWST Keyword Dictionary.
Example - Return all keywords: https://mast.stsci.edu/viz/api/v0.1/info/keywords/
Example - Return a single keyword: https://mast.stsci.edu/viz/api/v0.1/info/keywords?name=BKGDTARG
Engineering Mnemonics
To access the metadata information about the engineering mnemonics, use the endpoint https://mast.stsci.edu/viz/api/v0.1/info/mnemonics/. You can optionally specify a name query parameter, specifying the name of the mnemonic you wish to return information on. This endpoint returns the mnemonic schema information in JSON format, the same information as displayed in the JWST Engineering Portal.
Example - Return all mnemonics: https://mast.stsci.edu/viz/api/v0.1/info/mnemonics/
Example - Return a single mnemonic: https://mast.stsci.edu/viz/api/v0.1/info/mnemonics/?name=so_zfxposns