Huntress to JSM Assets

Huntress to JSM Assets

Huntress to JSM Assets Integration Guide

This guide explains how to use OnLink to import Huntress agent data into JSM Assets. It covers the Huntress API connection, request configuration, pagination, sample data, field mapping, validation, and optional filters.

Overview

OnLink can import Huntress API responses into JSM Assets object types by using mapping statements such as key:, map:, and config:. Use this approach when the relevant Huntress API endpoint and Assets object type are configured.

The high-level process is:

  1. Create or confirm the target JSM Assets schema and object type.

  2. Create or confirm Huntress API credentials and capture the API Key and API Secret.

  3. Configure an OnLink Huntress connection that uses Basic Auth.

  4. Set the API method, endpoint, response data path, and pagination options.

  5. Fetch sample data and map Huntress JSON fields to JSM Assets attributes.

  6. Use Get Data to validate the result, then run the import.

1. Configure Huntress credentials

  1. Sign in to the Huntress portal as an Account Admin, open the menu at the top-right, and select API Credentials.

  2. Add a user API credential and assign it to a user with access to the organizations you want to import. User keys carry that user's permissions.

  3. Copy the API Key and API Secret. The secret is shown only once.

  4. In OnLink, create a new Huntress connection and use the Huntress API documentation to parse the connection details: https://api.huntress.io/docs#rest-api

  5. Select Basic Auth.

  6. Enter the API Key as the username and the API Secret as the password.

2. Configure the API request

Use a GET request to retrieve agents from the Huntress API.

  1. Set Method to GET.

  2. Set URL to the Huntress agents endpoint: https://api.huntress.io/v1/agents.

  3. Set Response data path to agents.

  4. Keep the remaining settings at their defaults unless you need query parameters for filtering.

GET https://api.huntress.io/v1/agents

 

3. Configure pagination

The Huntress API supports pagination. Configure the pagination settings in OnLink so each import can retrieve all agent records returned by the endpoint.

Review the Huntress API response metadata and pagination options in the endpoint documentation before running a production import.

 

4. Fetch sample data

Save the connection, then run it to fetch sample values from Huntress. Use the returned sample JSON to confirm that the endpoint is correct and to identify the field names needed for mapping.

Sample response

{ "id": 1, "account_id": 5, "arch": "x86_64", "created_at": "2022-03-01T20:05:10Z", "domain_name": "WORKGROUP", "edr_version": "0.3.20", "external_ip": "198.51.100.42", "hostname": "laptop01", "defender_policy_status": "Compliant", "defender_status": "Healthy", "defender_substatus": "Up to date", "firewall_status": "Disabled", "tamper_protection_configured": true, "tamper_protection_actual": true, "ipv4_address": "146.134.139.9", "ipv4_addresses": [ "10.5.80.97", "172.27.240.1" ], "last_callback_at": "2022-03-01T20:05:10Z", "last_survey_at": "2022-03-01T20:05:10Z", "mac_addresses": [ "7c:a7:b0:16:2f:78" ], "service_pack_major": 0, "service_pack_minor": 0, "organization_id": 7, "os": "Windows 8 Pro", "os_build_version": "19044", "os_major": 6, "os_minor": 2, "os_patch": 0, "platform": "windows", "serial_number": "wtIe1bvDbh", "tags": [ "Server", "Production" ], "updated_at": "2022-03-01T20:05:10Z", "version": "0.11.3", "version_number": 720899, "win_build_number": 19044 }

5. Configure the Assets import and mapping

After the connection is established, create the Assets import by following the JSM Assets Data Synchronization guide.

Use the fetched API sample to identify the Huntress JSON field names and map them to the corresponding JSM Assets attributes. The key: mapping should use a stable unique value that OnLink can use to match and update existing Assets objects.

Mapping

Description

Mapping

Description

key:id=Device ID

Uses the Huntress agent id field as the unique key for matching and updating JSM Assets objects.

map:domain_name=Domain Name

Maps the Huntress agent domain_name field to Domain Name. This stores the domain or workgroup name reported for the agent.

map:hostname=Hostname

Maps the Huntress agent hostname field to Hostname. This stores the hostname returned by the GET /v1/agents API.

map:ipv4_address=IPv4 Address

Maps the Huntress agent ipv4_address field to IPv4 Address. This captures the primary IPv4 address reported for the agent.

map:os=OS

Maps the Huntress agent os field to OS. This stores the operating system name reported for the agent.

map:platform=Platform

Maps the Huntress agent platform field to Platform. This records the platform reported for the agent, such as Windows, macOS, or Linux.

map:serial_number=Serial Number

Maps the Huntress agent serial_number field to Serial Number. This stores the device serial number reported for the agent.

The mapping table lists only example fields. You can map any field returned in the Huntress response data, as long as the corresponding Assets attribute exists.

Mapping guidance

  • Start with one unique key: mapping so OnLink can identify whether to create or update an Assets object.

  • Add map: entries for each Huntress field you want to store in Assets.

  • Compare the Huntress sample JSON with the Assets object type attributes before running an import.

  • If a value is nested in the JSON response, inspect the sample output carefully and use the field path supported by the OnLink mapping configuration.

6. Validate and run the import

  1. Use Get Data to preview the data returned by Huntress.

  2. Confirm that the sample records contain the expected fields and values.

  3. Review object type mappings and attribute names for spelling and case consistency.

  4. Run the import only after the previewed data and mapping are correct.

7. Optional filtering

Use Huntress API query parameters to limit the records returned by the endpoint. For supported filters, refer to the Huntress agents API documentation: https://api.huntress.io/docs#rest-api/tag/agents/GET/v1/agents

For example, to return only Windows agents, add the following query parameter:

platform=windows