$darkmode
Class for ServiceNow REST connections; returns ServiceNowRestClient objects. More...
Public Member Functions | |
| constructor (string name, string description, string url, hash< auto > attributes={}, hash< auto > options={}) | |
| creates the ServiceNowRestConnection object More... | |
| DataProvider::AbstractDataProvider | getDataProvider () |
| returns a data provider object for this connection More... | |
| string | getOAuth2OptionName (string opt) |
| Returns the OAuth2 option name for this connection. More... | |
| hash< auto > | getOAuth2Options () |
| Returns OAuth2 options in a standard format. More... | |
| string | getType () |
returns "snrest" | |
| bool | hasDataProvider () |
| returns True as this connection returns a data provider with the getDataProvider() method More... | |
| Qore::AbstractPollOperation | startPollConnect () |
| Called to start a non-blocking polling ping operation on the ServiceNow REST server. More... | |
Public Attributes | |
| const | ConnectionScheme |
| Connection entry info. | |
| const | DefaultServiceNowPingHeaders |
| Default ServiceNow ping headers. | |
| const | DefaultServiceNowPingMethod = "GET" |
| Default ServiceNow ping method. | |
| const | DefaultServiceNowPingPath = ... |
| Default ServiceNow ping path (from the API root) | |
| const | OAuth2AuthRequestOptions = ... |
| options required to support the OAuth2 authorization code grant flow | |
| const | OAuth2DifferentOptionMap = map {$1.value: $1.key} |
| Different OAuth2 option map; standard name => extern name. | |
| const | OAuth2Options |
| Maps ServiceNow REST options to standard options. | |
| const | OAuth2StandardToServiceNowOptionMap = map {$1.value: $1.key} |
| Maps standard option names to ServiceNow REST option names. | |
Protected Member Functions | |
| checkAuthCodeFeature () | |
| Sets the auth code feature if supported. | |
| hash< ConnectionSchemeInfo > | getConnectionSchemeInfoImpl () |
| Returns the ConnectionSchemeInfo hash for this object. | |
| ServiceNowRestClient | getImpl (bool connect=True, *hash< auto > rtopts) |
| returns a ServiceNowRestClient object More... | |
| setChildCapabilities () | |
| Sets child data provider capabilities. | |
Class for ServiceNow REST connections; returns ServiceNowRestClient objects.
In addition to all options supported by RestClientConnection, this connection class supports the following options:
"api": the API version for ServiceNow"client_id": (optional) the ServiceNow OAuth2 client ID (mapped to the oauth2_client_id option)"client_secret": (optional) the ServiceNow OAuth2 client secret (mapped to the oauth2_client_secret option)| ServiceNowRestClient::ServiceNowRestConnection::constructor | ( | string | name, |
| string | description, | ||
| string | url, | ||
| hash< auto > | attributes = {}, |
||
| hash< auto > | options = {} |
||
| ) |
creates the ServiceNowRestConnection object
| name | the name of the connection |
| description | connection description |
| url | connection URL (potentially with password info) |
| attributes | various attributes. See below |
| options | connection options |
See ConnectionProvider::AbstractConnection::constructor() for attributes and options reference.
| CONNECTION-OPTION-ERROR | missing or invalid connection option |
| DataProvider::AbstractDataProvider ServiceNowRestClient::ServiceNowRestConnection::getDataProvider | ( | ) |
returns a data provider object for this connection
|
protected |
returns a ServiceNowRestClient object
| connect | if True, then the connection is returned already connected |
| rtopts | this connection type does not accept any runtime options, so this parameter is ignored |
Returns the OAuth2 option name for this connection.
| hash<auto> ServiceNowRestClient::ServiceNowRestConnection::getOAuth2Options | ( | ) |
Returns OAuth2 options in a standard format.
| bool ServiceNowRestClient::ServiceNowRestConnection::hasDataProvider | ( | ) |
returns True as this connection returns a data provider with the getDataProvider() method
| Qore::AbstractPollOperation ServiceNowRestClient::ServiceNowRestConnection::startPollConnect | ( | ) |
Called to start a non-blocking polling ping operation on the ServiceNow REST server.