-
Notifications
You must be signed in to change notification settings - Fork 15
REST API Assets
The complete usage guide for the Assets module of the REST API β every URL, method, parameter and response shape. This mirrors the interactive documentation at System β API β Documentation, where each endpoint also has a live "Try it" tester.
Note
New to the API? Read the basics table on REST API: Tickets first β base URL, authentication, response envelope, error codes, rate limits and PATCH semantics are identical across all modules.
Three things that make Assets different from Tickets:
| π Install-wide | Assets have no company β a key's company scope does not restrict them (that machinery applies to tickets). |
| π·οΈ Hostname is identity | The inventory agent, Intune sync and this API all treat hostname as the asset's identity. Creating a duplicate hostname returns 409 pointing at the existing asset β PATCH that instead. |
| π« No delete | There is deliberately no DELETE /assets/{id} β nothing in FreeITSM deletes assets (they're agent-maintained records). Retire an asset by setting its status. |
Sync an asset from any external source (procurement system, another RMM, a spreadsheet):
curl -X POST "https://your-server/api/v1/assets" \
-H "Authorization: Bearer fitsm_your_key_here" \
-H "Content-Type: application/json" \
-d '{
"hostname": "LT-0042",
"manufacturer": "Dell",
"model": "Latitude 5440",
"service_tag": "ABC1234",
"asset_type_id": 4,
"warranty_expiry": "2028-06-30",
"purchase_cost": 899.99
}'Every change you make afterwards lands in the asset's History exactly as if an analyst edited it in the UI. π
| Parameter | Description |
|---|---|
q |
Search hostname, service tag, model and manufacturer |
hostname / service_tag
|
Exact lookups (handy for sync scripts) |
asset_type_id Β· asset_status_id Β· location_id Β· supplier_id
|
Classification filters |
assigned_user_id |
Assets assigned to a requester Β· unassigned=true finds unassigned assets |
warranty_within_days |
β³ Warranty expiring within N days β the dashboard's "expiring soon" shape |
warranty_expired |
true = warranty already lapsed |
not_seen_days |
π» Not reported by the inventory agent for N days (or never seen) |
sort |
hostname (default), id, first_seen, last_seen, warranty_expiry, purchase_date, model β prefix - for descending |
page / per_page
|
Pagination β default 1 / 25, max per_page 100 |
GET /assets?warranty_within_days=30&sort=warranty_expiry β renewal report
GET /assets?not_seen_days=14&asset_status_id=1 β agents gone quiet
GET /assets?service_tag=ABC1234 β exact serial lookup
The asset shape (list and detail are the same, detail adds assigned_users):
{ "id": 568, "hostname": "LT-0042",
"type": { "id": 4, "name": "Laptop" },
"status": { "id": 2, "name": "In use" },
"location": { "id": 2, "name": "London", "path": "UK βΊ London" },
"hardware": { "manufacturer": "Dell", "model": "Latitude 5440", "service_tag": "ABC1234",
"memory": 17179869184, "cpu_name": null, "speed": null, "gpu_name": null,
"bios_version": null, "tpm_version": null, "bitlocker_status": null },
"os": { "operating_system": "Windows 11 Pro", "feature_release": null, "build_number": null },
"network": { "domain": null, "logged_in_user": null },
"lifecycle": { "purchase_date": null, "purchase_cost": 899.99,
"supplier": { "id": 3, "name": "TechSupplies Ltd" },
"order_number": "PO-1001", "warranty_expiry": "2028-06-30" },
"assigned_users_count": 1,
"first_seen": "2026-07-02T22:59:12Z", "last_seen": "2026-07-02T22:59:12Z", "last_boot_at": null }Only hostname is required (max 50 chars, unique β duplicate β 409 with the existing asset's id). Every field from the PATCH table below can be set at creation. first_seen/last_seen are stamped automatically; a creation entry is written to the asset history; setting warranty_expiry re-syncs the calendar's warranty events. Returns 201 with the full asset.
The full asset plus its current holders inline:
"assigned_users": [ { "user_id": 174, "name": "Jane Smith", "email": "jane@example.com",
"assigned_at": "2026-07-02T22:59:36Z",
"expected_return_date": "2026-08-01", "notes": "Loan laptop" } ]Send only what changes; explicit null clears a field. Every change is audited into the asset's History with the same stable field keys the UI writes (so API edits render identically in the History modal), lookup changes are audited by display name ("Laptop", "UK βΊ London"), and a warranty_expiry change re-syncs the calendar. Unknown lookup ids β 422; a hostname clash β 409. Re-sending the same PATCH is idempotent.
| Group | Fields |
|---|---|
| Classification |
asset_type_id Β· asset_status_id Β· location_id
|
| Lifecycle |
purchase_date Β· purchase_cost Β· supplier_id Β· order_number Β· warranty_expiry (dates YYYY-MM-DD) |
| Identity & hardware |
hostname Β· manufacturer Β· model Β· service_tag Β· memory Β· cpu_name Β· speed Β· gpu_name Β· bios_version Β· tpm_version Β· bitlocker_status
|
| OS & network |
operating_system Β· feature_release Β· build_number Β· domain Β· logged_in_user
|
Tip
The classification/lifecycle fields are what analysts edit in the UI; the hardware/OS fields are normally maintained by the inventory agent β the API can write both, so a non-agent source (Intune export, another RMM) can keep assets in sync.
Assignment is to requesters (end users), exactly like the UI: assigning writes the custody log's check-out and an assigned_user history entry; unassigning snapshots the holder and writes the check-in.
Current holders with dates, due-back, notes and which analyst assigned them.
| Field | Required | Description |
|---|---|---|
user_id or user_email
|
β | An existing requester (create one first with POST /users β needs users.create) |
notes |
Assignment notes | |
expected_return_date |
Due back, YYYY-MM-DD
|
Already assigned β 409. Returns 201.
Checks the asset back in. Unknown assignment β 404.
Every audited change, newest first β field key, old/new values (display names for lookups) and the analyst:
{ "data": [ { "id": 12, "field": "location", "old_value": null, "new_value": "London",
"analyst": { "id": 1, "name": "Administrator" },
"created_at": "2026-07-02T22:59:36Z" } ] }The check-out / check-in trail β who had the asset, when, expected return, processed by which analyst:
{ "data": [ { "id": 3, "action": "checkout", "user_id": 174, "user_name": "Jane Smith",
"expected_return_date": "2026-08-01", "notes": "Loan",
"by": "Administrator", "at": "2026-07-02T22:59:36Z" } ] }Read-only views of what the inventory agent reports β the same data as the asset detail pane's Storage/Devices/Software.
| Endpoint | Permission | Returns |
|---|---|---|
π’ GET /assets/{id}/disks
|
π asset_inventory.read |
Drives with size/free bytes and used percent |
π’ GET /assets/{id}/network-adapters
|
π asset_inventory.read |
Adapters with MAC, IP, subnet, gateway, DHCP flag |
π’ GET /assets/{id}/devices
|
π asset_inventory.read |
Device-manager entries (class, name, status, driver) |
π’ GET /assets/{id}/software
|
π asset_inventory.read |
Installed software β system components excluded unless ?include_components=true
|
All under the shared π reference.read permission:
| Endpoint | Returns |
|---|---|
π’ GET /asset-types
|
Asset types (id, name, description, is_active) |
π’ GET /asset-statuses
|
Asset statuses |
π’ GET /asset-locations
|
All locations, flat, each with parent_id and its full path ("UK βΊ London βΊ Office 1") |
π’ GET /suppliers
|
Suppliers with display name and a supplies_assets flag |
A read-only key (assets: read + reference: read) pulls everything a renewals spreadsheet needs:
B="https://your-server/api/v1"; K="Authorization: Bearer fitsm_β¦"
# Assets whose warranty expires in the next 90 days, soonest first
curl -s -H "$K" "$B/assets?warranty_within_days=90&sort=warranty_expiry&per_page=100" \
| jq -r '.data[] | [.hostname, .hardware.service_tag, .lifecycle.warranty_expiry,
(.lifecycle.supplier.name // "-"), (.location.path // "-")] | @csv'And the reverse direction β a procurement system stamping newly purchased kit:
# Find the asset by serial, then set its lifecycle fields
ID=$(curl -s -H "$K" "$B/assets?service_tag=ABC1234" | jq -r '.data[0].id')
curl -s -X PATCH "$B/assets/$ID" -H "$K" -H "Content-Type: application/json" \
-d '{"purchase_date":"2026-07-01","purchase_cost":899.99,"order_number":"PO-1001","warranty_expiry":"2029-07-01"}'Under the hood: REST API β How It Works Β· Tickets endpoints: REST API: Tickets Β· Keys & permissions: System β API (System module) Β· Module docs: Assets.
FreeITSM β an open-source IT Service Management platform Β· github.com/edmozley/freeitsm Β· MIT licence
- Installation
- β° Scheduled tasks (cron jobs)
- Architecture
- AI Providers
- Internationalisation (i18n)
- Timezones & Time Handling
- Theming & Dark Mode
- β¨οΈ Command palette (βK)
- π Searching inside tickets
- π Attached documents
- MobileβFriendly
-
Security
- Layer 1 β which modules you can enter
- β³ π§© Module Access Control
- β³ π οΈ Module Access β Developer Guide
- Layer 2 β what you can administer
- β³ π Roles & Permissions
- β³ π οΈ Roles β Developer Guide
- β³ π€ Why capabilities are constants
- Layer 3 β the System module
- β³ π Admin Access Control
- Hardening
- β³ π Security review response 2026-08
- β³ π‘οΈ Security hardening 2026-08
- β³ π οΈ Security hardening 2026-08 β Developer Guide
- β³ π‘οΈ Round three β plain English
- β³ π οΈ Round three β Developer Guide
- Single Sign-On (SSO)
- ποΈ LDAP & Active Directory
- Browser Extension
- API Reference
-
π REST API β how it works
- β³ π« REST API: Tickets
- β³ π» REST API: Assets
- β³ π΄ REST API: Problems
- β³ π REST API: Changes
- β³ π REST API: Knowledge
- β³ β REST API: Tasks
- β³ ποΈ REST API: CMDB
- β³ π REST API: Contracts
- β³ ποΈ REST API: Calendar
- β³ πΏ REST API: Software
- β³ π¦ REST API: Service Status
- β³ βοΈ REST API: Morning Checks
- β³ π REST API: Forms
- β³ βοΈ REST API: Workflow
- β³ πΊοΈ REST API: Network Mapper
- β³ π§ Using the API docs page
- β³ π OpenAPI specification
- β³ β OpenAPI: kept correct
- β³ π οΈ Maintaining the catalogue
- Watchtower
-
Tickets
- β³ Mailbox Authentication
- β³ π€ Email send log
- β³ Basic IMAP mailboxes
- β³ Email rendering & images
- β³ SLA Management
- β³ WhatsApp channel
- β³ π¬ Web chat channel
- β³ π£ Slack channel
- β³ π Linking tickets
- β³ ποΈ Canned responses
- β³ βοΈ Limiting replies to particular senders
- β³ βοΈ Email signatures
- β³ π The public web address
- β³ π’ Ticket numbering
- β³ π Raising a ticket for someone else
- β³ π Merging tickets
- β³ β Splitting tickets
- β³ β Selecting several tickets
- β³ π οΈ Snoozing tickets β Developer Guide
- β³ π₯ Collision detection
- β³ β±οΈ Time tracking
- Problem Management
- Tasks
- Assets
- Knowledge
- Change Management
- Calendar
- Morning Checks
- Reporting
- Software
- Forms
- Contracts
- Service Status
- π Notifications
- π¨ War Room
- Self-Service Portal
- LMS
- Process Mapper
- CMDB
- Network Mapper
- Workflows
- Issue trackers (Jira, Azure DevOps)
- System
-
Overview
- β³ π Progress tracker
- β³ Concepts & vocabulary
- β³ Email routing & mailboxes
- β³ Settings: global vs per-company
- β³ Users & self-service
- β³ Staff cross-company access
- β³ Worked examples
- β³ Pitfalls & gotchas
- β³ Scope: what it's for
- β³ π οΈ Developer Guide (make a module multi-company)
- β³ ποΈ Case study: CMDB (a linked graph)
- β³ π§ͺ Test harness (prove it's isolated)