Skip to main content
PUT
/
v1
/
assets
Bulk upsert assets
curl --request PUT \
  --url https://api.intrace.ai/v1/assets \
  --header 'Content-Type: application/json' \
  --header 'X-API-Key: <api-key>' \
  --data '
{
  "assets": [
    {
      "asset_id": "<string>",
      "type": "facility",
      "name": "<string>",
      "role": "<string>",
      "status": "active",
      "attributes": {
        "lat": 123,
        "lng": 123,
        "address": "<string>",
        "country": "<string>",
        "monitoring_radius_km": 123
      },
      "threat_config": {
        "enabled": true,
        "alert_classes": [
          "class_1_situational_awareness"
        ],
        "custom_instructions": "<string>",
        "monitored_event_types": [
          "<string>"
        ],
        "lookback_days": 45
      },
      "physical_threat_config": {
        "enabled": true,
        "alert_classes": [
          "class_1_situational_awareness"
        ],
        "custom_instructions": "<string>",
        "monitored_event_types": [
          "<string>"
        ],
        "max_age_hours_by_category": {}
      }
    }
  ]
}
'
{
  "assets": [
    {
      "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "asset_id": "<string>",
      "type": "<string>",
      "name": "<string>",
      "status": "<string>",
      "created_at": "2023-11-07T05:31:56Z",
      "updated_at": "2023-11-07T05:31:56Z",
      "role": "<string>",
      "attributes": {
        "lat": 123,
        "lng": 123,
        "address": "<string>",
        "country": "<string>",
        "monitoring_radius_km": 123
      },
      "threat_config": {
        "enabled": true,
        "alert_classes": [
          "class_1_situational_awareness"
        ],
        "custom_instructions": "<string>",
        "monitored_event_types": [
          "<string>"
        ],
        "lookback_days": 45
      },
      "physical_threat_config": {
        "enabled": true,
        "alert_classes": [
          "class_1_situational_awareness"
        ],
        "custom_instructions": "<string>",
        "monitored_event_types": [
          "<string>"
        ],
        "max_age_hours_by_category": {}
      }
    }
  ]
}
Replaces the full asset collection for the tenant or monitored portfolio in scope. This mirrors the internal save-all pattern used by Intrace asset management.

Request Body

{
  "assets": [
    {
      "asset_id": "lagos-hq",
      "type": "facility",
      "name": "Lagos HQ",
      "status": "active",
      "attributes": {
        "lat": 6.4541,
        "lng": 3.3947,
        "country": "NG",
        "monitoring_radius_km": 12
      }
    },
    {
      "asset_id": "abuja-residence-1",
      "type": "residence",
      "name": "Abuja Residence",
      "status": "active",
      "attributes": {
        "lat": 9.0765,
        "lng": 7.3986,
        "country": "NG",
        "monitoring_radius_km": 5
      }
    }
  ]
}

Behavior

  • assets present in the payload are created or updated
  • assets omitted from the payload are removed from the current set

Authorizations

X-API-Key
string
header
required

Body

application/json
assets
object[]
required

Response

200 - application/json

Asset set replaced.

assets
object[]
required