API reference
Summarize
Summary of API reference
The ServiceNow AI Platform offers a comprehensive set of APIs that enable customers to customize functionality, enhance features, and build new experiences across client, mobile, UI Builder, server, and REST contexts. These APIs provide flexible integration points for both client-side and server-side development within ServiceNow.
Show less
Client APIs
Client-side JavaScript APIs control how the ServiceNow AI Platform behaves and displays in web browsers. They are typically used in client scripts and UI policy scripts. Key functionalities include:
- GlideAjax API: Calls server-side code from client scripts.
- GlideForm API: Enables form customization and interaction.
Client Mobile APIs
Cabrillo JS provides client-side JavaScript APIs tailored for native mobile apps on the ServiceNow AI Platform. It allows developers to access native device capabilities, mobile UI elements, and platform-specific mobile functionalities to build custom mobile experiences.
UI Builder APIs
UI Builder APIs support client scripting within the UI Builder environment, enabling scripts to respond to page events such as user interactions (e.g., button clicks) and lifecycle events (e.g., data broker executions).
Server APIs
Server-side JavaScript APIs allow modification and creation of applications through business rules, script includes, and other server scripts. There are scoped APIs for scoped applications (typical for new apps) and global APIs for legacy, global-scope applications. Common uses include:
- GlideRecord and GlideQuery: Perform CRUD operations on records.
- GlideSystem: Access instance and user session info, and log messages.
- FlowAPI: Trigger flows, subflows, and actions programmatically.
REST APIs
REST APIs provide access to platform data and functionality over HTTP. Customers can explore available APIs via the REST API Explorer or create custom REST APIs using the Scripted REST API feature. Authentication supports Basic Auth and OAuth 2.0. Typical REST API use cases include:
- Attachment API: Upload and query file attachments.
- Email API: Send and receive emails.
- Table API: Create, read, update, and delete table records.
Use ServiceNow APIs to change functionalities 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.
UI Builder
- User interaction events/actions, such as a button click.
- Lifecycle events, such as a data broker execution started.
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.