Find your people. Pick a challenge. Ship something real. The CreatorCon Hackathon is coming to the Community Pavilion for one epic night. Every skill level, every role welcome. Join us on May 5th and learn more here.

REST API Call to ServiceNow - cmdb_ci_win_server Table To get Windows Server Details

jitendrapandey
Kilo Contributor

Hello ServiceNow Users and Experts,

 

I am trying to make a REST API Call from Postman on Windows Machine, using Windows Integrated Authentication, to ServiceNow - cmdb_ci_win_server table to get the details of a server. The name or hostname of the server will be passed as a parameter to API call - Get method.

 

Can anyone please let me know:

1. What kind of access I need, I do not see anything related to API on my ServiceNow dashboard at my organization. It also looks like API workspace/playground has not been enabled.

 

2. How does the REST API call would look like, if anyone can provide an example.

 

Any information on this would be highly appreciated!!

 

Best regards,

JP!

2 REPLIES 2

Naveen20
ServiceNow Employee

 

To make REST API calls

 

Use Table API endpoint for querying cmdb_ci_win_server by name looks like this:

GET https://<your-instance>.service-now.com/api/now/table/cmdb_ci_win_server?sysparm_query=name=<SERVER_NAME>&sysparm_limit=1

In Postman, set it up like this:

Method: GET

URL:

https://your-instance.service-now.com/api/now/table/cmdb_ci_win_server

Query Parameters:

Key Value
sysparm_query name=YOUR_SERVER_NAME
sysparm_display_value true
sysparm_limit 1
sysparm_fields name,ip_address,os,os_version,ram,cpu_count,serial_number,sys_class_name,operational_status

The sysparm_fields parameter is optional but recommended — it limits the response to only the fields you care about, which speeds things up and makes the response easier to read.

Headers:

Key Value
Accept application/json
Content-Type application/json

Authentication in Postman:

For Windows Integrated Auth (NTLM), go to the Authorization tab in Postman, select NTLM Auth, and enter your domain credentials (domain\username and password). However, note that NTLM auth against ServiceNow only works if your org has configured it on the ServiceNow side — many orgs use SAML/SSO for browser login but require basic auth or OAuth for API calls.

If NTLM doesn't work, try Basic Auth with your ServiceNow username and password as a test.

Example Response:

{
  "result": [
    {
      "name": "YOUR_SERVER_NAME",
      "ip_address": "10.0.1.50",
      "os": "Windows Server 2019",
      "os_version": "10.0.17763",
      "ram": "16384",
      "cpu_count": "4",
      "serial_number": "VMware-XX-XX",
      "sys_class_name": "cmdb_ci_win_server",
      "operational_status": "Operational"
    }
  ]
}

If you want to search by hostname instead of the exact name field, swap the query to host_name=YOUR_HOSTNAME. And if you need a contains-style match rather than exact, use nameLIKEpartial_name in sysparm_query.

Naveen20
ServiceNow Employee

 

 

First, your user account needs the appropriate roles. For read access to the CMDB, you'd generally need itil or cmdb_read at minimum. Some orgs also require the rest_api_explorer role to use the built-in API explorer, which might explain why you don't see it on your dashboard.

Beyond roles, your organization's ServiceNow admin may have restricted API access in a few ways: REST API access can be controlled via ACLs on table endpoints, some orgs disable basic auth or require OAuth/token-based auth for API calls, and IP-based restrictions or API rate limits might be configured.

Since you mentioned Windows Integrated Authentication (NTLM/Kerberos), your org might not have basic auth enabled for REST endpoints at all. You'll want to check with your ServiceNow admin whether REST API access is enabled for your account, whether basic auth is permitted or if OAuth2 is required, and whether there are any IP whitelisting requirements.

If the REST API Explorer isn't visible, ask your admin to grant you the rest_api_explorer role — it's a great way to test calls directly in the browser before moving to Postman.

The first step is really confirming with your admin what auth method is supported for API access — that'll determine everything else.