Complete SSC R2.4.9 Web Services API

Generated by IDLdoc

single page | use frames     summary     class     fields     routine details     file attributes

./

spdfrest__define.pro


This class represents the remotely callable interface to NASA's Space Physics Data Facility (SPDF) RESTful Web services.

Author information

Author

B. Harris

Copyright

Copyright (c) 2013-2025 United States Government as represented by the National Aeronautics and Space Administration. No copyright is claimed in the United States under Title 17, U.S.Code. All Other Rights Reserved.

Class description for SpdfRest

Subclasses: SpdfSsc

Properties

Properties in SpdfRest

sslVerifyPeer init
userAgent init

Fields

Fields in SpdfRest

currentVersionUrl ''

URL to the file identifying the most up to date version of this class.

endpoint ''

URL of SSC web service.

proxy_authentication 0L

IDLnetURL PROXY_AUTHENTICATION property value.

proxy_hostname ''

IDLnetURL PROXY_HOSTNAME property value.

proxy_password ''

IDLnetURL PROXY_PASSWORD property value.

proxy_port ''

IDLnetURL PROXY_PORT property value.

proxy_username ''

IDLnetURL PROXY_USERNAME property value.

retryLimit 0L

retry limit for requests that fail with an http status of 429 or 503 with a Retry-After header.

ssl_verify_peer 0L

IDLnetURL SSL_VERIFY_PEER property value.

userAgent ''

HTTP user-agent value to use in communications with SSC.

version ''

identifies the version of this class.

Class description for SpdfSsc

Inheritance

Properties

Properties in SpdfRest

Fields

Fields in SpdfRest

Routines

Methods inherited from SpdfRest

Routines from spdfrest__define.pro

result = SpdfRest::init(endpoint, version, currentVersionUrl [, userAgent=string] [, sslVerifyPeer=int])

Creates an object representing the SPDF Web service.

SpdfRest::cleanup

Performs cleanup operations when this object is destroyed.

result = SpdfRest::getDefaultSslVerifyPeer()

Gets the default value for the IDLnetURL SSL_VERIFY_PEER property based upon the runtime version of IDL.

result = SpdfRest::getEndpoint()

Gets the current endpoint value.

result = SpdfRest::getUserAgent()

Gets the current userAgent value.

result = SpdfSsc::getDefaultDataview()

Gets the current defaultDataview value.

result = SpdfSsc::getVersion()

Gets the version of this class.

result = SpdfSsc::getCurrentVersion()

Gets the most up to date version of this class.

result = SpdfSsc::isUpToDate()

Compares getVersion() and getCurrentVersion() to determine if this class is up to date.

result = SpdfRest::getNamedElementsFirstChildValue(domElement, tagName)

Gets the node's value of the first child of the first item of the specified element of the given DOM document.

result = SpdfRest::getNamedElementsFirstChildDoubleValue(domElement, tagName)

Gets the node's double value of the first child of the first item of the specified element of the given DOM element.

result = SpdfRest::getNamedElementsFirstChildFloatValue(domElement, tagName)

Gets the node's float value of the first child of the first item of the specified element of the given DOM element.

result = SpdfRest::julDay2Iso8601(value)

Converts the given Julian Day value to an ISO 8601 string representation.

result = SpdfRest::getTimeIntervalChild(domNode)

Creates a SpdfTimeInterval object from a child TimeInterval element of the given node from a cdas:DataResult XML document.

result = SpdfRest::getTimeInterval(timeIntervalElement)

Creates a SpdfTimeInterval object from the given TimeInterval element from a cdas:DataResult XML document.

result = SpdfRest::getJulDate(dateTimeElement)

Creates a julday object from the given time element from a cdas:DataResult XML document.

result = SpdfRest::makeGetRequest(url [, errorReporter=string])

Perform an HTTP GET request to the given URL.

result = SpdfRest::makePostRequest(url, xmlRequest [, errorReporter=string])

Perform an HTTP POST request to the given URL.

