---
title: "ServiceNow REST API Data Source"
canonical: "https://help.cartinuum.com/space/GC1/4462149645/ServiceNow%20REST%20API%20Data%20Source"
format: markdown
---
## Overview

The ServiceNow REST API Data Source lets Connect for ArcGIS retrieve ServiceNow records for features in an ArcGIS web map. It can be used to show related ServiceNow information, such as incidents, requests, assets, properties or customer records, without copying ServiceNow data into a geodatabase or feature service.

When a user selects features in the map, Connect for ArcGIS calls a configured ServiceNow REST endpoint and displays the matching records returned by ServiceNow. For more background, see [Integrating ArcGIS with ServiceNow](https://cartinuum.com/resources/blog/integrating-arcgis-with-servicenow).

## Before You Start

You will need:

- The URL of your ServiceNow instance.
- A ServiceNow account or OAuth client with permission to read the required tables.
- A ServiceNow REST API endpoint to query, usually a Table API endpoint such as `/now/table/incident`.
- A shared identifier between your ArcGIS feature layer and ServiceNow, such as an asset ID, property ID, incident number or custom GIS reference field.

## Data Source Settings

Configure these settings when adding the ServiceNow data source.

### Base URL

The base URL for your ServiceNow API.

Example:

```
https://your-instance.service-now.com/api
```

### Test Endpoint Path

A ServiceNow endpoint used to check that the connection and authentication are working. This path is appended to the Base URL.

Default:

```
/now/table/sys_user?sysparm_fields=name&sysparm_limit=1
```

### Authentication Method

Choose how Connect for ArcGIS should authenticate with ServiceNow.

- `None` - use when the endpoint does not require authentication.
- `Basic` - authenticate with a ServiceNow username and password.
- `OAuth2` - authenticate using the OAuth 2.0 client credentials flow.

For Basic authentication, enter the username and password.

For OAuth 2.0, enter the client ID, client secret, token URL and optional scope.

### HTTP Headers

Optional headers to send with every request. Enter one header per line.

Example:

```
Accept: application/json
```

### Maximum Concurrency

The maximum number of requests Connect for ArcGIS can make to ServiceNow at the same time. Lower values reduce load on ServiceNow when many map features are selected.

### Timeout

The maximum time, in milliseconds, to wait for ServiceNow to respond before the request fails.

## Layer Link Settings

Configure these settings when linking the ServiceNow data source to a map layer.

### Path

The ServiceNow API path to call. This is appended to the Base URL and can include feature attributes using `{{ATTRIBUTE_NAME}}`.

Example:

```
/now/table/incident
```

### Query Parameters

Query parameters to send to ServiceNow. Enter one parameter per line in `name=value` format. Values can include feature attributes using `{{ATTRIBUTE_NAME}}`.

Example:

```
sysparm_query=u_asset_id={{ASSET_ID}}
sysparm_fields=number,short_description,state,assigned_to,sys_updated_on
sysparm_limit=10
```

### HTTP Headers

Optional headers for this layer link. These are added to the headers configured on the data source. Enter one header per line in `Header-Name: value` format.

### Response JSON Path

The location of the records in the ServiceNow JSON response. ServiceNow Table API responses normally return records in `result`, so the default value is:

```
result
```

Leave this blank only if the records are returned at the root of the JSON response.

### Test Data

Test data is used when validating the layer link. Add values for any feature attributes used in the path, query parameters or headers.

Example:

```
{{ASSET_ID}}=PUMP-001
```

## Example: Show Incidents for a Map Asset

This example retrieves ServiceNow incidents where a custom ServiceNow field `u_asset_id` matches the selected map feature's `ASSET_ID` attribute.

Data source settings:

```
Base URL: https://your-instance.service-now.com/api
Authentication Method: Basic or OAuth2
Test Endpoint Path: /now/table/sys_user?sysparm_fields=name&sysparm_limit=1
```

Layer link settings:

```
Path: /now/table/incident
Response JSON Path: result
```

Query parameters:

```
sysparm_query=u_asset_id={{ASSET_ID}}
sysparm_fields=number,short_description,state,priority,sys_updated_on
sysparm_limit=10
```

Test data:

```
{{ASSET_ID}}=PUMP-001
```

When a user selects an ArcGIS feature, Connect for ArcGIS replaces `{{ASSET_ID}}` with the selected feature's value, calls ServiceNow, and displays the matching incident records.

## Notes

- The data source uses HTTP GET requests and expects JSON responses.
- Feature attributes can be used in the path, query parameters and layer-specific headers.
- Nested ServiceNow response fields are flattened using dot notation.
- Use ServiceNow `sysparm_fields` to return only the fields users need to see.
- Use ServiceNow `sysparm_limit` to control the maximum number of records returned.