HTTP API Exporter

The HTTP API Exporter improves workplace technology experiences by exporting raw data and insights from Nexthink into third-party tools, such as a Configuration Management Data Base (CMDB) and Operation tools like SIEM, IT Ops, AI Ops, Logging, Monitoring and others.

By integrating Nexthink API data exports with third-party tools, you can combine, aggregate and manipulate data to:

  • Create powerful up-to-date visualizations with the evolution of specific indicators over time.

  • Ensure consistency in the data granularity.

  • Combine data from multiple sources to meet compliance and security standards.

  • Automate systematic updates for configuration items during and after changes.

Overall, the HTTP API Exporter aims to enhance your understanding of service usage to reduce costs within your organization, for example, by saving service-desk time.

Prerequisites

This integration requires:

  • A third-party tool with a public API that allows the system to send multiple records via JSON payload.

  • The authorization mechanism to connect to the third-party tool API must be either BASIC, Bearer Token or (Client Credential) OAuth 2.0.

  • The JSON payload of the public API third-party tool must support one of the following formats:

    • Collection of JSON objects:

      {"property_a":"value_a", "property_b":"value_b"}
      {"property_c":"value_c", "property_d":"value_d"}
      {"property_e":"value_e", "property_f":"value_f"}
    • An array with multiple JSON objects within:

      [{"property_a":"value_a", "property_b":"value_b"},
      {"property_c":"value_c", "property_d":"value_d"},
      {"property_e":"value_e", "property_f":"value_f"}]
    • A JSON object with properties and one array:

      {
      "property_a":"value_a",
      "property_b":"value_b",
      "records":[
      {"property_c":"value_c", "property_d":"value_d"},
      {"property_e":"value_e", "property_f":"value_f"}
      ]}

Creating an HTTP API data exporter

To configure the data exporter you must have administrative rights. Refer to the Roles documentation for more information about user roles.

To access Data Export:

  1. Select Administration from the main menu.

  2. Select Outbound connectors from the Integrations section of the navigation panel.

  1. Select Data Exporter from the list of Outbound connectors. The Data Exporter page lists the total number of created data exporters.

The Data Export page remains empty until you create your first data exporter.

  1. Click on the New Exporter button in the top-right corner of the page to create a new data exporter, and select the HTTP API Exporter option.

  1. Fill out the General tab and Data tab on the New exporter page.

  2. Click on the Test Load up to 20 records button to execute the NQL query from the Data tab.

  3. Click on the Save button at the bottom of the page to validate and create the new data exporter.

General tab

  • Name: enter a name for the data exporter.

  • Description (optional): enter a meaningful goal for the data exporter.

  • Credentials: define the credentials from the third-party tool to enable Nexthink data exports. Refer to the Connector credentials documentation for more information.

  • Method: define the method the public API supports for sending out data, for example POST, PUT, PATCH.

  • Resource: enter the name of the public API endpoint without the protocol and instance, as listed in the following table:

Full URLResource Value

https://ven00000.service-now.com/api/now/import/u_infinity_file/insertMultiple

api/now/import/u_infinity_file/insertMultiple

https://prd-p-00000.splunkcloud.com:8088/services/collector?index=main

services/collector?index=main

  • Scheduling frequency: define how often the system executes the NQL query and exports data. The available options are:

    • Hourly: The system triggers the data export data based on the value selected in the drop-down menu. For instance, every 1h, 2h, 3h, 4h, 6h or 12h.

    • Daily: The system triggers the data export every day at 00:00 of the timezone where the Nexthink cloud instance is located.

    • Weekly: The system triggers the data export weekly, on the selected day at 00:00 of the timezone where the Nexthink cloud instance is located.

For Hourly and Daily scheduling frequencies, the system waits 20 minutes to execute the data exporter to allow the previous bucket to close properly for data completeness.

You must select a value for the Recurrence option because the system does not generate a default value and does not indicate that the value is missing during the validation process.

Data tab

  • NQL query: define the data exported from the Nexthink web interface into the destination using an NQL query.

  • Payload structure: select the payload structure to be sent into the third-party tool API. Check, in advance, that the public API being targeted supports one of the payload structures referred to on this page.

  • Payload (JSON): write the payload structure to be sent to the third-party tool in JSON format. Specify the payload for only one object.

  • Payload content helpers: list the variables from the NQL query that the system can use within the payload.

The exporter replicates the object structure as many times as results are generated by the NQL query.

Testing the HTTP data exporter

Click on the Test load up to 20 records button to execute the query configured in the Data tab. The system sends the result to the destination set up in the General tab.

  • If the NQL query and the connection are valid, a message appears indicating that the query results has been successfully delivered.

  • If the NQL query or the connection is invalid, a message appears informing about the error details.

The following screenshots of Data tabs show different examples of valid queries.

Example of a valid query (JSON object)

Example of a valid query (array)

Example of a valid query (JSON object with an array)

Refer to the Managing data exporters documentation to learn more about data exporters creation, editing, deleting and disabling.

F.A.Q.

Can I add a payload that is not supported by the HTTP API Exporter?

No, a validation error occurs if your payload structure does not match any of the three options available on Nexthink.

Are the keys inserted in the payload message validated against a ServiceNow import set table?

If you try to insert a key within the payload that is not a column on the import set table in ServiceNow, it will not be inserted.

What if I need to use a payload format that is not available?

Feel free to reach out to your Nexthink representative and suggest an idea to support a new payload format.

How does Nexthink manage large NQL query results through HTTP exporters?

Nexthink has optimized the HTTP exporter to manage large datasets efficiently. When an NQL query exceeds 1,000 records, Nexthink segments the data into manageable batches of 1,000 records each, up to a total of 1 million records. These batches are systematically dispatched to the organization's endpoint. Our scheduler is designed to adapt to varying response times and data volumes, ensuring continuous and seamless data delivery, batch by batch, until complete transmission is achieved.

How does Nexthink ensure reliable data delivery through the HTTP exporter?

Nexthink utilizes an At-Least-Once Delivery algorithm to ensure reliable data delivery through the HTTP exporter, especially during system disruptions. This means that every batch of requested data is sent at least once, guaranteeing successful delivery and preventing data loss during system disruptions. While the data batches may be delivered more than once, they will never be lost.

To detect the extra delivered batches, Nexthink has added custom headers as follows:

  • X-Nexthink-Execution-Id: the ID of the scheduled event (a new ID is created each time that a scheduled event happens)

  • X-Nexthink-Records: Number of records per page

  • X-Nexthink-Pages: The number of pages per scheduled event

  • X-Nexthink-Current-Page: The actual page

  • X-Nexthink-Timestamp: The timestamp of the page sent (epoch time)

With these headers, the data delivered more than once, can be identified if the X-Nexthink-Current-Page is repeated for the same X-Nexthink-Execution-Id for any timeframe.

How does the HTTP exporter throttling mechanism work?

To ensure the system's stability and uninterrupted service, Nexthink has implemented an HTTP exporter throttling mechanism. This mechanism can handle up to 3.33 batches per second, while also considering various factors such as the responsiveness of the Nexthink user's infrastructure and query processing times. This helps to maintain optimal system performance.

Last updated