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:
Create or confirm the target JSM Assets schema and object type.
Create or confirm Huntress API credentials and capture the API Key and API Secret.
Configure an OnLink Huntress connection that uses Basic Auth.
Set the API method, endpoint, response data path, and pagination options.
Fetch sample data and map Huntress JSON fields to JSM Assets attributes.
Use Get Data to validate the result, then run the import.
1. Configure Huntress credentials
Sign in to the Huntress portal as an Account Admin, open the menu at the top-right, and select API Credentials.
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.
Copy the API Key and API Secret. The secret is shown only once.
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
Select Basic Auth.
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.
Set Method to
GET.Set URL to the Huntress agents endpoint:
https://api.huntress.io/v1/agents.Set Response data path to
agents.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 |
|---|---|
| Uses the Huntress agent |
| Maps the Huntress agent |
| Maps the Huntress agent |
| Maps the Huntress agent |
| Maps the Huntress agent |
| Maps the Huntress agent |
| Maps the Huntress 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
Use Get Data to preview the data returned by Huntress.
Confirm that the sample records contain the expected fields and values.
Review object type mappings and attribute names for spelling and case consistency.
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