List tag values
client.resourceTagging.values.list(stringtagKey, ValueListParams { account_id, cursor, type } params, RequestOptionsoptions?): CursorPaginationAfter<ValueListResponse>
GET/accounts/{account_id}/tags/values/{tag_key}
Lists all distinct values for a given tag key, optionally filtered by resource type.
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:
List tag values
import Cloudflare from 'cloudflare';
const client = new Cloudflare({
apiEmail: process.env['CLOUDFLARE_EMAIL'], // This is the default and can be omitted
apiKey: process.env['CLOUDFLARE_API_KEY'], // This is the default and can be omitted
});
// Automatically fetches more pages as needed.
for await (const valueListResponse of client.resourceTagging.values.list('environment', {
account_id: '023e105f4ecef8ad9ca31a8372d0c353',
})) {
console.log(valueListResponse);
}{
"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": [
"production",
"staging"
],
"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": [
"production",
"staging"
],
"result_info": {
"count": 20,
"cursor": "eyJhY2NvdW50X2lkIjoxMjM0NTY3ODkwfQ"
}
}