Cloudflare API | Resource Tagging › List Tagged Resources

Resource Tagging

resource_tagging

Methods

List Tagged Resources -> CursorPaginationAfter<{ id, etag, name, 2 more... } | { id, access_application_id, etag, 4 more... } | { id, etag, name, 2 more... } | 24 more...>
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: X-Auth-Email: user@example.com

The previous authorization scheme for interacting with the Cloudflare API. When possible, use API tokens instead of Global API keys.

Example: X-Auth-Key: 144c9defac04969c7bfad8efaa8ea194

path Parameters
account_id: string
(maxLength: 32, minLength: 32)

Identifier.

query Parameters
cursor: string
Optional

Cursor for pagination.

tag: Array<string>
Optional

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.

type: Array<
Optional

Filter by resource type. Can be repeated to filter by multiple types (OR logic). Example: ?type=zone&type=worker

"access_application"
"access_application_policy"
"access_group"
"account"
"ai_gateway"
"alerting_policy"
"alerting_webhook"
"api_gateway_operation"
"cloudflared_tunnel"
"custom_certificate"
"custom_hostname"
"d1_database"
"dns_record"
"durable_object_namespace"
"gateway_list"
"gateway_rule"
"image"
"kv_namespace"
"managed_client_certificate"
"queue"
"r2_bucket"
"resource_share"
"stream_live_input"
"stream_video"
"worker"
"worker_version"
"zone"
>
Response fields
errors: Array<{ code, message, documentation_url, 1 more... }>
messages: Array<{ code, message, documentation_url, 1 more... }>
success: true

Whether the API call was successful.

result: Array<{ id, etag, name, 2 more... } | { id, access_application_id, etag, 4 more... } | { id, etag, name, 2 more... } | 24 more...>
Optional
result_info: { count, cursor }
Optional
Request example
200Example
Resource Tagging

Account Tags

resource_tagging.account_tags

Methods

Get Tags For An Account Level Resource -> Envelope<{ id, etag, name, 2 more... } | { id, access_application_id, etag, 4 more... } | { id, etag, name, 2 more... } | 24 more...>
get/accounts/{account_id}/tags

Retrieves tags for a specific account-level resource.

Set Tags For An Account Level Resource -> Envelope<{ id, etag, name, 2 more... } | { id, access_application_id, etag, 4 more... } | { id, etag, name, 2 more... } | 24 more...>
put/accounts/{account_id}/tags

Creates or updates tags for a specific account-level resource.

Delete Tags From An Account Level Resource ->
delete/accounts/{account_id}/tags

Removes all tags from a specific account-level resource.

resource_tagging.keys

Methods

List Tag Keys -> CursorPaginationAfter<string>
get/accounts/{account_id}/tags/keys

Lists all distinct tag keys used across resources in an account.

resource_tagging.values

Methods

List Tag Values -> CursorPaginationAfter<string>
get/accounts/{account_id}/tags/values/{tag_key}

Lists all distinct values for a given tag key, optionally filtered by resource type.

resource_tagging.zone_tags

Methods

Get Tags For A Zone Level Resource -> Envelope<{ id, etag, name, 2 more... } | { id, access_application_id, etag, 4 more... } | { id, etag, name, 2 more... } | 24 more...>
get/zones/{zone_id}/tags

Retrieves tags for a specific zone-level resource.

Set Tags For A Zone Level Resource -> Envelope<{ id, etag, name, 2 more... } | { id, access_application_id, etag, 4 more... } | { id, etag, name, 2 more... } | 24 more...>
put/zones/{zone_id}/tags

Creates or updates tags for a specific zone-level resource. Replaces all existing tags for the resource.

Delete Tags From A Zone Level Resource ->
delete/zones/{zone_id}/tags

Removes all tags from a specific zone-level resource.