MQInsights Developer Documentation logo DOCS

Asset Management

Assets represent the physical equipment or items you're tracking with MQinsights. This guide covers creating, locating, searching, and deleting assets, plus activating an asset's LED for physical identification.

Integration-Managed Assets: Assets created through the API are flagged as integration-managed in the database. These assets can only be modified or deleted through the API, not through the MQinsights web application.

Before You Begin

  • An access token. See Authentication.
  • Your equipment's customer_reference (the unique ID your system uses for a piece of equipment).

Create or Update an Asset

POST {{API_DOMAIN}}/integrations/asset/upsert

Create or update an asset by customer_reference (your equipment ID). If the asset exists, it's updated; if not, it's created.

Asset Object Fields

Field Type Location Required Description
description string body Yes Human-readable description of the asset
customer_reference string body Yes Your unique equipment ID
manufacturer string body No Equipment manufacturer name
model_number string body No Manufacturer model number
serial_number string body No Manufacturer serial number
customer_properties object body No Custom metadata as key-value pairs

Example Request

bash
curl -sS -X POST "{{API_DOMAIN}}/integrations/asset/upsert" \
  -H "Authorization: Bearer $MQ_TOKEN" \
  -H "Content-Type: application/json" \
  -H "X-B3-TraceId: 1234567890abcdef1234567890abcdef" \
  -H "X-B3-SpanId: 1234567890abcdef" \
  -d '{
    "description": "ANALYZER: CAPILLARY ELECTROPHORESIS",
    "customer_reference": "105222",
    "manufacturer": "THERMO FISHER SCIENTIFIC",
    "model_number": "G12345",
    "serial_number": "X123456",
    "customer_properties": {
      "equipment_type": "TBU",
      "primary_contact_full_name": "John Doe"
    }
  }' | jq

Response Codes

Code Status Description
200 OK Asset was updated
201 Created Asset was created
400 Bad Request Invalid request format or missing required fields
401 Unauthorized Invalid or expired access token
415 Unsupported Media Type Content-Type must be application/json
5xx Internal Server Error Service temporarily unavailable

API Versioning: Future API versions may add new fields. Your application should ignore unknown fields to maintain forward compatibility.

Get Asset Location

GET {{API_DOMAIN}}/integrations/asset/{customer_reference}/location

Retrieve the current location and status of a single asset by customer_reference.

Path Parameters

Parameter Type Location Required Description
customer_reference string path Yes Your unique equipment ID

Example Request

bash
curl -sS "{{API_DOMAIN}}/integrations/asset/105222/location" \
  -H "Authorization: Bearer $MQ_TOKEN" \
  -H "X-B3-TraceId: 1234567890abcdef1234567890abcdef" \
  -H "X-B3-SpanId: 1234567890abcdef" | jq

Response Fields

Field Type Description
customer_reference string Your equipment ID
campus_id string Detected campus identifier
building_id string Detected building identifier
room_id string Detected room identifier
zone_id string Detected zone identifier
status string Asset status: ACTIVE, MISSING, IN_USE, NOT_IN_USE, UNPAIRED
confidence string Location confidence: BUILDING, ROOM, ZONE, FLOOR
tag_identifier array Array of associated tag IDs
location_updated_at string ISO8601 timestamp of last location update

Example Response

json
{
  "customer_reference": "105222",
  "campus_id": "PHL",
  "building_id": "A41",
  "room_id": "413177",
  "zone_id": "413177_1",
  "status": "ACTIVE",
  "confidence": "ZONE",
  "tag_identifier": ["E5-EA-71-1D-24-72"],
  "location_updated_at": "2022-02-15T19:17:55+00:00"
}

Response Codes

Code Status Description
200 OK Asset location retrieved successfully
400 Bad Request Invalid request format
401 Unauthorized Invalid or expired access token
404 Not Found Asset does not exist
5xx Internal Server Error Service temporarily unavailable

GET {{API_DOMAIN}}/asset-search/

Search and export location data for multiple assets in bulk, useful when you need location data across a batch of assets without setting up a full webhook integration. Response format is controlled by the Accept header: omit it (or send application/json) for a paginated JSON response, or send text/csv for a flat CSV export.

Query Parameters

Parameter Type Location Required Description
search string query No Free-text search across multiple asset fields (description, reference, etc.)
status__in string query No Filter by one or more statuses (comma-separated, URL-encoded)

Supported status values: ACTIVE, MISSING, IN_USE, NOT_IN_USE, UNPAIRED.

Headers

Header Required Description
Accept No text/csv for a CSV export; omitted or application/json for the default paginated JSON response

Example Requests

code
GET {{API_DOMAIN}}/asset-search/?search=SRC-FR-01
GET {{API_DOMAIN}}/asset-search/?status__in=IN_USE%2CACTIVE
GET {{API_DOMAIN}}/asset-search/?search=Freezer&status__in=IN_USE

JSON Response Format (default)

With no Accept header (or Accept: application/json), the response is a paginated object:

Field Description
count Total number of matching assets
next URL of the next page of results, or null
previous URL of the previous page of results, or null
results Array of asset objects, each including asset_locations (location history with confidence) and customer_properties (customer-defined key/value metadata)

Example Response

