Skip to content

Commit d635be7

Browse files
committed
docs: add Resource Tagging product docs and changelog
1 parent eafa62a commit d635be7

11 files changed

Lines changed: 760 additions & 0 deletions

File tree

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
---
2+
title: Resource Tagging enters private beta
3+
description: Enterprise customers can now attach key-value metadata to Cloudflare resources via API.
4+
date: 2026-01-28
5+
---
6+
7+
Resource Tagging is now available in private beta for Enterprise customers. The feature enables attaching custom key-value metadata to Cloudflare resources for organization, access control, and billing attribution.
8+
9+
### What's included
10+
11+
- **7 supported resource types** -- `account`, `workers_script`, `workers_script_version`, `zone`, `managed_client_certificates`, `custom_hostnames`, and `access_application_policy`.
12+
- **Tag filtering** -- Query tagged resources with AND/OR logic, negation, and key-only matching via the `tag` query parameter.
13+
- **Account and zone-level endpoints** -- Full CRUD operations for both scopes.
14+
- **Account Owned Token (AOT) authentication** -- Tags use account-level tokens independent of individual users, ensuring automation workflows survive user lifecycle changes.
15+
16+
### Limitations
17+
18+
- API-only access (no Dashboard UI).
19+
- `PUT` replaces all tags on a resource (no partial update).
20+
- `DELETE` removes all tags (no single-tag delete).
21+
- Querying tags for an untagged resource returns `500` instead of `404`.
22+
23+
To get started, refer to the [Resource Tagging documentation](/resource-tagging/).
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
---
2+
title: Expanded roles and AOT provisioning updates
3+
description: Workers Admin and Tag Admin roles can now manage tags. AOTs are now provisioned on behalf of customers.
4+
date: 2026-03-25
5+
---
6+
7+
### Expanded role support
8+
9+
Tag management is no longer limited to Super Administrators. The following roles can now create, update, and delete tags:
10+
11+
- **Super Administrator**
12+
- **Workers Admin**
13+
- **Tag Admin**
14+
15+
### AOT provisioning change
16+
17+
Account Owned Tokens for tagging are now **created on behalf of customers** by the GRM team. Customers can view their tokens but cannot modify them directly. This simplifies onboarding and ensures tokens have the correct permissions from the start.
18+
19+
### Dashboard UI in development
20+
21+
The Stratus-based Dashboard UI for resource tagging is in active development. A staging preview is available behind the `resource-tagging-ui-experiments` gate. The Dashboard experience will complement (not replace) the existing API.
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
id: RsTagN
2+
name: Resource Tagging
3+
4+
entry:
5+
title: Resource Tagging
6+
url: /resource-tagging/
7+
wrap: true
8+
group: Core platform
9+
10+
meta:
11+
title: Cloudflare Resource Tagging docs
12+
description: Attach key-value metadata to Cloudflare resources for organization, access control, and billing attribution
13+
author: "@cloudflare"
Lines changed: 103 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,103 @@
1+
---
2+
title: Get started
3+
pcx_content_type: get-started
4+
sidebar:
5+
order: 2
6+
description: Enable Resource Tagging for a customer account and make your first API calls.
7+
---
8+
9+
This guide walks you through enabling tagging for an Enterprise account and verifying it works.
10+
11+
## Prerequisites
12+
13+
Before enabling Resource Tagging, ensure the account meets these requirements:
14+
15+
- **Enterprise plan** -- Resource Tagging is only available to Enterprise customers.
16+
- **Super Admin access** -- At least one user with the Super Administrator, Workers Admin, or Tag Admin role. These roles can create, update, and delete tags.
17+
- **API familiarity** -- The feature is API-only during the private beta. Customers must be comfortable making authenticated HTTP requests.
18+
19+
## 1. Request enablement
20+
21+
Contact PM Wesley Evans to request tagging enablement for a customer account:
22+
23+
- **G-Chat**: Join the "Tags for Cloudflare" space for real-time support
24+
- **Email**: wesley.evans@cloudflare.com
25+
26+
Provide the following:
27+
28+
- **Account ID** -- The customer's Cloudflare account ID, found in the Dashboard URL or via `GET /accounts`.
29+
- **Use case** -- A brief description of how the customer plans to use tagging (1-2 sentences).
30+
- **Products to be tagged** -- Which resource types the customer plans to tag initially (for example, `workers_script`, `zone`, `custom_hostnames`).
31+
32+
Wesley will enable the feature via [gates.cloudflare.com](https://gates.cloudflare.com). Typical turnaround is 1-2 business days.
33+
34+
## 2. Verify tagging is enabled
35+
36+
After receiving enablement confirmation, test the API:
37+
38+
```bash
39+
curl -X GET "https://api.cloudflare.com/client/v4/accounts/$ACCOUNT_ID/tags/keys" \
40+
-H "Authorization: Bearer $API_TOKEN" \
41+
-H "Content-Type: application/json"
42+
```
43+
44+
### Interpreting the response
45+
46+
| Response | Meaning | Action |
47+
| --- | --- | --- |
48+
| **200 OK** with `{"success": true, "result": [...]}` | Tagging is enabled. An empty array is normal if no tags exist yet. | Proceed with onboarding. |
49+
| **403** mentioning "permission" or "role" | The caller lacks required permissions. This is not a gating issue. | Verify the caller has Super Admin role or the token has `#com.cloudflare.api.account.tag.list` scope. |
50+
| **403** mentioning "feature" or "gate" | Tagging is not enabled for this account. | Confirm the Account ID matches what was provided to Wesley. Contact the Tags for Cloudflare G-Chat space. |
51+
| **401 Unauthorized** | Authentication failed. | Verify the token is valid, not expired, and formatted correctly in the `Authorization: Bearer` header. |
52+
| Any other response | Unexpected error. | Capture the full response body and escalate to the Tags for Cloudflare G-Chat space with the Account ID, request details, and timestamp. |
53+
54+
:::note
55+
Gate changes typically propagate within seconds, but may take up to 15 minutes in rare cases. If you receive a gating error immediately after enablement, wait briefly and retry.
56+
:::
57+
58+
## 3. Create your first tags
59+
60+
Set tags on a resource using `PUT`:
61+
62+
```bash
63+
curl -X PUT "https://api.cloudflare.com/client/v4/accounts/$ACCOUNT_ID/tags" \
64+
-H "Authorization: Bearer $API_TOKEN" \
65+
-H "Content-Type: application/json" \
66+
-d '{
67+
"resource_type": "workers_script",
68+
"resource_id": "'"$RESOURCE_ID"'",
69+
"tags": {
70+
"environment": "production",
71+
"team": "platform"
72+
}
73+
}'
74+
```
75+
76+
Then retrieve the tags:
77+
78+
```bash
79+
curl -X GET "https://api.cloudflare.com/client/v4/accounts/$ACCOUNT_ID/tags?resource_type=workers_script&resource_id=$RESOURCE_ID" \
80+
-H "Authorization: Bearer $API_TOKEN" \
81+
-H "Content-Type: application/json"
82+
```
83+
84+
## 4. List tagged resources
85+
86+
Query all tagged resources in the account, optionally filtering by tag:
87+
88+
```bash
89+
# All tagged resources
90+
curl -X GET "https://api.cloudflare.com/client/v4/accounts/$ACCOUNT_ID/tags/resources" \
91+
-H "Authorization: Bearer $API_TOKEN"
92+
93+
# Filter: only resources with environment=production
94+
curl -X GET "https://api.cloudflare.com/client/v4/accounts/$ACCOUNT_ID/tags/resources?tag=environment=production" \
95+
-H "Authorization: Bearer $API_TOKEN"
96+
```
97+
98+
## Next steps
99+
100+
- Learn the full [tag filtering syntax](/resource-tagging/how-to/filter-resources/) for complex queries.
101+
- Understand the [GET, merge, PUT workflow](/resource-tagging/how-to/manage-tags/#add-a-single-tag) for modifying individual tags.
102+
- Review [supported resource types](/resource-tagging/reference/resource-types/) and their required fields.
103+
- Review [API limits and validation rules](/resource-tagging/reference/limits/).
Lines changed: 115 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,115 @@
1+
---
2+
title: Filter resources by tag
3+
pcx_content_type: how-to
4+
sidebar:
5+
order: 2
6+
description: Query tagged resources using the tag filtering syntax.
7+
---
8+
9+
The `GET /accounts/{account_id}/tags/resources` endpoint supports tag filtering via the `tag` query parameter. Multiple `tag` parameters combine with **AND** logic.
10+
11+
:::caution
12+
Use `=` as the separator in tag filters (for example, `tag=key=value`), not `:`. The API error message references `:` but the implementation uses `=`.
13+
:::
14+
15+
## Filter types
16+
17+
### Key-only filter
18+
19+
Match resources that have a specific tag key, regardless of value.
20+
21+
```bash
22+
# All resources with an "environment" tag (any value)
23+
curl -X GET "https://api.cloudflare.com/client/v4/accounts/$ACCOUNT_ID/tags/resources?tag=environment" \
24+
-H "Authorization: Bearer $API_TOKEN"
25+
```
26+
27+
### Key-value filter
28+
29+
Match resources where a tag key has a specific value.
30+
31+
```bash
32+
# All resources with environment=production
33+
curl -X GET "https://api.cloudflare.com/client/v4/accounts/$ACCOUNT_ID/tags/resources?tag=environment=production" \
34+
-H "Authorization: Bearer $API_TOKEN"
35+
```
36+
37+
### Multiple values (OR)
38+
39+
Match resources where a tag key has any of the specified values. Separate values with commas.
40+
41+
```bash
42+
# environment=production OR environment=staging
43+
curl -X GET "https://api.cloudflare.com/client/v4/accounts/$ACCOUNT_ID/tags/resources?tag=environment=production,staging" \
44+
-H "Authorization: Bearer $API_TOKEN"
45+
```
46+
47+
Maximum of 10 OR values per filter (error code `1013` if exceeded).
48+
49+
### Negate key
50+
51+
Match resources that do **not** have a specific tag key.
52+
53+
```bash
54+
# All resources without an "archived" tag
55+
curl -X GET "https://api.cloudflare.com/client/v4/accounts/$ACCOUNT_ID/tags/resources?tag=!archived" \
56+
-H "Authorization: Bearer $API_TOKEN"
57+
```
58+
59+
### Negate key-value
60+
61+
Match resources where a tag key does **not** have a specific value.
62+
63+
```bash
64+
# All resources where region is NOT us-west-1
65+
curl -X GET "https://api.cloudflare.com/client/v4/accounts/$ACCOUNT_ID/tags/resources?tag=region!=us-west-1" \
66+
-H "Authorization: Bearer $API_TOKEN"
67+
```
68+
69+
## Combining filters
70+
71+
Multiple `tag` parameters combine with AND logic. All conditions must match.
72+
73+
```bash
74+
# Production resources in US regions, excluding archived
75+
curl -X GET "https://api.cloudflare.com/client/v4/accounts/$ACCOUNT_ID/tags/resources?tag=environment=production&tag=region=us-west-1,us-east-1&tag=!archived" \
76+
-H "Authorization: Bearer $API_TOKEN"
77+
```
78+
79+
Maximum of 20 tag filters per query (error code `1010` if exceeded).
80+
81+
## Discover available tags
82+
83+
### List all tag keys
84+
85+
```bash
86+
curl -X GET "https://api.cloudflare.com/client/v4/accounts/$ACCOUNT_ID/tags/keys" \
87+
-H "Authorization: Bearer $API_TOKEN"
88+
```
89+
90+
### List values for a key
91+
92+
```bash
93+
curl -X GET "https://api.cloudflare.com/client/v4/accounts/$ACCOUNT_ID/tags/values/environment" \
94+
-H "Authorization: Bearer $API_TOKEN"
95+
```
96+
97+
Optionally filter by resource type:
98+
99+
```bash
100+
curl -X GET "https://api.cloudflare.com/client/v4/accounts/$ACCOUNT_ID/tags/values/environment?type=workers_script" \
101+
-H "Authorization: Bearer $API_TOKEN"
102+
```
103+
104+
## Pagination
105+
106+
All list endpoints use cursor-based pagination with a fixed page size of 100 results.
107+
108+
When the response includes a non-null `result_info.cursor`, pass it as a query parameter to get the next page:
109+
110+
```bash
111+
curl -X GET "https://api.cloudflare.com/client/v4/accounts/$ACCOUNT_ID/tags/resources?tag=environment=production&cursor=$CURSOR" \
112+
-H "Authorization: Bearer $API_TOKEN"
113+
```
114+
115+
When `cursor` is `null`, you have reached the last page. Pagination works seamlessly with tag filters.

0 commit comments

Comments
 (0)