Skip to content
Start here

List fields

GET/{accounts_or_zones}/{account_or_zone_id}/logpush/datasets/{dataset_id}/fields

Lists all fields available for a dataset. The response result is. an object with key-value pairs, where keys are field names, and values are descriptions.

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)
Logs Read
Path ParametersExpand Collapse
dataset_id: "access_requests" or "audit_logs" or "audit_logs_v2" or 28 more

Name of the dataset. A list of supported datasets can be found on the Developer Docs.

One of the following:
"access_requests"
"audit_logs"
"audit_logs_v2"
"biso_user_actions"
"casb_findings"
"device_posture_results"
"dex_application_tests"
"dex_device_state_events"
"dlp_forensic_copies"
"dns_firewall_logs"
"dns_logs"
"email_security_alerts"
"firewall_events"
"gateway_dns"
"gateway_http"
"gateway_network"
"http_requests"
"ipsec_logs"
"magic_ids_detections"
"mcp_portal_logs"
"nel_reports"
"network_analytics_logs"
"page_shield_events"
"sinkhole_http_logs"
"spectrum_events"
"ssh_logs"
"warp_config_changes"
"warp_toggle_changes"
"workers_trace_events"
"zaraz_events"
"zero_trust_network_sessions"
account_id: optional string

The Account ID to use for this endpoint. Mutually exclusive with the Zone ID.

zone_id: optional string

The Zone ID to use for this endpoint. Mutually exclusive with the Account ID.

ReturnsExpand Collapse
errors: array of { code, message, documentation_url, source }
code: number
minimum1000
message: string
documentation_url: optional string
source: optional { pointer }
pointer: optional string
messages: array of { code, message, documentation_url, source }
code: number
minimum1000
message: string
documentation_url: optional string
source: optional { pointer }
pointer: optional string
success: true

Whether the API call was successful.

result: optional unknown

List fields

curl https://api.cloudflare.com/client/v4/$ACCOUNTS_OR_ZONES/$ACCOUNT_OR_ZONE_ID/logpush/datasets/$DATASET_ID/fields \
    -H "Authorization: Bearer $CLOUDFLARE_API_TOKEN"
{
  "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": {}
}
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": {}
}