List all WAF policies

GET https://api.ap1.datadoghq.com/api/v2/remote_config/products/asm/waf/policieshttps://api.ap2.datadoghq.com/api/v2/remote_config/products/asm/waf/policieshttps://api.datadoghq.eu/api/v2/remote_config/products/asm/waf/policieshttps://api.ddog-gov.com/api/v2/remote_config/products/asm/waf/policieshttps://api.us2.ddog-gov.com/api/v2/remote_config/products/asm/waf/policieshttps://api.datadoghq.com/api/v2/remote_config/products/asm/waf/policieshttps://api.us3.datadoghq.com/api/v2/remote_config/products/asm/waf/policieshttps://api.us5.datadoghq.com/api/v2/remote_config/products/asm/waf/policies

Overview

Retrieve a list of WAF policies.

Response

OK

Response object that includes a list of WAF policies.

Expand All

Field

Type

Description

data

[object]

The WAF policy data.

attributes

object

A WAF policy.

description [required]

string

Description of the WAF policy.

isDefault

boolean

Make this policy the default policy. The default policy is applied to every service not specifically assigned to another policy.

name [required]

string

The name of the WAF policy.

protectionPresets

[string]

Presets enabled on this policy.

rules

[object]

Rule overrides applied by the policy.

blocking [required]

boolean

When blocking is enabled, the rule will block the traffic matched by this rule.

enabled [required]

boolean

When false, this rule will not match any traffic.

extended_data_collection

boolean

When true, collects additional data from the WAF for this rule.

id [required]

string

Override the parameters for this WAF rule identifier.

rulesets

[object]

DEPRECATED: Deprecated: Ruleset overrides. Use protectionPresets instead.

blocking [required]

boolean

When blocking is enabled, the ruleset will block the traffic it matches.

enabled [required]

boolean

When false, this ruleset will not match any traffic.

id [required]

string

The identifier of the ruleset to override.

scope

[object]

The scope of the WAF policy.

env [required]

string

The environment scope for the WAF policy.

service [required]

string

The service scope for the WAF policy.

version

int64

Version of the WAF ruleset maintained by Datadog used by this policy. 0 is the default value.

id

string

The ID of the policy.

meta

object

Metadata associated with the WAF policy.

added_at

date-time

The date and time the WAF policy was created.

added_by

string

The handle of the user who created the WAF policy.

added_by_name

string

The name of the user who created the WAF policy.

modified_at

date-time

The date and time the WAF policy was last updated.

modified_by

string

The handle of the user who last updated the WAF policy.

modified_by_name

string

The name of the user who last updated the WAF policy.

type

enum

The type of the resource. The value should always be policy. Allowed enum values: policy

default: policy

{
  "data": [
    {
      "attributes": {
        "description": "Policy applied to internal web applications.",
        "isDefault": false,
        "name": "Internal Network Policy",
        "protectionPresets": [
          "attack-tools"
        ],
        "rules": [
          {
            "blocking": false,
            "enabled": true,
            "extended_data_collection": false,
            "id": "rasp-001-002"
          }
        ],
        "rulesets": [
          {
            "blocking": false,
            "enabled": true,
            "id": "attack_tool"
          }
        ],
        "scope": [
          {
            "env": "prod",
            "service": "billing-service"
          }
        ],
        "version": 0
      },
      "id": "2857c47d-1e3a-4300-8b2f-dc24089c084b",
      "meta": {
        "added_at": "2021-01-01T00:00:00Z",
        "added_by": "john.doe@datadoghq.com",
        "added_by_name": "John Doe",
        "modified_at": "2021-01-01T00:00:00Z",
        "modified_by": "john.doe@datadoghq.com",
        "modified_by_name": "John Doe"
      },
      "type": "policy"
    }
  ]
}

Not Authorized

API error response.

Expand All

Field

Type

Description

errors [required]

[string]

A list of errors.

{
  "errors": [
    "Bad Request"
  ]
}

Too many requests

API error response.

Expand All

Field

Type

Description

errors [required]

[string]

A list of errors.

{
  "errors": [
    "Bad Request"
  ]
}

Code Example

                  # Curl command
curl -X GET "https://api.ap1.datadoghq.com"https://api.ap2.datadoghq.com"https://api.datadoghq.eu"https://api.ddog-gov.com"https://api.us2.ddog-gov.com"https://api.datadoghq.com"https://api.us3.datadoghq.com"https://api.us5.datadoghq.com/api/v2/remote_config/products/asm/waf/policies" \ -H "Accept: application/json" \ -H "DD-API-KEY: ${DD_API_KEY}" \ -H "DD-APPLICATION-KEY: ${DD_APP_KEY}"