Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Importing Device Data from Fleet to Assets

This article walks through how to import device data from Fleet to Assets. We cover fleet's REST API covering authentication, the host endpoints, field mapping, and the pagination and filtering options you'll want for a production sync.

Fleet to Assets_1280 X 720px .png

Integration: The Fleet API

Fleet exposes a full REST API over your Fleet server. Everything the Fleet UI shows you is available programmatically, which makes it a clean integration target — there's no agent to install, no database to query, and no vendor-specific SDK.

For an Assets import, the relevant surface is small:

Purpose Endpoint
Obtain a session token POST /api/v1/fleet/login
List devices GET /api/v1/fleet/hosts
Fetch a single device GET /api/v1/fleet/hosts/:id
Count devices (useful for validation) GET /api/v1/fleet/hosts/count

All endpoints are served from your own Fleet instance, so your base URL is something like https://fleet.yourcompany.com.

Authentication

Fleet uses bearer tokens. Every request carries the token in an Authorization header:

http
GET /api/v1/fleet/hosts HTTP/1.1
Host: fleet.yourcompany.com
Authorization: Bearer <your_api_token>

From the Fleet UI (recommended for integrations). Log in to Fleet, go to My account → Get API token (/profile), and copy the value.

Create a dedicated service user for the integration rather than reusing a person's account.

 

Configuring authentication in OnLink

In OnLink, create the connection with the Bearer Token Static authentication type and paste the Fleet API token.

Screenshot 2026-08-17 at 9.22.38 AM.png

GET methods for hosts

API is GET /api/v1/fleet/hosts.

Screenshot 2026-08-17 at 9.26.08 AM.png

  1. Set Method to GET.

  2. Set URL to the Fleet API endpoint, for example: Fleet | REST API | Fleet documentation . In the sample below the URL use apifleet.com, please replace with your hostname.

  3. Set Response data path to hosts.

  4. Leave other settings at their defaults unless the endpoint requires query parameters.

Mapping host data to Assets in OnLink

Assets objects are defined by an object type schema, so the first step is deciding where devices land. Most teams use an existing Device, Computer, or Hardware Asset object type in their IT schema and add any Fleet-specific attributes they want to track (agent version, last seen, failing policies).

A working Fleet configuration looks like this:

config:api=api/v1/fleet/hosts
key:id=Device ID
map:display_name=Name
map:hostname=Hostname
map:uuid=UUID
map:hardware_serial=Serial Number
map:hardware_model=Model
map:hardware_vendor=Vendor
map:platform=Platform
map:os_version=OS Version
map:osquery_version=Agent Version
map:primary_ip=IP Address
map:primary_mac=MAC Address
map:cpu_brand=Processor
map:gigs_disk_space_available=Free Disk GB
map:status=Status
map:last_enrolled_at=Enrolled Date
map:seen_time=Last Seen

Additional configuration: pagination and filters

Pagination

Screenshot 2026-08-17 at 9.31.17 AM.png

Filters

Use Fleet API query parameters to limit the records returned by the endpoint. For supported filters, refer to the Fleet API documentation for the endpoint you are using.

For supported filters, see the Fleet Fleet | REST API | Fleet documentation.

Example: to filter on hosts that are online, add this query parameter:

status=online

Screenshot 2026-08-17 at 9.33.15 AM.png

Sample JSON Response

{
"hosts": [
{
"id": 1,
"hostname": "MACBOOK-PRO-JD",
"computer_name": "Jane's MacBook Pro",
"display_name": "Jane's MacBook Pro",
"uuid": "a4fc55a1-b5de-409c-a2f4-441f564680d3",
"hardware_serial": "C02XY1Z2ABCD",
"hardware_model": "MacBookPro18,3",
"hardware_vendor": "Apple Inc.",
"platform": "darwin",
"os_version": "macOS 14.5",
"osquery_version": "5.12.1",
"primary_ip": "10.10.4.22",
"primary_mac": "f4:5c:89:1a:2b:3c",
"cpu_brand": "Apple M1 Pro",
"memory": 17179869184,
"gigs_disk_space_available": 214.83,
"status": "online",
"last_enrolled_at": "2026-01-14T09:12:44Z",
"seen_time": "2026-08-17T11:02:18Z",
"team_id": 3,
"team_name": "Engineering",
"issues": {
"failing_policies_count": 1,
"total_issues_count": 1
}
}
]
}

 

Using Fleet and looking to bring it into Assets in Jira Service Management? Give OnLink a try.

Related reading

FAQs

Q: Fleet is self-hosted on our network. Does OnLink need to reach it directly?

Yes — OnLink calls your Fleet server's REST API, so the base URL has to be reachable from the internet over HTTPS. If your Fleet instance sits entirely inside a private network, you'll need to expose it through a reverse proxy or gateway, or allowlist OnLink's outbound addresses at the firewall. Fleet Cloud instances work without any of this. Worth resolving with your network team before you start configuring mappings, since a connection test will simply time out otherwise.

Q: A device was removed from Fleet. Does the Assets object get deleted too?

No. The import creates and updates objects; it doesn't delete objects that stop appearing in the API response. That's deliberate — a device dropping out of a filtered result set is not the same as a device being decommissioned, and silent deletion of CMDB records is hard to recover from. Handle retirement inside Assets instead: sync seen_time into a Last Seen attribute, then use a Jira automation rule to flag or transition objects that haven't been seen in, say, 30 days. That gives you an auditable retirement process rather than objects quietly disappearing.

Q: I ran the sync twice and now I have duplicate devices. What went wrong?

Almost always the key: mapping. If key:id=Device ID is missing, or the Device ID attribute isn't populated on your existing objects, OnLink has nothing to match against and creates a new object every run. Check that the key attribute exists in your object type, that its name matches the mapping exactly (spelling and case), and that it's populated on the objects created by the first run. If you're switching identifiers — say from id to hardware_serial — backfill the new key attribute on existing objects before the next sync.

Q: Can I bring in each device's installed software, not just the hardware record?

Yes, via populate_software=true on the hosts endpoint, which nests a software array inside each host object. Two practical notes: the response gets significantly larger, so lower per_page and expect longer runs; and software is usually a separate object type in Assets with a reference back to the device, rather than attributes on the device itself. Many teams run the hardware sync daily and the software sync weekly for this reason.

Q: How do I connect each device to the employee who uses it?

Fleet's host records aren't an authoritative source of device ownership, so this is best solved by reference mapping against people data you already have in Assets — typically synced from your HRIS or identity provider. If Fleet is populating an owner-identifying field, resolve it with an inline lookup:

map:email=Assigned To|Email=${email}

That matches the incoming value against the Email attribute of your people object type and creates a real reference. Where Fleet has no reliable owner field, a common pattern is to match on hostname convention or to maintain assignment in Assets manually and let Fleet own only the technical attributes.

0 comments

Comment

Log in or Sign up to comment
TAGS
AUG Leaders

Atlassian Community Events