List tagged resources
GET/accounts/{account_id}/tags/resources
Lists all tagged resources for an account.
Security
API Email + API Key
The previous authorization scheme for interacting with the Cloudflare API, used in conjunction with a Global API key.
Example:
The previous authorization scheme for interacting with the Cloudflare API. When possible, use API tokens instead of Global API keys.
Example:
Query Parameters
tag: optional array of string
Filter resources by tag criteria. This parameter can be repeated multiple times, with AND logic between parameters.
Supported syntax:
- Key-only:
tag=<key>- Resource must have the tag key (e.g.,tag=production) - Key-value:
tag=<key>=<value>- Resource must have the tag with specific value (e.g.,tag=env=prod) - Multiple values (OR):
tag=<key>=<v1>,<v2>- Resource must have tag with any of the values (e.g.,tag=env=prod,staging) - Negate key-only:
tag=!<key>- Resource must not have the tag key (e.g.,tag=!archived) - Negate key-value:
tag=<key>!=<value>- Resource must not have the tag with specific value (e.g.,tag=region!=us-west-1)
Multiple tag parameters are combined with AND logic.
List tagged resources
curl https://api.cloudflare.com/client/v4/accounts/$ACCOUNT_ID/tags/resources \
-H "X-Auth-Email: $CLOUDFLARE_EMAIL" \
-H "X-Auth-Key: $CLOUDFLARE_API_KEY"{
"errors": [
{
"code": 1000,
"message": "message",
"documentation_url": "documentation_url",
"source": {
"pointer": "pointer"
}
}
],
"messages": [
{
"code": 1000,
"message": "message",
"documentation_url": "documentation_url",
"source": {
"pointer": "pointer"
}
}
],
"success": true,
"result": [
{
"id": "023e105f4ecef8ad9ca31a8372d0c353",
"etag": "v1:RBNvo1WzZ4oRRq0W9-hkng",
"name": "my-worker-script",
"tags": {
"environment": "production",
"team": "engineering"
},
"type": "access_application"
}
],
"result_info": {
"count": 20,
"cursor": "eyJhY2NvdW50X2lkIjoxMjM0NTY3ODkwfQ"
}
}Returns Examples
{
"errors": [
{
"code": 1000,
"message": "message",
"documentation_url": "documentation_url",
"source": {
"pointer": "pointer"
}
}
],
"messages": [
{
"code": 1000,
"message": "message",
"documentation_url": "documentation_url",
"source": {
"pointer": "pointer"
}
}
],
"success": true,
"result": [
{
"id": "023e105f4ecef8ad9ca31a8372d0c353",
"etag": "v1:RBNvo1WzZ4oRRq0W9-hkng",
"name": "my-worker-script",
"tags": {
"environment": "production",
"team": "engineering"
},
"type": "access_application"
}
],
"result_info": {
"count": 20,
"cursor": "eyJhY2NvdW50X2lkIjoxMjM0NTY3ODkwfQ"
}
}