API reference
Summarize
Summary of API reference
The ServiceNow AI Platform offers a comprehensive set of APIs to customize functionality and extend features across client, mobile, server, REST, and UI Builder environments. These APIs enable ServiceNow customers to control platform behavior, build native mobile experiences, develop new applications, and integrate external systems securely and efficiently.
Show less
Client APIs
Client-side JavaScript APIs control how the AI Platform functions and displays within web browsers. They are commonly used in client scripts and UI policy scripts to enhance user experience. Key examples include:
- GlideAjax: Calls server-side code from client scripts.
- GlideForm: Customizes forms dynamically.
Additionally, the Client Next Experience APIs enable similar control within the Next Experience UI Framework.
Client Mobile and Mobile SDK
For native mobile applications, the Cabrillo JS API grants access to device capabilities and native UI within ServiceNow AI Platform mobile apps.
The Mobile SDK expands this functionality to standalone Android and iOS apps, allowing you to:
- Access ServiceNow data via public and scripted REST APIs.
- Embed Virtual Agent interfaces.
- Track custom analytics events.
- Attach documents to ServiceNow records.
- Load web pages in native views.
- Implement JSON Web Token authentication flows.
- Send push notifications.
Server APIs
Server-side JavaScript APIs let you build or modify applications by running scripts such as business rules and script includes. These APIs are available in scoped and global contexts, with scoped APIs preferred for new applications. Typical uses include:
- GlideRecord/GlideQuery: Perform CRUD operations on records.
- GlideSystem: Retrieve instance or user session info and log messages.
- FlowAPI: Trigger flows, subflows, and actions programmatically.
REST APIs
REST APIs provide standardized access to create, read, update, and delete data on the platform. Customers can explore existing APIs using the REST API Explorer or build custom scripted REST APIs as needed. Supported authentication methods include Basic Authentication and OAuth 2.0. Common REST APIs include:
- Attachment API: Manage file attachments.
- Email API: Send and receive emails.
- Table API: CRUD operations on tables.
UI Builder APIs
UI Builder APIs facilitate development of client scripts that respond to page events such as user interactions (e.g., button clicks) and lifecycle events (e.g., data broker executions). These APIs enable dynamic and interactive user interface experiences within the ServiceNow AI Platform.
Use ServiceNow APIs to change functionality and add features on the ServiceNow AI Platform.
Client
Use client-side JavaScript APIs to control how the ServiceNow AI Platform functions and displays within the web browser. Client-side APIs provide common functionality that you can add to your instance by calling the APIs from client-side scripts such as client scripts and UI policy scripts.
Client mobile
Cabrillo JS is a client-side JavaScript API for accessing capabilities inside ServiceNow AI Platform native mobile applications. Cabrillo JS provides methods to use native device capabilities, native mobile UI, and other ServiceNow AI Platform mobile functionality.
Mobile SDK
Use the ServiceNow Mobile SDK to leverage the functionality and resources of the ServiceNow AI Platform within your standalone mobile Android and iOS applications.
Using the Mobile SDK, you can perform the following within your applications:
- Access data on your ServiceNow instance through its public REST APIs or custom scripted REST APIs that you develop.
- Embed and enable Virtual Agent within your application interface.
- Gather and track custom analytics events for analysis.
- Attach documents (attachments) to a record within your ServiceNow instance.
- Load web pages hosted on your ServiceNow instance in a native web view or Cabrillo.
- Provide simple authentication flows using JSON Web Tokens for third-party applications to authenticate users.
- Send push notifications.
Server
Use server-side JavaScript APIs to change the functionality of existing applications or to build new applications. Server-side APIs provide common functionality that you can add to your instance by calling the APIs from server-side scripts such as business rules and script includes. Scoped APIs are intended for use with scoped applications, and global APIs are intended for use with applications in the global scope. New applications are typically scoped. Applications in the global scope are typically legacy applications.
- Use the GlideRecord or GlideQuery APIs to perform create, read, update, and delete operations on record data from server-side scripts.
- Use the GlideSystem API to access information about the instance or the current user session and to write informational or error messages.
- Use FlowAPI methods to trigger flows, subflows, and actions from server-side scripts.
REST
Use REST APIs to access and update data on the ServiceNow AI Platform. 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 the Scripted REST API feature. ServiceNow REST APIs support Basic Authentication and OAuth 2.0 to authenticate requests.
- Use the Attachment API to upload and query file attachments.
- Use the Email API to send and receive email messages.
- Use the Table API to create, read, update, and delete records in a table.
UI Builder
- User interaction events/actions, such as a button click.
- Lifecycle events, such as a data broker execution started.