> For the complete documentation index, see [llms.txt](https://docs.nexthink.com/platform/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.nexthink.com/platform/configuring_nexthink/bringing-data-into-your-nexthink-instance/integrating-nexthink-with-third-party-tools/outbound-connectors/data-exporters/http-api-exporter/generic-api-call-in-servicenow-installation-guide.md).

# Generic API call in ServiceNow installation guide

{% hint style="warning" %}
You must be a ServiceNow-certified professional to execute this installation process.

If you are new to ServiceNow, refer to the [Exporter to ServiceNow](/platform/configuring_nexthink/bringing-data-into-your-nexthink-instance/integrating-nexthink-with-third-party-tools/outbound-connectors/data-exporters/http-api-exporter/exporter-to-servicenow-cmdb.md) documentation.
{% endhint %}

This guide explains how to install and configure the Generic API call in the ServiceNow integration from the [update set package](#genericapicallinservicenowinstallationguide-updatesetpackageupdate_set_package) (XML file). This document also includes basic maintenance guidelines.

## Perks of installing the Generic API Call in ServiceNow <a href="#genericapicallinservicenowinstallationguide-perksofinstallingthegenericapicallinservicenow" id="genericapicallinservicenowinstallationguide-perksofinstallingthegenericapicallinservicenow"></a>

The Generic API call in ServiceNow offers your organization a default set of flows and predefined mappings to integrate end-user IT data from the Nexthink platform into ServiceNow. With the Generic API call you can:

* Select a set of information about different Configuration Items (CI) such as devices, users, software packages and others, to populate in ServiceNow.
* Choose to import the relationships between these CIs into ServiceNow.
* Configure different CMDB ServiceNow tables and fields without using write-protected flows.
* Leverage the import of specific fields associated with a given CI type.

[Download these ServiceNow components](https://download.nexthink.com/doc/x_nexsa_g_api_call_i1.0.0.zip) from the update set package.

{% hint style="info" %}
For the installation guidelines, jump directly to the [Initial Configuration](#genericapicallinservicenowinstallationguide-initialconfigurationinitial_configuration) section.
{% endhint %}

## ServiceNow components included in the update set package <a href="#genericapicallinservicenowinstallationguide-servicenowcomponentsincludedintheupdatesetpackage" id="genericapicallinservicenowinstallationguide-servicenowcomponentsincludedintheupdatesetpackage"></a>

This section explores the main ServiceNow components included in the update set package.

### Custom table inventory <a href="#genericapicallinservicenowinstallationguide-customtableinventorycustom_table_inventory" id="genericapicallinservicenowinstallationguide-customtableinventorycustom_table_inventory"></a>

The application creates 5 custom tables that it uses as staging tables to manage import sets. The Nexthink Data Export feature generates a CSV file to create all the import set tables listed below.

Learn about custom table allocations with the following queries:

#### **Label: Import Set Software**

Name: `x_nexsa_g_api_call_import_set_software`

NQL:

{% code lineNumbers="true" %}

```
package.installed_packages
| summarize nb_installations = count(), unique_packages = package.count() by package.name, package.version, package.type, package.publisher, package.platform, package.parent_name
| list package.name, package.version , package.publisher
```

{% endcode %}

#### **Label: Import Set User**

Name: `x_nexsa_g_api_call_import_set_user`

NQL:

{% code lineNumbers="true" %}

```
users
| where type != system and name !in ["*Local*"]
```

{% endcode %}

#### **Label: Import Set Workstation**

Name: `x_nexsa_g_api_call_import_set_workstation`

NQL:

{% code lineNumbers="true" %}

```
devices
| where hardware.machine_serial_number != "" and (hardware.type == laptop or hardware.type == desktop)
| include cpus
| compute num_of_cores = number_of_cores.sum() , number_of_cpus = count(), sum_frequency = frequency.sum()
| include disks
| compute disk_capacity = capacity.sum()
| list group_name, entity, hardware.manufacturer, hardware.model , operating_system.architecture , hardware.machine_serial_number , name, hardware.memory, num_of_cores , number_of_cpus , sum_frequency ,disk_capacity, first_seen, last_seen
```

{% endcode %}

#### **Label: Import Set Workstation - Software**

Name: `x_nexsa_g_api_call_import_set_software_workstation`

NQL:

{% code lineNumbers="true" %}

```
package.installed_packages
| summarize c1=count() by package.name, package.version , device.name
| list package.name, package.version , device.name
```

{% endcode %}

#### **Label: Import Set User - Workstation**

Name: `x_nexsa_g_api_call_import_set_user_workstation`

NQL:

{% code lineNumbers="true" %}

```
session.logins during past 7d
| where hardware.type == laptop or hardware.type == desktop
| summarize c1 = count() by device.name , user.name , user.ad.full_name
| list device.name , user.name , user.ad.full_name
```

{% endcode %}

### Transform maps <a href="#genericapicallinservicenowinstallationguide-transformmaps" id="genericapicallinservicenowinstallationguide-transformmaps"></a>

The Generic API call in the ServiceNow update set includes 5 data sources with transform maps to insert the CI types and relationships. ServiceNow lists the 5 data sources as shown in the following image:

<figure><img src="https://268444917-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FxJSUDk9NTtCHYPG5EWs3%2Fuploads%2Fgit-blob-5ecb8b27342295018a61a868e744a197d1bd8717%2Fimage-20230206-112508.png?alt=media" alt="Data sources" width="680"><figcaption></figcaption></figure>

Below is an example of a transform map from the 5 data sources provided:

<figure><img src="https://268444917-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FxJSUDk9NTtCHYPG5EWs3%2Fuploads%2Fgit-blob-dd79b1b8a4f02e32673083c6a8e02c12de93b8b2%2Fimage-20230206-112640.png?alt=media" alt="Transform map"><figcaption></figcaption></figure>

Default transform maps are not write-protected. You can modify them if you need to insert more fields or transformations in the CMDB tables.

Refer to the [Transform maps](#genericapicallinservicenowinstallationguide-transformmaps) ServiceNow documentation for more information.

## Initial configuration <a href="#genericapicallinservicenowinstallationguide-initialconfigurationinitial_configuration" id="genericapicallinservicenowinstallationguide-initialconfigurationinitial_configuration"></a>

### Installing the application <a href="#genericapicallinservicenowinstallationguide-installingtheapplication" id="genericapicallinservicenowinstallationguide-installingtheapplication"></a>

The application package is only available in the update set format. Follow the installation procedure:

1. Go to the System Update Sets > Retrieved Update Sets module.
2. Click on the Import Update Set from XML related link.
3. Upload the application update set [XML file](#genericapicallinservicenowinstallationguide-updatesetpackageupdate_set_package).
4. On the update set table, click on the Generic API call in ServiceNow update set.
5. Click on the Preview update set button and wait for the preview process to finish.
6. Click on the Commit update set button and wait for the process to finish.
7. The *update set status* should be updated as committed.

### Changing timeout settings in a ServiceNow instance <a href="#genericapicallinservicenowinstallationguide-changingtimeoutsettingsinaservicenowinstance" id="genericapicallinservicenowinstallationguide-changingtimeoutsettingsinaservicenowinstance"></a>

These settings are necessary to avoid timeout errors when sending a large volume of records in a request.

1. Go to the System definition > Transaction Quota Rules module.
2. Search REST Import Set API request timeout and REST and JSON Catch All.
3. Change the value for Maximum Duration (seconds) to a value according to the recommended times in the Prerequisites section from the [Exporter to ServiceNow](/platform/configuring_nexthink/bringing-data-into-your-nexthink-instance/integrating-nexthink-with-third-party-tools/outbound-connectors/data-exporters/http-api-exporter/exporter-to-servicenow-cmdb.md) documentation.

### Changing application access to the table CI/User Relationship Type <a href="#genericapicallinservicenowinstallationguide-changingapplicationaccesstothetableci-userrelationshipty" id="genericapicallinservicenowinstallationguide-changingapplicationaccesstothetableci-userrelationshipty"></a>

This setting allows the application to write into the CI/User table and categorize relationships between the user and the workstation.

1. Go to the **System definition > Tables** module.
2. Search by name with the value `cmdb_rel_user_type`.<br>

   <figure><img src="https://268444917-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FxJSUDk9NTtCHYPG5EWs3%2Fuploads%2Fgit-blob-0dfedd6bbf4144fa6b31da632cc851958cff1f3c%2Fimage-20230206-120505.png?alt=media" alt="Tables"><figcaption></figcaption></figure>
3. Go to the **Application Access** tab and enable **Can read**, **Can create**, and **Can update** for all the scopes.<br>

   <figure><img src="https://268444917-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FxJSUDk9NTtCHYPG5EWs3%2Fuploads%2Fgit-blob-206e35e841c824d41c442f76650819a25aace65b%2Fimage-20230206-120659.png?alt=media" alt="User relationship type" width="476"><figcaption></figcaption></figure>

## Update set package <a href="#genericapicallinservicenowinstallationguide-updatesetpackageupdate_set_package" id="genericapicallinservicenowinstallationguide-updatesetpackageupdate_set_package"></a>

[Download the file](https://download.nexthink.com/doc/x_nexsa_g_api_call_i1.0.0.zip).


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.nexthink.com/platform/configuring_nexthink/bringing-data-into-your-nexthink-instance/integrating-nexthink-with-third-party-tools/outbound-connectors/data-exporters/http-api-exporter/generic-api-call-in-servicenow-installation-guide.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
