: Get a List of User-defined Tags
Focus
Focus

Get a List of User-defined Tags

Table of Contents

Get a List of User-defined Tags

Use the IoT Security API to retrieve a list of user-defined tags for devices.

Synopsis

URI/pub/v4.0/tag/list
HTTP MethodGET
FQDN<customer-name>.iot.paloaltonetworks.com

Description

Get a list of user-defined tags assigned to IoT devices.

Request Fields

The URL of this request contains the following parameters:
FieldDescription
source
(Required) This is the source of the user-defined tags assigned to IoT devices and must be followed by the string tenant.
customerid
(Required) The customer ID specifies the API call for a specific tenant.
The following value is a string.
Request to Get a List of Tags Example
curl 'https://acmecorp.iot.paloaltonetworks.com/pub/v4.0/tag/list?source=tenant&customerid=acmecorp' \ -H 'X-Key-Id: KEY_ID' \ -H 'X-Access-Key: ACCESS_KEY'

Success Response

Upon success, the HTTP response code is 200.
Success Response Example
{ "ver": "0.3" "api": "tagRule", "totalTags": 119, "tags": [ { "_id": { "tagId": "61d0cee45141f70700eb1612" }, "createDate": "2022-01-01T22:00:04.569Z", "filters": [], "tagId": "61d0cee45141f70700eb1612", "tagType": "Owner", "tagValue": "Joe", "tenantid": "8181175672931450770", "type": "custom" } … ] }

Error Response

Upon error, the reply includes an HTTP response code, an error message, and additional information describing the error. The HTTP response code is one of the following:
FieldDescription
400Bad Request. This occurs when an HTTP request contains an invalid query string.
403Forbidden access. Either the provided API Key is invalid or it does not have the required RBAC permissions to run this API.
429Too many requests. The number of requests for a list of user-defined tags exceeded the rate limit of 180 queries per minute per tenant.
500Internal server error. A unified status for API communication type errors.
Error Response Format
{code: STATUS_CODE, msg: GENERAL_MESSAGE}