ServiceNow APIs

1776

ServiceNow APIs

ServiceNow has categorised API in 6 categories

1. Client: Client-side API for desktop applications

It provides client-side JavaScript APIs allowing all of you to control aspects of how ServiceNow is displayed and functions within the web browser.

Example: getFullName(): g_user.getFullName();

2. Client Mobile:

ServiceNow Classic mobile application API. Not for ServiceNow Agent, Now Mobile, or ServiceNow Onboarding.

ServiceNow has uses Cabrillo JS to build a custom mobile experience inside of ServiceNow’s native mobile apps. Cabrillo JS provides APIs to use native device capabilities, native mobile UI, and other ServiceNow mobile functionalityTesting.

Example: setTitle(): cabrillo.viewLayout.setTitle('My Title');

3. Now Experience UI Framework: Agent Workspace component API

ServiceNow JavaScript framework built on web components standards.

Now Experience UI Framework enables you to build custom web components to create a modern UI for your users.

The UI Framework is currently limited to Workspace.

4. Server Scoped: Scoped application API for server-side

The classes and functions defined under this category only applicable for scoped application. If you are using it for global then it may behaves differently.

Functions and classes are available for server side only.

Example: GlideSystem: addErrorMessage(Object message)
 gs.addErrorMessage("Incorrect Password !! ");

 

5. Server Global: Global application API for server-side

In this global scope APIs are provided to support legacy applications in the global scope.  If you are using it for scoped then it may behaves differently.

Functions and classes are available for server side only.

Example:

GlideSystem

: addErrorMessage(String message)

 gs.addErrorMessage(

"Incorrect Password !! "

);

 

6. REST: Restful APIs for interacting with a ServiceNow instance

ServiceNow provides extensive access to instances through a set of RESTful APIs.

You can discover these APIs from within your instance by using the REST API Explorer. If you don’t find an API that meets your needs you can create custom REST APIs using Scripted REST API.

ServiceNow REST APIs support Basic Authentication and OAuth 2.0 to authenticate requests.

Example:

GET

 /now/table/{tableName}/{sys_id}
Retrieves the record identified by the specified sys_id from the specified table.

 

 

 

 

LEAVE A REPLY

Please enter your comment!
Please enter your name here