The power of ServiceNow CMDB API: Integrating with external applications

The power of ServiceNow CMDB API: Integrating with external applications

Table of Contents

ServiceNow’s Configuration Management Database (CMDB) works as a single system of record for IT infrastructure, services, and assets in an organization. To put it simply, it consolidates information about IT assets and their relationship. As a result, the unified view of the IT environment of the organization 

  • Simplifies the management and decision-making of IT infrastructures
  • Improves IT service management among various other benefits. 

However, to fully leverage the benefits of the CMDB, organizations must be able to access and use CMDB data in external applications. And this is where ServiceNow CMDB API comes in. It allows the CMDB to integrate with a wide range of external applications and systems, enabling real-time data synchronization. 

In this article, we will explore how to access and use CMDB data in external applications using ServiceNow CMDB API. In relation to this, we’ll also explore how Virima’s IT discovery and service mapping integration with ServiceNow CMDB can help you deliver better IT services. 

ServiceNow CMDB API Set Up

The first step towards setting up the ServiceNow CMDB API is to enable the REST API. Then create an OAuth application to obtain an access token.

The token is used to authenticate the CMDB data access by the external application. Once the external application gets authenticated, you need to test the API. The purpose is to see if the API can access the CMDB data for the external application. 

For that, you can make REST API calls, use HTTPS methods, or the ServiceNow CMDB API query language.

Accessing CMDB Data Using ServiceNow API CMDB

ServiceNow API CMDB is a bunch of REST APIs that’ll help you access, retrieve, create, update, and delete data in ServiceNow CMDB. And subject to the control and permissions you’ve given during configuring the ServiceNow CMDB API, you can access any data. 

Understanding the CMDB API Structure: Endpoints and CMDB Table

The CMDB API is organized into several endpoints, each of which represents a different CMDB table. Here an endpoint is a URL that is used to access a specific resource in the CMDB. For example, if you want to get information about all computers that are in the CMDB, the following endpoint (URL) is used: /now/cmdb/instance/cmdb_ci_computer

The endpoint is made up of the following parts:

  • The protocol: In this case, HTTP.
  • The hostname: In this case, now.
  • The path: In this case, /cmdb/instance/
  • The specific endpoint is cmdb_ci_computer

To put it simply, the endpoint is used to identify the resource that you want to access. The resource in this case is all computers that are in the CMDB. 

On the other hand, a CMDB table is a collection of data about IT assets, such as servers, computers, and network devices (in the above case, computers). The endpoints are named after the corresponding CMDB tables. In the above case cmdb_ci_computer for Computer table. 

So you can access the ServiceNow CMDB data only through those endpoints using the REST API you’ve set up.  

Data Extraction and Querying Using ServiceNow CMDB API

The first step of extracting data from CMDB through the API is to choose the appropriate endpoint. For example, if you want to access Network Adapter data then choose cmdb_ci_network_adapter to access the Network Adapter table. 

How to Extract Data From CMDB Using REST API

Sending a GET Request:

Say you want to extract all computers from the ServiceNow CMDB to your external application, then you can use the following URL: 


This would return all computers in the CMDB, up to a maximum of 1000 records by default. In the above URL, the endpoint is cmdb_ci_computer

Querying Through ServiceNow API CMDB: Rest API

Querying also starts with specifying the endpoint. Once you do that, you need to specify the parameters for querying. 

Here are some most common querying parameters: 

  • sysparm_query: It specifies the conditions for the query. For example, to extract all computers with a specific operating system (Say, Windows), you can use the following query: sysparm_query=operating_system=Windows.
  • sysparm_limit: This parameter specifies the maximum number of records to return. By default, ServiceNow returns a maximum of 1000 records. You can use sysparm_limit to increase or decrease this limit.
  • sysparm_offset: It indicates the starting point for the query. By default, ServiceNowstarts at the beginning of the result set. 

Once you have specified the parameters, you can send the request to the appropriate endpoint. Here’s an example of how to extract all computers from the CMDB using the cmdb_ci_computer endpoint up to 1000.

GET https://<your-instance-name>

The response will be in JSON format and will contain the requested data.

Data Integration With Other External Applications

ServiceNow CMDB API makes it easy to integrate your ServiceNow CMDB with various external IT service delivery tools that suit your organizational needs. 

Some of the common applications that can be integrated with ServiceNow CMDB through ServiceNow CMDB API include 

  • IT Operations Management (ITOM) Platforms 
  • Security Operations applications such as Vulnerability Response and Threat Intelligence 
  • Human Resources applications such as Employee Service Center and HR Case Management. 

Integrating External ITSM Platform: Virima

You may have already invested in ServiceNow CMDB, one of the industry’s best but you might choose a ServiceNow competitor for IT Service Management needs, such as the Virima ITSM platform. The reason may be a lower upfront cost, less expensive plugins, and solutions, simple-to-use functionalities, or all of these. 

Because bigger doesn’t mean better for everyone, especially those looking to automate only part and not all of their IT services without making huge investments. 

Read: Why a Global Entertainment Giant Chose Virama’s Platform over ServiceNow?

Integrating External Discovery Tool: Virima

With the help of ServiceNow API CMDB, you can easily integrate Virima Discovery with your ServiceNow CMDB instead of ServiceNow Discovery options. Why? Virima’s Discovery solution automatically keeps the CMDB up-to-date and can present the most accurate information about your IT assets possible. And that too through a variety of enhanced dynamic visualization options. Best of all, you get this at a better cost than ServiceNow Discovery with Service Mapping capabilities included!

Best practices to follow for successful CMDB data integration

Define clear integration requirements: Organizations should define clear integration requirements before starting the integration process. This includes defining the scope of the integration, the data to be exchanged, and the integration architecture.

Use standard data formats: When exchanging data between ServiceNow CMDB and external applications, it is important to use standard data formats such as JSON or XML. This ensures that the data can be easily understood and processed by both systems.

Implement data validation: Implement data validation to ensure that the data being exchanged is accurate and consistent. This includes validating data formats, data types, and data values.

Implement error handling: Organizations should implement error handling mechanisms to handle errors that may occur during the integration process. This includes logging errors, notifying users, and implementing retry mechanisms.

Test thoroughly: Organizations should thoroughly test the integration before deploying it to production. This includes testing data exchange, error handling, and performance.

Using ServiceNow CMDB API to Improve IT Service Delivery

ServiceNow CMDB API helps in real-time data synchronization and exchange between ServiceNow® and other systems. The API(s) allow external applications to interact with ServiceNow CMDB, query data, and perform updates in real time.

As a result, organizations can enhance the value of the service chain by integrating ServiceNow CMDB with other IT service delivery tools and platforms (as mentioned in earlier points). 

But the success of this integration would depend on how up-to-date and accurate the Configuration Item (CI) information is in the CMDB. Because it paves the way for effective IT service management, better risk mitigation, informed decision-making, ensuring compliance, and also better collaboration. To put it simply, improved IT service delivery. 

And this demands a must-have integration – Discovery and Service Mapping tools with ServiceNow CMDB. It automates tasks such as updating CI data, creating and deleting CIs, and retrieving CI data. So the CMDB always remains up-to-date and accurate. 

Schedule a demo today to learn more about how Virima’s Discovery integration with ServiceNow CMDB can help with enhanced IT service delivery. 

Similar Posts