result = SpdfRest::handleHttpError(request [, errorReporter=string])

Function to handle HTTP request errors.

result = SpdfRest::getRequestUrl(url, username, password)

Create an IDLnetUrl object from the given URL with any supplied authentication values set.

SpdfRest__define

Defines the SpdfRest class.

Routine details

top source SpdfRest::init

result = SpdfRest::init(endpoint, version, currentVersionUrl [, userAgent=string] [, sslVerifyPeer=int])

Creates an object representing the SPDF Web service. If access to the Internet is through an HTTP proxy, the caller should ensure that the HTTP_PROXY environment variable is correctly set before this method is called. The HTTP_PROXY value should be of the form http://username:password@hostname:port/. NOTE: Due to support for the HTTP_PROXY environment variable, this class should not be used in a CGI-like environment where HTTP_PROXY can be set by untrusted entities (see httpoxy vulnerability).

Return value

a reference to a SSC object.

Parameters

endpoint in type=string

URL of SPDF web service.

version in type=string

class version.

currentVersionUrl in type=string

URL to the file identifying the most up to date version of this class.

Keywords

userAgent in optional type=string default=SscWs

HTTP user-agent value used in communications with SPDF.

sslVerifyPeer in optional type=int default=1

Specifies whether the authenticity of the peer's SSL certificate should be verified. When 0, the connection succeeds regardless of what the peer SSL certificate contains.

top source SpdfRest::cleanup

SpdfRest::cleanup

Performs cleanup operations when this object is destroyed.

top source SpdfRest::getDefaultSslVerifyPeer

result = SpdfRest::getDefaultSslVerifyPeer()

Gets the default value for the IDLnetURL SSL_VERIFY_PEER property based upon the runtime version of IDL.

Return value

0 if runtime version of IDL cannot verify new SSL certificates. Otherwise, 1.

top source SpdfRest::getEndpoint

result = SpdfRest::getEndpoint()

Gets the current endpoint value.

Return value

current endpoint string value.

top source SpdfRest::getUserAgent

result = SpdfRest::getUserAgent()

Gets the current userAgent value.

Return value

current userAgent string value.

top source SpdfSsc::getDefaultDataview

result = SpdfSsc::getDefaultDataview()

Gets the current defaultDataview value.

Return value

current defaultDataview string value.

top source SpdfSsc::getVersion

result = SpdfSsc::getVersion()

Gets the version of this class.

Return value

version of this class.

top source SpdfSsc::getCurrentVersion

result = SpdfSsc::getCurrentVersion()

Gets the most up to date version of this class.

Return value

most up to date version of this class.

top source SpdfSsc::isUpToDate

result = SpdfSsc::isUpToDate()

Compares getVersion() and getCurrentVersion() to determine if this class is up to date.

Return value

true if getVersion() >= getCurrentVersion(). Otherwise false.

top source SpdfRest::getNamedElementsFirstChildValueprivate

result = SpdfRest::getNamedElementsFirstChildValue(domElement, tagName)

Gets the node's value of the first child of the first item of the specified element of the given DOM document.

Return value

strarr containing the node's string value(s) of the first child of the item(s) of the specified element of the given DOM document. An empty string is returned if the value cannot be found.

Parameters

domElement in required type=IDLffXMLDOMElement

DOM element to search.

tagName in required type=string

A scalar string containing the tag name of the desired element.

top source SpdfRest::getNamedElementsFirstChildDoubleValueprivate

result = SpdfRest::getNamedElementsFirstChildDoubleValue(domElement, tagName)

Gets the node's double value of the first child of the first item of the specified element of the given DOM element.

Return value

dblarr containing the node's double value(s) of the first child of the item(s) of the specified element of the given DOM document. A scalar constant of !values.d_NaN is returned if the value cannot be found.

Parameters

domElement in required type=IDLffXMLDOMElement

DOM element to search.

tagName in required type=string

A scalar string containing the tag name of the desired element.

top source SpdfRest::getNamedElementsFirstChildFloatValueprivate

