Skip to content
Start here

List tag key summary

client.resourceTagging.summary.get(SummaryGetParams { account_id, cursor } params, RequestOptionsoptions?): SummaryGetResponse { key, values }
GET/accounts/{account_id}/tags/summary

Lists all distinct tag keys and their distinct values across resources in 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
ParametersExpand Collapse
params: SummaryGetParams { account_id, cursor }
account_id: string

Path param: Identifier.

maxLength32
minLength32
cursor?: string

Query param: Cursor for pagination.

ReturnsExpand Collapse
SummaryGetResponse = Array<SummaryGetResponseItem>

Contains an array of tag keys with their distinct values.

key: string

A tag key.

values: Array<string>

All distinct values for this tag key.

List tag key summary

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
});

const summaries = await client.resourceTagging.summary.get({
  account_id: '023e105f4ecef8ad9ca31a8372d0c353',
});

console.log(summaries);
{
  "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": [
    {
      "key": "environment",
      "values": [
        "production",
        "staging"
      ]
    },
    {
      "key": "team",
      "values": [
        "engineering",
        "platform"
      ]
    }
  ],
  "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": [
    {
      "key": "environment",
      "values": [
        "production",
        "staging"
      ]
    },
    {
      "key": "team",
      "values": [
        "engineering",
        "platform"
      ]
    }
  ],
  "result_info": {
    "count": 20,
    "cursor": "eyJhY2NvdW50X2lkIjoxMjM0NTY3ODkwfQ"
  }
}