Use application services APIs
Application services provide APIs that let you perform operations such as creating and updating an application service, populating it with CIs from the CMDB, and retrieving details from an existing application service.
Role required: app_service_admin
An application service is a set of interconnected applications and hosts which are configured to offer a service to the organization. Application services can be internal, like an organization email system or customer-facing, like an organization website.Create an application service
Using the createOrUpdateService - POST REST API to create an application service suits your organization if the ServiceNow CMDB already contains the CIs making up the service. Typically, it is the case when you have manually added CIs directly into the CMDB, or used the Discovery application to discover CIs and store information about them in the CMDB. You can also use this API to create an application service containing CIs discovered using non-ServiceNow applications.
By default, when an application service is created, all CI connections are of the Depends on::Used by relationship type. You can modify this default type by changing the value of the sa.it_service.manual_ci_rel_type property.
- The CMDB contains all the CIs comprising the application service.
- You have the sys_id of each CI comprised in the application service you want to create.
- You understand the hierarchy that the CIs form.
The Mapped Application Service [cmdb_ci_service_discovered] table contains every application service including services you create using APIs.
You can also manually create an application service using the user interface as described in Create an application service.
Retrieve content from an application service
Use the getContent - GET REST API to retrieve a list of CIs and the relationships between them, for an application service that was created manually.
Additional APIs
addCI(): Add a CI to a manually created an application service.
For restrictions on the CIs being added and other details about adding a CI to an application service, see Manually add CIs to an application service.
addManualConnection(): Add a manually created connection to an application service.
migrateManualToApplicationService(): Convert a manual service to an application service.
populateApplicationService(): Populate an application service with CIs and relationships from the designated entry point.
removeCI(): Remove a manually created CI from an application service.
removeManualConnection(): Remove a manually created connection and the connected CI from an application service.