SitesAssets

importSiteAssets

POST
/api/v1/sites/{site_id}/assets/import

Import Site Assets.

It can be done via a CSV file or a JSON payload.

CSV File Format

name,mac"asset_name",5c5b53010101

Authorization

Authorization<token>

Preferred authentication method for automation and integrations. Send the API token in the HTTP Authorization header.

Format: Authorization: Token {apitoken}

Notes:

  • An API token generated for a specific admin has the same privileges as that admin
  • An API token is automatically removed if it is not used for more than 90 days
  • SSO admins cannot generate admin API tokens. Use organization API tokens when scoped Org/Site privileges are needed.

In: header

Path Parameters

site_id*string
Formatuuid

Query Parameters

upsert?string

Whether to replace existing assets with the same MAC address during import. enum: False, True

Default"False"

Value in

  • "False"
  • "True"

Request Body

BLE asset records supplied in a JSON import payload

Items1 <= items
[index: integer]?

Asset record supplied in a JSON import payload

Response Body

curl -X POST "https://example.com/api/v1/sites/000000ab-00ab-00ab-00ab-0000000000ab/assets/import" \  -H "Content-Type: application/json" \  -d '[    {      "mac": "a31eb04e1c38",      "name": "Expensive Instrument"    },    {      "mac": "a31eb04e1c37",      "name": "Cheap Instrument"    }  ]'
Empty