result = SpdfRest::getNamedElementsFirstChildFloatValue(domElement, tagName)

Gets the node's float value of the first child of the first item of the specified element of the given DOM element.

Return value

fltarr containing the node's float value(s) of the first child of the item(s) of the specified element of the given DOM document. A scalar constant of !values.f_NaN is returned if the value cannot be found.

Parameters

domElement in required type=IDLffXMLDOMElement

DOM element to search.

tagName in required type=string

A scalar string containing the tag name of the desired element.

top source SpdfRest::julDay2Iso8601private

result = SpdfRest::julDay2Iso8601(value)

Converts the given Julian Day value to an ISO 8601 string representation.

Return value

ISO 8601 string representation of the given value

Parameters

value in type=julDay

Julian day value to convert.

top source SpdfRest::getTimeIntervalChildprivate

result = SpdfRest::getTimeIntervalChild(domNode)

Creates a SpdfTimeInterval object from a child TimeInterval element of the given node from a cdas:DataResult XML document.

Return value

a reference to a SpdfTimeInterval object.

Parameters

domNode in type=IDLffXMLDOMNode

node from a cdas:DataResult XML document.

top source SpdfRest::getTimeIntervalprivate

result = SpdfRest::getTimeInterval(timeIntervalElement)

Creates a SpdfTimeInterval object from the given TimeInterval element from a cdas:DataResult XML document.

Return value

a reference to a SpdfTimeInterval object.

Parameters

timeIntervalElement in type=IDLffXMLDOMNode

element from a cdas:DataResult XML document.

top source SpdfRest::getJulDateprivate

result = SpdfRest::getJulDate(dateTimeElement)

Creates a julday object from the given time element from a cdas:DataResult XML document.

Return value

julday representation of first child of given dateTimeElement.

Parameters

dateTimeElement in type=IDLffXMLDOMNodeList

list whose first child is to be converted into a julday

top source SpdfRest::makeGetRequestprivate

result = SpdfRest::makeGetRequest(url [, errorReporter=string])

Perform an HTTP GET request to the given URL. This method provides functionality similar to doing obj_new('IDLffXMLDOMDocument', filename=url) except that this method will catch and attempt to deal with errors.

Return value

reference to IDLffXMLDOMDocument representation of HTTP response entity.

Parameters

url in type=string

URL of GET request to make.

Keywords

errorReporter in optional type=string

name of IDL procedure to call if an HTTP error occurs.

top source SpdfRest::makePostRequestprivate

result = SpdfRest::makePostRequest(url, xmlRequest [, errorReporter=string])

Perform an HTTP POST request to the given URL.

Return value

reference to IDLffXMLDOMDocument representation of HTTP response entity.

Parameters

url in type=string

URL of GET request to make.

xmlRequest in type=string

XML entity body to be include in the request.

Keywords

errorReporter in optional type=string

name of IDL procedure to call if an HTTP error occurs.

top source SpdfRest::handleHttpErrorprivate

result = SpdfRest::handleHttpError(request [, errorReporter=string])

Function to handle HTTP request errors. If an errorReporter has been provided, it is called.

Return value

a value of 1 if corrective action has occurred and a value of 0 if not. The corrective action for a 429/503 is waiting the specified time. The corrective action for a 408 is to wait 30 seconds.

Parameters

request in type=IDLnetURL

HTTP request that caused the error.

Keywords

errorReporter in optional type=string

name of IDL procedure to call if an HTTP error occurs.

top source SpdfRest::getRequestUrlprivate

result = SpdfRest::getRequestUrl(url, username, password)

Create an IDLnetUrl object from the given URL with any supplied authentication values set.

Return value

reference to a IDLnetUrl with any supplied authentication values set.

Parameters

url in type=string

URL.

username in type=string

username.

password in type=string

password.

top source SpdfRest__define

SpdfRest__define

Defines the SpdfRest class.

File attributes

Modification date: Thu Mar 20 11:12:32 2025
Lines: 314


SSC Feedback.