Skip to main content
POST
/
devices
/
tags
curl --request POST \
  --url https://dashboard.hologram.io/api/1/devices/tags \
  --header 'Authorization: Basic <encoded-value>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "name": "Soil Sensor",
  "deviceids": [],
  "excludedDeviceIds": [
    1234606,
    1230975,
    1231455
  ],
  "linkids": [],
  "allSelected": true,
  "pagesSelected": [],
  "useSearch": false,
  "ignoreInvalidLinks": false,
  "deviceFilters": {
    "states": [
      "LIVE"
    ],
    "query": "",
    "hitsPerPage": 10000,
    "page": 1,
    "sort": {},
    "orgid": 12345
  }
}
'
{
"success": true,
"data": {
"tags": [
{
"name": "Weather Station",
"id": 39554,
"deviceids": [
1234570,
1234569,
1234568,
1234567,
1234566,
1234565,
1234564,
1234563,
1234562,
1237151,
1231528,
123360
]
}
]
}
}

Authorizations

Authorization
string
header
required

HTTP Basic authentication using API keys. Set the username to apikey and the password to your API key.

You can find your API key on the Hologram Dashboard under Account Settings.

Query Parameters

orgid
number
required

Body

application/json

Union representation of the various ways that devices can be selected from the device table in Dashboard. Note that if useSearch=false, only orgid, states, limit, startafter, allSelected, excludedDeviceIds, linkIds and pageIdsSelected are relevant.

name
string
required

Name for the new tag. Try to use shorter names.

allSelected
boolean
deviceFilters
object
deviceids
integer[]
excludedDeviceIds
integer[]
linkids
integer[]
pagesSelected
integer[]

Response

OK

data
object
success
boolean

Whether the request was successful or not

Example:

true