Skip to content
Start here

List account audit log product categories (Version 2)

client.accounts.logs.audit.productCategories(AuditProductCategoriesParams { account_id } params, RequestOptionsoptions?): SinglePage<AuditProductCategoriesResponse { label, products, value } >
GET/accounts/{account_id}/logs/audit/product_categories

Lists the available audit log product categories and the resource products each one expands to. Use these values with the product_category filter on the account audit logs endpoint.

Security
API Token

The preferred authorization scheme for interacting with the Cloudflare API. Create a token.

Example:Authorization: Bearer Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY
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
Accepted Permissions (at least one required)
Account Settings WriteAccount Settings Read
ParametersExpand Collapse
params: AuditProductCategoriesParams { account_id }
account_id: string

The unique id that identifies the account.

ReturnsExpand Collapse
AuditProductCategoriesResponse { label, products, value }

A predefined product category and the resource products it expands to.

label?: string

A human-readable label for the product category.

products?: Array<Product>

The resource products that the product category expands to.

label?: string

A human-readable label for the product.

value?: string

The resource_product value that the product category expands to.

value?: string

The product category identifier used with the product_category filter.

List account audit log product categories (Version 2)

import Cloudflare from 'cloudflare';

const client = new Cloudflare({
  apiToken: process.env['CLOUDFLARE_API_TOKEN'], // This is the default and can be omitted
});

// Automatically fetches more pages as needed.
for await (const auditProductCategoriesResponse of client.accounts.logs.audit.productCategories({
  account_id: 'a67e14daa5f8dceeb91fe5449ba496ef',
})) {
  console.log(auditProductCategoriesResponse.label);
}
{
  "errors": [
    {
      "message": "message"
    }
  ],
  "result": [
    {
      "label": "Zero Trust",
      "products": [
        {
          "label": "Gateway",
          "value": "gateway"
        }
      ],
      "value": "zerotrust"
    }
  ],
  "success": true
}
Returns Examples
{
  "errors": [
    {
      "message": "message"
    }
  ],
  "result": [
    {
      "label": "Zero Trust",
      "products": [
        {
          "label": "Gateway",
          "value": "gateway"
        }
      ],
      "value": "zerotrust"
    }
  ],
  "success": true
}