---
updatedAt: 2026-06-12T14:47:10.000Z
agentTools:
  projectIndex: https://docs.formant.io/llms.txt
---

# Get tags

Get tags across all devices
Resource: devices
Authorized roles: viewer

# OpenAPI definition

```json
{
  "components": {
    "schemas": {
      "DeviceDetailsSort": {
        "properties": {
          "column": {
            "type": "string",
            "enum": [
              "id",
              "name",
              "type",
              "tags",
              "enabled",
              "created_at"
            ]
          },
          "order": {
            "type": "string",
            "enum": [
              "asc",
              "desc"
            ]
          }
        },
        "type": "object",
        "required": [
          "column",
          "order"
        ]
      },
      "DeviceQuery": {
        "properties": {
          "deviceIds": {
            "items": {
              "format": "uuid",
              "type": "string"
            },
            "type": "array",
            "maxItems": 500,
            "minItems": 1,
            "description": "Query devices by device ID."
          },
          "externalId": {
            "type": "string",
            "description": "Query devices by external ID."
          },
          "name": {
            "type": "string",
            "description": "Query devices by name."
          },
          "query": {
            "type": "string",
            "description": "Query partial device names (case-insensitive)."
          },
          "organizationId": {
            "type": "string",
            "description": "Query devices by organization ID."
          },
          "tags": {
            "title": "MultiTagSets",
            "description": "Query devices by tags.",
            "oneOf": [
              {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/TagSets"
                }
              },
              {
                "$ref": "#/components/schemas/TagSets"
              }
            ]
          },
          "fleetId": {
            "format": "uuid",
            "type": "string",
            "nullable": true,
            "description": "Query devices by fleet ID."
          },
          "enabled": {
            "type": "boolean",
            "description": "Query devices by enabled status."
          },
          "fullyConfigured": {
            "type": "boolean",
            "description": "Query devices by configured status."
          },
          "type": {
            "type": "string",
            "enum": [
              "default",
              "capture"
            ],
            "description": "Query devices by device type."
          },
          "count": {
            "type": "number",
            "format": "int64",
            "minimum": 0,
            "maximum": 1000,
            "description": "Limit the number of devices returned by this query (max 1000)."
          },
          "offset": {
            "type": "number",
            "format": "int64",
            "minimum": 0,
            "maximum": 9007199254740991,
            "description": "Paginate the results by specifying an offset."
          },
          "createdAfter": {
            "format": "date-time",
            "type": "string",
            "description": "Query devices created after this date."
          },
          "disabledBefore": {
            "format": "date-time",
            "type": "string",
            "description": "Query devices disabled (deleted) before this date."
          },
          "online": {
            "type": "boolean",
            "description": "Query online devices."
          },
          "fillOnlineStatus": {
            "type": "boolean",
            "description": "Include device online status in the response."
          },
          "fillLastSeen": {
            "type": "boolean",
            "description": "Include last seen timestamp in the response."
          },
          "sort": {
            "items": {
              "$ref": "#/components/schemas/DeviceDetailsSort"
            },
            "type": "array",
            "maxItems": 2,
            "description": "Sort order for the query results."
          },
          "hasExternalId": {
            "type": "boolean",
            "description": "Query devices that have an externalId."
          }
        },
        "type": "object"
      },
      "TagsResponse": {
        "properties": {
          "tags": {
            "title": "TagSets",
            "description": "A map of tag keys to an array of values",
            "type": "object",
            "additionalProperties": {
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          }
        },
        "type": "object",
        "required": [
          "tags"
        ]
      },
      "TagSets": {
        "title": "TagSets",
        "description": "A map of tag keys to an array of values",
        "type": "object",
        "additionalProperties": {
          "type": "array",
          "items": {
            "type": "string"
          }
        }
      }
    },
    "securitySchemes": {
      "bearerAuth": {
        "type": "http",
        "scheme": "bearer",
        "bearerFormat": "JWT"
      }
    }
  },
  "info": {
    "title": "Formant admin-api",
    "version": "1.357.8"
  },
  "openapi": "3.0.0",
  "paths": {
    "/devices/tags": {
      "post": {
        "operationId": "DeviceController.getTags",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DeviceQuery"
              }
            }
          },
          "description": "DeviceQuery",
          "required": false
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TagsResponse"
                }
              }
            },
            "description": ""
          }
        },
        "summary": "Get tags",
        "tags": [
          "Device"
        ],
        "description": "Get tags across all devices\nResource: devices\nAuthorized roles: viewer",
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    }
  },
  "servers": [
    {
      "url": "https://api.formant.io/v1/admin"
    }
  ]
}
```