| Qore ServiceNowRestClient Module Reference 1.2

Loading...
Searching...
No Matches
ServiceNowRestClient Module

# ServiceNowRestClient Introduction

The ServiceNowRestClient module provides an API for calling ServiceNow REST services.

To use this module, use `"%requires ServiceNowRestClient"` in your code.

All the public symbols in the module are defined in the ServiceNowRestClient namespace.

The main classes are:

- ServiceNowRestClient: this class provides the REST client API for communuication with the ServiceNow REST API; it also automates authentication and authorization to the target
- ServiceNowRestConnection: provides a REST connection object to a ServiceNow server (based on the ConnectionProvider module)

Example:
  #!/usr/bin/env qore
  %new-style
  %strict-args
  %require-types
  %enable-all-warnings
  %requires ServiceNowRestClient
  hash<auto> opts = {
  "url": "https://dev493922.service-now.com/",
  "username": "admin",
  "password": "mypassword",
  };
  ServiceNowRestClient rest(opts);
  hash<auto> ans = rest.get("...");
  printf("%N\n", ans.body);

# Release Notes

## ServiceNowRestClient v1.2

- use RestClient functionality for OAuth2 authorization (issue 4766)

## ServiceNowRestClient v1.1.2

- fixed to create URI request paths properly; restored functionality with recent versions of ServiceNow (issue 4758)

## ServiceNowRestClient v1.1.1

- support full ping operations, also with polling, using an authenticated request (issue 4677)

## ServiceNowRestClient v1.1

- updated to no longer require OAuth2 login params (issue 4295)

## ServiceNowRestClient v1.0

- the initial version of the ServiceNowRestClient module