ID of the registered OAuth application that was used for authorization.
The user that the application has been authorized to act on behalf of.
Terminates the connection and cleans up utilized resources.
The URL of the ServiceNow instance.
Executes a request to the specified endpoint of the ServiceNow REST API.
For POST
/PATCH
requests, Content-Type
header is set to "application/json" by default and so data
parameter can simply be set to an object.
Note: depending on which endpoint is being requested, you may need to include additional auth scopes when connecting.
A type that describes the requested data. This API includes a number of entity types for use with this function.
The relative REST API endpoint being requested (e.g. /api/now/v2/table/sn_customerservice_case
).
Optional
httpMethod: HttpMethodThe HTTP Method to use when making the request (defaults to GET
).
Optional
data: anyOptionally include data in the request body (for POST
/PATCH
requests).
Optional
suppressResponseBody: booleanBy default, REST API responses typically include relevant body content. Set this parameter to true to suppress the response body if it is not required.
Optional
headers: ApiRequestHeadersOptionally set additional request headers. Important: do not attempt to set the Authorization
header manually as the API will include it automatically (as long as includeAuthorization
is not set to false
).
A response object containing the HTTP response status code and requested data (if relevant).
ApiRequestError if an error occurred when sending the request, or if the REST API responded with an error HTTP response code.
AuthTokenExpiredError if the current access token has expired and cannot be renewed. In this instance, you must re-connect before continuing to use this API.
Generated using TypeDoc
A connection to a ServiceNow instance.