Skip to content
For the complete documentation index, see llms.txt. This page is also available as Markdown.

API Calls

API Calls let you call third-party APIs when needed to trigger actions or retrieve external data. Spark and Workspace can use them, for example, to create an incident in an ITSM tool.

Accessing API Calls

To access the API calls page, navigate to Administration > API Calls from the main menu. The API calls Administration page opens, listing all API calls configured in this Nexthink instance.

Nexthink provides out-of-the-box API calls as system content, with pre-built integrations for tools such as Microsoft Entra ID, Microsoft Intune, Atlassian Jira, Okta and ServiceNow.

You can:

  • Use a system API call as it is or modify it to fit your needs. Configure it, then select the features that can use it in Triggering. To keep the original unchanged, duplicate the system API call and customize the copy.

  • Create a new API call from scratch. Refer to Creating a new API call for more information.

Before you begin

Create credentials for the third-party tool that the API call connects to. Refer to Third-party credentials for more information.

Creating a new API call

Click New API call in the top-right corner of the page. A page opens with three tabs to configure General properties, Request and Output.

Configuring the General tab

Define how the API call is identified, which connector and credentials it uses, and which features can trigger it:

  • Name: Enter a meaningful name for the API call. This name appears on the Administration page.

  • NQL ID: A unique identifier used when referencing the API call in NQL queries is created automatically. You can initially modify the suggested NQL ID, but once you save the API call, you can no longer change the NQL ID.

  • Description: Describe what the API call does, whether it reads or changes data, and what effect it has. The agent needs it to understand which API call to make.

  • Connector (optional): Select the connector, the third-party platform that the API call belongs to, for example, Entra ID. Connectors group the API calls of a platform.

  • Credentials: Select preconfigured credentials from the Third-party credentials page. Refer to the Third-party credentials documentation for more information.

  • URL: The system automatically populates this field when you select credentials.

  • Trigger: Select the features that can use the API call.

Configuring the Request tab

Define the request that Nexthink sends to the third-party tool.

Parameters

Define the values that the calling feature passes to the API call at runtime. Click Add parameter and complete the following fields:

  • Name: Enter a descriptive name for the parameter.

  • ID: A unique identifier used to reference the parameter across the Resource, Payload, and Custom headers sections, using the following format: {{id}} . It is created automatically.

  • Description: Provide a short explanation of the purpose of the parameter.

  • Restriction: Select whether to restrict the value that the agent passes to this parameter. None applies no restriction. User requires the value to be a property of a user. Restrictions currently apply only to Spark.

  • Restriction property: Select the user property that the agent can pass: AD Username, Email address, SID or UPN.

Restrictions currently apply only to Spark. They ensure that Spark can target only the connected user when it makes an API call to a third-party tool.

Parameters are optional. Use them to accept runtime values from the calling feature, such as Spark, and insert those values into the HTTP request resource, payload, or headers.

For example, if the API call creates a support ticket, define a Description parameter. Spark supplies the value at runtime, and the request includes it in the ticket payload. Refer to Configuring ticket escalation with Spark for more information.

HTTP call

Define the HTTP request that Nexthink sends to the third-party API:

  • Request method: Select the HTTP method used, for example, GET, POST, PUT, or PATCH.

  • Resource: Define the endpoint path or action of the third-party REST API. This determines the operation performed.

  • Payload (optional): Specify the data sent with POST, PUT, or PATCH methods.

Custom header

Define any additional HTTP headers that the third-party API requires, such as authentication tokens. Click Add custom header to add a header.

Configuring the Output tab

Click Add output to define a value to extract from the API response.

  • Name: Enter a descriptive label for the output field.

  • Description: Provide a short explanation of the data extracted from the API response.

  • Value (JSONata): Enter the field name returned by the API response. Use JSONata if needed to transform the value. Enclose field names that contain whitespace or reserved characters, such as ., +, -, *, / or {, in backticks (`).

  • Preview: View the result of the JSONata expression applied to the response received from the API. This requires running a test first using the Test results panel.

Outputs are optional. Use them to extract values from the HTTP response, such as the response body or headers, and expose those values to the calling feature, such as Spark.

For example, if the API call creates a support ticket, define an output that returns the ticket ID from the response. If the API response is {"result": {"number": "INC001"}}, enter result.number in Value (JSONata) to return INC001.

Test your API call

After configuring parameters and payload, use the Test results panel on the right side of the page to run the API call with real data, inspect responses, and identify errors. The test panel helps validate the configuration and reduce trial and error.

  1. Enter a value for each parameter.

  2. Click Run test to call the API, validate the credentials, and check connectivity to the endpoint.

  3. Review the response status code, the response time, and the response of the API.

  4. Verify the extracted output fields in the Preview column of the Output tab.

  5. Save the API call. It appears in the table on the API Calls page.

Managing API Calls

View the total number of API calls in the title of the table. Search for the name of the API call to narrow down the results. The table is organized by:

  • Name: The API call name. Select the name to edit the API call.

  • Origin: Indicates where the API call originates from.

    • System: An API call that Nexthink provides out of the box as system content.

    • Custom: An API call created on the API Calls page in the Nexthink web interface.

  • Description: A short description of the API call.

  • Credentials: The credentials used to authenticate the HTTP request.

Action menu

Click the three vertical dots of the relevant API call to open its action menu with the following options:

  • Edit: Modify the configuration of the API call.

  • Manage tags: Create, assign, and edit API call tags. Refer to Tagging remote actions for more information.

  • Share: Grant the Execute permission to other roles, for example, to let only administrators run an API call. Select the roles you want to share the API call with. Refer to Permissions for more information.

  • Duplicate: Create a copy of the API call to use as a starting point. Duplicate a system API call to customize it without changing the original.

  • Delete: Remove the API call from the system.

  • Copy call Id: Copy the unique identifier of the API call.

Permissions

The only permission for API calls is Execute. To use an API call in Workspace, users need the Execute permission for it in at least one of their roles.

Grant the Execute permission in one of the following ways:

  • Share the API call with a role. Refer to Action menu for more information.

  • In the Integrations section of the role permissions, select the API calls that the role can execute, or grant the right to execute all API calls. Refer to Roles for more information.

Last updated

Was this helpful?