json
{
  "count": 1,
  "next": null,
  "previous": null,
  "results": [
    {
      "id": 77627,
      "customer_reference": "SRC-FR-01",
      "description": "-20 Freezer",
      "manufacturer": "CorbyCorp",
      "model_number": "SS-CC-12-34-55",
      "serial_number": "123456789",
      "status": "IN_USE",
      "type": "-20C",
      "is_integrations": false,
      "owner": "CC R&D",
      "location_last_reported_at": null,
      "asset_locations": [
        {
          "last_updated_at": "2025-09-10T15:35:05Z",
          "location": {
            "campus": {
              "id": 316,
              "campus_id": "PHL",
              "campus_description": "Comcast Philadelphia Campus"
            },
            "building": {
              "id": 325,
              "building_id": "A41",
              "building_description": "Comcast Center"
            },
            "floor": {
              "id": 341,
              "floor_id": "35",
              "floor_description": "35"
            },
            "room": {
              "id": 2443,
              "room_id": "Demo",
              "room_description": "Demo"
            },
            "zone": {
              "id": 2624,
              "zone_id": "Demo_1",
              "zone_description": "Demo_1"
            }
          },
          "confidence": "ZONE"
        }
      ],
      "customer_properties": {}
    }
  ]
}

CSV Response Format (Accept: text/csv)

With Accept: text/csv, the response is CSV with the following columns:

Column Description
Asset ID Customer reference (equipment ID)
Description Asset description
Asset Type Type of asset
Asset Owner Owner information
Is Integrations Whether asset is integration-managed
Manufacturer Equipment manufacturer
Model Number Manufacturer model number
Serial Number Manufacturer serial number
Status Current asset status
Campus Campus name
Building Building name
Floor Floor identifier
Room Room identifier
Zone Zone identifier
Last Check-In Timestamp of last location update
Confidence Location confidence level
Device ID Associated device identifier
Battery Level Device battery level (if applicable)

Example Response

csv
Asset ID,Description,Asset Type,Asset Owner,Is Integrations,Manufacturer,Model Number,Serial Number,Status,Campus,Building,Floor,Room,Zone,Last Check-In,Confidence,Device ID,Battery Level
SRC-FR-01,-20 Freezer,-20C,CC R&D,False,CorbyCorp,SS-CC-12-34-55,123456789,IN_USE,Comcast Philadelphia Campus,Comcast Center,35,Demo,Demo_1,September 10, 2025 03:35:05 PM,ZONE,,

Response Codes

Code Status Description
200 OK Data retrieved successfully
400 Bad Request Invalid request format or parameters
401 Unauthorized Invalid or expired access token
404 Not Found No assets found matching criteria
5xx Internal Server Error Service temporarily unavailable

Performance Tip: For large datasets, use specific search criteria to narrow down results. The CSV export is designed for batch operations and reporting.

Delete Asset

DELETE {{API_DOMAIN}}/integrations/asset/{customer_reference}

Permanently delete an asset by customer_reference.

Warning: This operation is permanent. Once an asset is deleted, it cannot be recovered through the API or MQinsights web application. Assets created via integrations (is_integrations = true) are flagged as integration-managed and cannot be deleted or modified within the MQinsights web application; they must be managed exclusively through the API.

Path Parameters

Parameter Type Location Required Description
customer_reference string path Yes Your unique equipment ID to delete

Example Request

bash
curl -sS -X DELETE "{{API_DOMAIN}}/integrations/asset/105222" \
  -H "Authorization: Bearer $MQ_TOKEN" \
  -H "X-B3-TraceId: 1234567890abcdef1234567890abcdef" \
  -H "X-B3-SpanId: 1234567890abcdef"

Response Codes

Code Status Description
200 OK Asset was deleted successfully
400 Bad Request Invalid request format
401 Unauthorized Invalid or expired access token
404 Not Found Asset does not exist
5xx Internal Server Error Service temporarily unavailable

Before deleting, verify the asset, check for active integrations that depend on it, export location history if you need it for records, and remove the asset from your own equipment management system.

Activate LED

POST {{API_DOMAIN}}/integrations/asset/{customer_reference}/led/activate

Activate the LED on an asset by customer_reference, useful for physically locating equipment in the field.

Path Parameters

Parameter Type Location Required Description
customer_reference string path Yes Your unique equipment ID

Example Request

bash
curl -sS -X POST "{{API_DOMAIN}}/integrations/asset/105222/led/activate" \
  -H "Authorization: Bearer $MQ_TOKEN" \
  -H "Content-Type: application/json" \
  -H "X-B3-TraceId: 1234567890abcdef1234567890abcdef" \
  -H "X-B3-SpanId: 1234567890abcdef"

Example Response

json
{
  "timeout": 120
}

timeout is the LED activation duration in seconds. The LED flashes for 120 seconds (2 minutes) by default, then turns off automatically.

Response Codes

Code Status Description
201 Created LED activation request accepted
202 Accepted LED activation request already pending
400 Bad Request Invalid request format
401 Unauthorized Invalid or expired access token
404 Not Found Asset does not exist
5xx Internal Server Error Service temporarily unavailable

Only one LED activation request can be active at a time per asset; if one is already pending, you'll receive 202 Accepted. The asset must be powered on and within range of the network.

What's Next?