117 const OAuth2DefaultGrantType =
"authorization_code";
120 const OAuth2AuthUriPathSuffix =
"/oauth_auth.do";
123 const OAuth2TokenUriPathSuffix =
"/oauth_token.do";
126 const DefaultApiVersion =
"now";
129 const RequestUriPathPrefix =
"/api/";
205 hash<auto>
sendAndDecodeResponse(*data body,
string m,
string path, hash<auto> hdr, *reference<hash<auto>> info, *softbool decode_errors);
233 "cls": Class::forName(
"ServiceNowRestConnection"),
235 "api": <ConnectionOptionInfo>{
237 "desc":
"the API version for ServiceNow; if not set the latest version is used",
240 "client_id": RestConnection::ConnectionScheme.options.oauth2_client_id + <ConnectionOptionInfo>{
241 "desc":
"the ServiceNow OAuth2 client ID",
243 "client_secret": RestConnection::ConnectionScheme.options.oauth2_client_secret + <ConnectionOptionInfo>{
244 "desc":
"the ServiceNow OAuth2 client secret",
247 "oauth2_auth_url": RestConnection::ConnectionScheme.options.oauth2_auth_url + <ConnectionOptionInfo>{
250 "oauth2_grant_type": RestConnection::ConnectionScheme.options.oauth2_grant_type + <ConnectionOptionInfo>{
253 "oauth2_token_url": RestConnection::ConnectionScheme.options.oauth2_token_url + <ConnectionOptionInfo>{
256 "password": RestConnection::ConnectionScheme.options.password + <ConnectionOptionInfo>{
257 "desc":
"the ServiceNow password",
260 "ping_headers": RestConnection::ConnectionScheme.options.
"ping_headers" + <ConnectionOptionInfo>{
263 "ping_method": RestConnection::ConnectionScheme.options.
"ping_method" + <ConnectionOptionInfo>{
266 "ping_path": RestConnection::ConnectionScheme.options.
"ping_path" + <ConnectionOptionInfo>{
269 "username": RestConnection::ConnectionScheme.options.username + <ConnectionOptionInfo>{
270 "desc":
"the ServiceNow username",
273 "required_options":
"username,password|token|client_id,client_secret",
285 "Accept": MimeTypeJson,
294 "oauth2_auto_refresh":
"oauth2_auto_refresh",
295 "oauth2_auth_args":
"oauth2_auth_args",
296 "oauth2_auth_url":
"oauth2_auth_url",
297 "client_id":
"oauth2_client_id",
298 "client_secret":
"oauth2_client_secret",
299 "oauth2_redirect_url":
"oauth2_redirect_url",
300 "oauth2_refresh_token":
"oauth2_refresh_token",
301 "oauth2_scopes":
"oauth2_scopes",
302 "oauth2_token_url":
"oauth2_token_url",
303 "password":
"password",
304 "username":
"username",
324 constructor(
string name,
string description,
string url, hash<auto> attributes = {}, hash<auto> options = {})
const OAuth2DefaultGrantType
OAuth2 default grant type.
Definition: ServiceNowRestClient.qm.dox.h:117
const DefaultApiVersion
Default API version.
Definition: ServiceNowRestClient.qm.dox.h:126
constructor(hash< auto > opts, *softbool do_not_connect)
creates the object with the given options
static hash< auto > getOptions(hash< auto > opts)
returns options for ServiceNowRestClient::ServiceNowRestClient::constructor()
string getApi()
returns the ServiceNow REST API version currently in use
const OAuth2TokenUriPathSuffix
OAuth2 token URI path suffix.
Definition: ServiceNowRestClient.qm.dox.h:123
const OAuth2AuthUriPathSuffix
OAuth2 auth URL.
Definition: ServiceNowRestClient.qm.dox.h:120
hash< auto > sendAndDecodeResponse(*data body, string m, string path, hash< auto > hdr, *reference< hash< auto > > info, *softbool decode_errors)
sends the outgoing HTTP message and recodes the response to data
static string getString(hash< auto > opts, string key)
gets a string option
static raiseError(string fmt)
throws an exception due to an error
Class for ServiceNow REST connections; returns ServiceNowRestClient objects.
Definition: ServiceNowRestClient.qm.dox.h:228
const DefaultServiceNowPingMethod
Default ServiceNow ping method.
Definition: ServiceNowRestClient.qm.dox.h:277
Qore::AbstractPollOperation startPollConnect()
Called to start a non-blocking polling ping operation on the ServiceNow REST server.
const DefaultServiceNowPingPath
Default ServiceNow ping path (from the API root)
Definition: ServiceNowRestClient.qm.dox.h:280
string getType()
returns "snrest"
const OAuth2Options
Maps ServiceNow REST options to standard options.
Definition: ServiceNowRestClient.qm.dox.h:293
constructor(string name, string description, string url, hash< auto > attributes={}, hash< auto > options={})
creates the ServiceNowRestConnection object
hash< auto > getOAuth2Options()
Returns OAuth2 options in a standard format.
checkAuthCodeFeature()
Sets the auth code feature if supported.
const DefaultServiceNowPingHeaders
Default ServiceNow ping headers.
Definition: ServiceNowRestClient.qm.dox.h:284
string getOAuth2OptionName(string opt)
Returns the OAuth2 option name for this connection.
DataProvider::AbstractDataProvider getDataProvider()
returns a data provider object for this connection
const OAuth2AuthRequestOptions
options required to support the OAuth2 authorization code grant flow
Definition: ServiceNowRestClient.qm.dox.h:289
setChildCapabilities()
Sets child data provider capabilities.
const OAuth2StandardToServiceNowOptionMap
Maps standard option names to ServiceNow REST option names.
Definition: ServiceNowRestClient.qm.dox.h:308
ServiceNowRestClient getImpl(bool connect=True, *hash< auto > rtopts)
returns a ServiceNowRestClient object
bool hasDataProvider()
returns True as this connection returns a data provider with the getDataProvider() method
const ConnectionScheme
Connection entry info.
Definition: ServiceNowRestClient.qm.dox.h:232
const OAuth2DifferentOptionMap
Different OAuth2 option map; standard name => extern name.
Definition: ServiceNowRestClient.qm.dox.h:311
hash< ConnectionSchemeInfo > getConnectionSchemeInfoImpl()
Returns the ConnectionSchemeInfo hash for this object.
the ServiceNowRestClient namespace contains all the objects in the ServiceNowRestClient module
Definition: ServiceNowRestClient.qm.dox.h:102