![]() |
Qore ServiceNowRestClient Module Reference 1.2
|
this class provides the REST client API for communication with ServiceNow servers More...
Public Member Functions | |
| constructor (hash< auto > opts, *softbool do_not_connect) | |
| creates the object with the given options | |
| string | getApi () |
| returns the ServiceNow REST API version currently in use | |
Static Public Member Functions | |
| static hash< auto > | getOptions (hash< auto > opts) |
| returns options for ServiceNowRestClient::ServiceNowRestClient::constructor() | |
Public Attributes | |
| const | DefaultApiKeyHeader = "x-sn-apikey" |
| Default API key header. | |
| const | DefaultApiVersion = "now" |
| Default API version. | |
| const | OAuth2AuthUriPathSuffix = "/oauth_auth.do" |
| OAuth2 auth URL. | |
| const | OAuth2DefaultGrantType = "none" |
| OAuth2 default grant type. | |
| const | OAuth2TokenUriPathSuffix = "/oauth_token.do" |
| OAuth2 token URI path suffix. | |
| const | RequestUriPathPrefix = "/api/" |
| Request URI path prefix. | |
this class provides the REST client API for communication with ServiceNow servers
This class requires the following options for ServiceNow authentication and authorization to the target server:
username: the ServiceNow usernamepassword: the ServiceNow passwordTo use an OAuth2 login, include the following options:
oauth2_client_id: the OAuth2 client IDoauth2_client_secret: the OAuth2 client secret | ServiceNowRestClient::ServiceNowRestClient::constructor | ( | hash< auto > | opts, |
| *softbool | do_not_connect ) |
creates the object with the given options
| opts | valid options are:
|
| do_not_connect | if False (the default), then a connection will be immediately established to the remote server |
| RESTCLIENT-ERROR | invalid option passed to constructor, unsupported data serialization, etc |
| ServiceNowRESTCLIENT-ERROR | missing or invalid required option for REST authentication or communication |
| string ServiceNowRestClient::ServiceNowRestClient::getApi | ( | ) |
returns the ServiceNow REST API version currently in use
| const ServiceNowRestClient::ServiceNowRestClient::OAuth2DefaultGrantType = "none" |
OAuth2 default grant type.
Not using "authorization_code" for now as getting an OAuth2 client published requires an expensive partner program