Notice |
---|
For two decades, there was also a Simple Object Access Protocol (SOAP) version of the CDAS web services, but they were eliminated in March 2024 due to lack of computer industry support. |
curl
,
xsltproc
, and xmllint
.
To install the prerequisite software on debian/ubuntu based Linux
distributions, do
$ sudo apt install libxml2-utils
$ sudo apt install xsltproc
$ sudo dnf install libxml2
$ sudo dnf install libxslt
node CdasNodeExample.js
Note: These example URLs produce XML (or JSON) which may not display well in all browsers. You may want to enable the browser's "developer mode", install an extension for viewing XML (or JSON), or use a tool other than a browser such as curl.
//p[class='ErrorMessage']/text() and
//p[class='ErrorDescription']/text().
//p[class='ErrorMessage']/text()
value described above is accessible by //p[2]/text()
in
the error response from both these web services and their hosting
application server. Likewise, the //p[class='ErrorDescription']/text()
value described above is accessible by //p[3]/text()
in
the error response from both these web services and their hosting
application server. Category |
Operation |
Implementation |
Details |
---|---|---|---|
Metadata |
Get WADL |
GET /application.wadl |
Details |
Get Dataviews |
GET /dataviews |
Details |
|
Get ObservatoryGroups |
GET
/dataviews/{dataview}/observatoryGroups? instrumentType={instrumentType} |
Details |
|
Get InstrumentTypes |
GET
/dataviews/{dataview}/instrumentTypes? observatory={observatory}& observatoryGroup={observatoryGroup} |
Details |
|
Get Instruments |
GET
/dataviews/{dataview}/instruments? observatory={observatory}& instrumentType={instrumentType} |
Details |
|
Get Observatories |
GET
/dataviews/{dataview}/observatories? instrument={instrument}& instrumentType={instrumentType} |
Details |
|
Get ObservatoryGroupsAndInstruments | GET
/dataviews/{dataview}/observatoryGroupsAndInstruments? instrumentType={instrumentType} |
Details |
|
Get Dataset |
GET
/dataviews/{dataview}/datasets? observatoryGroup={observatoryGroup}& instrumentType={instrumentType}& observatory={observatory}& instrument={instrument}& startDate={startDate}& stopDate={stopDate}& id={id}& idPattern={idPattern}& labelPattern={labelPattern}& notesPattern={notesPattern} |
Details |
|
Get Inventory |
GET
/dataviews/{dataview}/datasets/{dataset}/inventory/ {start-time},{end-time} |
Details |
|
Get Variables |
GET
/dataviews/{dataview}/datasets/{dataset}/variables |
Details |
|
Get Client Example |
GET
/dataviews/{dataview}/datasets/{dataset}/clientLibraryExample/{library}?mediaType={mediaType} |
Details |
|
Data |
Get Data |
POST
/dataviews/{dataview}/datasets |
Details |
GET
/dataviews/{dataview}/datasets/{dataset}/data/ {start-time},{stop-time}/ {var1},{varn}?format={format}& options={options}& cdfVersion={cdfVersion}& thumbnailId={id}&thumbnail={num} |
Details |
||
GET
/dataviews/{dataview}/datasets/{dataset}/orig_data/ {start-time},{stop-time}/ |
Details |
$ curl https://cdaweb.gsfc.nasa.gov/WS/cdasr/1/application.wadl?detail | xmllint --format -
HTTP Method |
GET |
|
---|---|---|
URI |
/dataviews |
|
Significant
Request Headers |
Accept |
application/xml |
application/json |
||
If-Modified-Since |
||
Request Entity |
none |
|
Significant Response Headers |
Last-Modified |
|
Response
Entity |
Content-Type:
application/xml |
As specified by Dataviews in CDAS.xsd |
Content-Type: application/json |
JSON representation of Dataviews
in CDAS.xsd |
|
Most
Likely Response Codes |
200 |
Ok |
304 |
Not Modified |
|
406 |
Not Acceptable |
HTTP Method |
GET |
|
---|---|---|
URI |
/dataviews/{dataview}/observatoryGroups? instrumentType={instrumentType} |
|
Significant
Request Headers |
Accept |
application/xml |
application/json |
||
If-Modified-Since |
||
Request Entity |
none |
|
Significant Response Headers |
Last-Modified |
|
Response
Entity |
Content-Type:
application/xml |
As specified by
ObservatoryGroups in CDAS.xsd |
Content-Type: application/json |
JSON representation of ObservatoryGroups
in CDAS.xsd |
|
Most
Likely Response Codes |
200 |
Ok |
304 |
Not Modified |
|
406 |
Not Acceptable |
/InstrumentTypes/InstrumentTypeDescription/Name
)
from those returned by a Get InstrumentTypes
request. Omitting this parameter indicates that no observatories
are eliminated based upon their instrumentType value.HTTP Method |
GET |
|
---|---|---|
URI |
/dataviews/{dataview}/instrumentTypes? observatory={observatory}& observatoryGroup={observatoryGroup} |
|
Significant
Request Headers |
Accept |
application/xml |
application/json |
||
If-Modified-Since |
||
Request Entity |
none |
|
Significant Response Headers |
Last-Modified |
|
Response
Entity |
Content-Type:
application/xml |
As specified by InstrumentTypes
in CDAS.xsd |
Content-Type: application/json |
JSON representation of
InstrumentTypes
in CDAS.xsd |
|
Most
Likely Response Codes |
200 |
Ok |
304 |
Not Modified |
|
406 |
Not Acceptable |
/Observatories/ObservatoryDescription/Name
)
from those returned by a Get
Observatories request. Omitting this parameter indicates that
no instrumentTypes are eliminated based upon their observatory value./ObservatoryGroups/ObservatoryGroupDescription/Name
)
from those returned by a Get ObservatoryGroups
request. Omitting this parameter indicates that no
instrumentTypes are eliminated based upon their observatoryGroup value.HTTP Method |
GET |
|
---|---|---|
URI |
/dataviews/{dataview}/instruments? observatory={observatory}& instrumentType={instrumentType} |
|
Significant
Request Headers |
Accept |
application/xml |
application/json |
||
If-Modified-Since |
||
Request Entity |
none |
|
Significant Response Headers |
Last-Modified |
|
Response
Entity |
Content-Type:
application/xml |
As specified by Instruments in CDAS.xsd |
Content-Type: application/json |
JSON representation of
Instruments
in CDAS.xsd |
|
Most
Likely Response Codes |
200 |
Ok |
304 |
Not Modified |
|
406 |
Not Acceptable |
/Observatories/ObservatoryDescription/Name
)
from those returned by a Get
Observatories request. Omitting this parameter indicates that
no instruments are eliminated based upon their observatory value./InstrumentTypes/InstrumentTypeDescription/Name
)
from those returned by a Get
Instrument Types request. Omitting this parameter indicates
that no instruments are eliminated based upon their instrument type.HTTP Method |
GET |
|
---|---|---|
URI |
/dataviews/{dataview}/observatories? instrument={instrument}& instrumentType={instrumentType} |
|
Significant
Request Headers |
Accept |
application/xml |
application/json |
||
If-Modified-Since |
||
Request Entity |
none |
|
Significant Response Headers |
Last-Modified |
|
Response
Entity |
Content-Type:
application/xml |
As specified by Observatories in
CDAS.xsd |
Content-Type: application/json |
JSON representation of
Observatories
in CDAS.xsd |
|
Most
Likely Response Codes |
200 |
Ok |
304 |
Not Modified |
|
406 |
Not Acceptable |
/Instruments/InstrumentDescription/Name
)
from those returned by a Get
Instruments request. Omitting this parameter indicates that
no observatories are eliminated based upon their instrument value./InstrumentTypes/InstrumentTypeDescription/Name
)
from those returned by a Get InstrumentTypes
request. Omitting this parameter indicates that no observatories
are eliminated based upon their instrumentType value.HTTP Method |
GET |
|
---|---|---|
URI |
/dataviews/{dataview}/observatoryGroupsAndInstruments? instrumentType={instrumentType} |
|
Significant
Request Headers |
Accept |
application/xml |
application/json |
||
If-Modified-Since |
||
Request Entity |
none |
|
Significant Response Headers |
Last-Modified |
|
Response
Entity |
Content-Type:
application/xml |
As specified by
ObservatoryGroupInstruments in CDAS.xsd |
Content-Type: application/json |
JSON representation of Dataviews
in CDAS.xsd |
|
Most
Likely Response Codes |
200 |
Ok |
304 |
Not Modified |
|
406 |
Not Acceptable |
/InstrumentTypes/InstrumentTypeDescription/Name
)
from those returned by a Get InstrumentTypes
request. Omitting this parameter indicates that no observatories
are eliminated based upon their instrumentType value.HTTP Method |
GET |
|
---|---|---|
URI |
/dataviews/{dataview}/datasets? observatoryGroup={observatoryGroup}& instrumentType={instrumentType}& observatory={observatory}& instrument={instrument}& startDate={startDate}& stopDate={stopDate}& id={id}& idPattern={idPattern}& labelPattern={labelPattern}& notesPattern={notesPattern} |
|
Significant
Request Headers |
Accept |
application/xml |
application/json |
||
If-Modified-Since |
||
Request Entity |
none |
|
Significant Response Headers |
Last-Modified |
|
Response
Entity |
Content-Type:
application/xml |
As specified by Datasets in CDAS.xsd |
Content-Type: application/json |
JSON representation of Datasets
in CDAS.xsd |
|
Most
Likely Response Codes |
200 |
Ok |
304 |
Not Modified |
|
404 |
Not Found |
|
406 |
Not Acceptable |
/ObservatoryGroups/ObservatoryGroupDescription/Name
)
from those returned by a Get
ObservatoryGroups request. Omitting this parameter indicates
that no datasets are eliminated based upon their observatoryGroup value./InstrumentTypes/InstrumentTypeDescription/Name
)
from those returned by a Get
InstrumentTypes request. Omitting this parameter indicates
that no datasets are eliminated based upon their instrumentType value./Observatories/ObservatoryDescription/Name
)
from those returned by a Get Observatories
request. Omitting this parameter indicates that no datasets are
eliminated based upon their observatory value./Instruments/InstrumentDescription/Name
)
from those returned by a Get Instruments
request. Omitting this parameter indicates that no datasets are
eliminated based upon their instrument value.java.util.regex
compatible regular expression that
must match the dataset's CDAS identifier value. Omitting this
parameter is equivalent to ".*
".java.util.regex
compatible regular expression that
must match the dataset's CDAS label text. Omitting this
parameter is equivalent to ".*
". Embedded matching
flag expressions (e.g., (?i)
for case insensitive match
mode) are supported and likely to be useful in this case.java.util.regex
compatible regular expression that
must match the dataset's CDAS notes text. Omitting this
parameter is equivalent to ".*
". Embedded matching
flag expressions (e.g., (?s)
for dotall match mode) are
supported and likely to be useful in this case.observatoryGroup=THEMIS&instrumentType=Magnetic%20Fields%20(space)&startDate=20160101T000000Z&endData=20160102T000000Z
is valid but
observatoryGroup=THEMIS&instrumentType=Magnetic%20Fields%20(space)&instrument=L2
is not valid.
java.util.regex
expression (e.g., notesPattern="(?s)(?i).*apollo(12|15).*
").HTTP Method |
GET |
|
---|---|---|
URI |
/dataviews/{dataview}/datasets/{dataset}/inventory/ {start-time},{end-time} see notes below for further details | |
Significant
Request Headers |
Accept |
application/xml |
application/json | ||
If-Modified-Since |
||
Request Entity |
none |
|
Significant Response Headers |
Last-Modified |
|
Response
Entity |
Content-Type: application/xml |
As specified by Inventory from CDAS.xsd |
Content-Type: application/json |
JSON representation of
Inventory |
|
Most Likely Reponse Codes |
200 |
Ok |
304 |
Not Modified |
|
404 |
Not Found |
|
406 |
Not Acceptable |
|
415 |
Unsupported Media Type |
HTTP Method |
GET |
|
---|---|---|
URI |
/dataviews/{dataview}/datasets/{dataset}/variables | |
Significant
Request Headers |
Accept |
application/xml |
application/json | ||
If-Modified-Since |
||
Request Entity |
none |
|
Significant Response Headers |
Last-Modified |
|
Response
Entity |
Content-Type: application/xml |
As specified by Variables from CDAS.xsd |
Content-Type: application/json |
JSON representation of Variables |
|
Most Likely Reponse Codes |
200 |
Ok |
304 |
Not Modified |
|
404 |
Not Found |
|
406 |
Not Acceptable |
|
415 |
Unsupported Media Type |
HTTP Method |
GET |
|
---|---|---|
URI |
/dataviews/{dataview}/datasets/{dataset}/clientLibraryExample/{library}?mediaType={mediaType} | |
Significant
Request Headers |
Accept |
application/xhtml+xml |
application/octet-stream |
||
text/plain | ||
text/x-python | ||
text/x-idl | ||
If-Modified-Since |
||
Request Entity |
none |
|
Significant Response Headers |
Last-Modified |
|
Response
Entity |
Content-Type: application/xhtml+xml |
An XHTML page containing example code for the specified client library to retrieve data from the specified dataset. |
Content-Type: text/plain, text/x-python, text/x-idl, application/octet-stream | Example code for the specified client library to retrieve data from the specified dataset. | |
Most Likely Reponse Codes |
200 |
Ok |
304 |
Not Modified |
|
404 |
Not Found |
|
406 |
Not Acceptable |
Value | Corresponding MIME Type |
---|---|
octet | application/octet-stream |
plain | text/plain |
python | text/x-python |
idl | text/x-idl |
This service provides data from a dataset. The data is available in various representations (CDF, text, graph).
Note: In the case of a request for a non-original (that is,
subsetted/supersetted) CDF (or CDFML) file involving a dataset whose
variable names are not legal
IDL
variable names, the variable names in the resulting CDF (or CDFML) file
will have their names changed to legal IDL variable names. For example, a
request for a subsetted FA_K0_TMS CDF file will result in a file where the
original H+
variable name has been changed to H$
.
HTTP Method |
POST |
|
---|---|---|
URI |
/dataviews/{dataview}/datasets/ | |
Significant
Request Headers |
Accept |
application/xml |
application/json | ||
If-Modified-Since | Only return the data if the underlying files have been modified since the specified date. | |
Request Entity |
As specified by DataRequest in CDAS.xsd |
|
Significant Response Headers |
Last-Modified |
|
Response
Entity |
Content-Type:
application/xml |
As
specified by DataResult in CDAS.xsd |
Content-Type: application/json |
JSON representation of DataResult |
|
Most Likely Reponse Codes |
200 |
Ok |
304 |
Not Modified |
|
404 |
Not Found |
|
406 |
Not Acceptable |
|
415 |
Unsupported Media Type |
|
429 |
Too Many Requests. Check Retry-After header value. |
|
503 |
Service Unavailable. Check Retry-After header value. |
$ curl --silent -H "Content-Type: application/xml" \ -H "Accept: application/xml" \ --data-ascii @Request.xml \ https://cdaweb.gsfc.nasa.gov/WS/cdasr/1/dataviews/sp_phys/datasets \ | xmllint --format -Where Request.xml is
This service provides data from a dataset. The data is available in various representations (CDF, text, graph). This operation offers a subset of the features available in the corresponding POST operation.
Note: In the case of a request for a non-original (that is,
subsetted/supersetted) CDF (or CDFML) file involving a dataset whose
variable names are not legal
IDL
variable names, the variable names in the resulting CDF (or CDFML) file
will have their names changed to legal IDL variable names. For example, a
request for a subsetted FA_K0_TMS CDF file will result in a file where the
original H+
variable name has been changed to H$
.
HTTP Method |
GET |
|
---|---|---|
URI |
/dataviews/{dataview}/datasets/{dataset}/data/ {start-time},{stop-time}/ {var1},{varn}?format={format}& options={options}& cdfVersion={cdfVersion}& &thumbnailId={id}&thumbnail={num} see notes below for further details |
|
Significant
Request Headers |
Accept |
application/xml |
application/json | ||
If-Modified-Since | Only return the data if the underlying files have been modified since the specified date. | |
Request Entity |
none |
|
Significant Response Headers |
Last-Modified |
|
Response
Entity |
Content-Type:
application/xml |
As specified by DataResult in CDAS.xsd |
Content-Type: application/json |
JSON representation of DataResult | |
Most Likely Reponse Codes |
200 |
Ok |
304 |
Not Modified |
|
400 |
Bad Request (refer to
entity-body for specifics) |
|
404 |
Not Found |
|
406 |
Not Acceptable |
|
415 |
Unsupported Media Type |
|
429 |
Too Many Requests. Check Retry-After header value. |
|
503 |
Service Unavailable. Check Retry-After header value. |
start-time
is the beginning time of an interval in
basic (minimal
number of separators) ISO 8601 format (for example, 20090817T000000Z).
Extended ISO 8601 format is not allowed.stop-time
is the ending time of an interval in
basic (minimal
number of separators) ISO 8601 format. Extended ISO 8601 format
is not allowed.var1,varn
are the comma separated list of variable
names identifying the data to get. The names should be from those
returned by the Get Variables operation.
Note that the names of some variables in a few CDAS datasets contain
RFC 3986 reserved characters and must be URL encoded.
At least one variable name must be specified when format=text
,
format=gif
, format=png
, format=ps
,
or format=pdf
. When format=cdf
, you may use
ALL-VARIABLES
instead of specifying all the individual
variable names. format
is the output representation of the
requested data:cdf
requests the data in the binary
CDF file
format (any other format options are ignored).
text
requests the data in an ASCII text
representation (any other format options are ignored).csv
requests the data in a Comma Separated Values
(CSV) representation (any other format options are ignored).
nc
requests the data in the binary
netcdf
file format (any other format options are ignored).
audio
requests the data in an audio representation
(any other format options are ignored).
icdfml
requests the data be returned as a
CDFML
representation within the HTTP response. Whereas the above formats
return a URL to an external file containing the requested data, this
HTTP response will contain the actual requested data.
json
requests the data be returned as a
JSON
representation of
CDFML
within the HTTP response. This is equivalent to requesting
icdfml
and setting the HTTP Accept
header to
application/json
. This option is provided as a
convenience for clients for which setting the HTTP
Accept
header is difficult.
cdfjson
requests the data be returned in the response
body as a JSON representation of CDF as produced by the
CDF2Json tool with the addition of a root-level attribute
named cdasStatus and a value of an object containing attributes
named statuses, messages, warnings, and errors each of which have
values of an array of strings.
cdfVersion
is the CDF file version that any created
CDF files should be (2 or 3). This value is ignored for any
format
value other than CDF.options
is an integer with the following values:thumbnailId
is the value that was returned by a
previous call
that returned an image of thumbnail images. This parameter should
not be given for calls that are not requesting the expansion of a
thumbnail image.thumbnail
is the number of the thumbnail whose
expanded image is
now being requested. Thumbnail images are counted beginning at
one
(not zero). This parameter should not be given for calls
that are not requesting the expansion of a thumbnail image.HTTP Method |
GET |
|
---|---|---|
URI |
/dataviews/{dataview}/datasets/{dataset}/orig_data/ {start-time},{stop-time}/ see notes below for further details |
|
Significant
Request Headers |
Accept |
application/xml |
application/json | ||
If-Modified-Since | Only return the data if the underlying files have been modified since the specified date. | |
Request Entity |
none |
|
Significant Response Headers |
Last-Modified |
|
Response
Entity |
Content-Type:
application/xml |
As specified by DataResult in CDAS.xsd |
Content-Type: application/json |
JSON representation of DataResult | |
Most Likely Reponse Codes |
200 |
Ok |
304 |
Not Modified |
|
400 |
Bad Request (refer to
entity-body for specifics) |
|
404 |
Not Found |
|
406 |
Not Acceptable |
|
415 |
Unsupported Media Type |
start-time
is the beginning time of an interval in
basic (minimal number of separators) ISO 8601 format. Extended
ISO 8601 format is not allowed.stop-time
is the ending time of an interval in
basic (minimal number of separators) ISO 8601 format. Extended
ISO 8601 format is not allowed.Questions or comments concerning these Web services should be sent to CDAS Feedback.