---
updatedAt: 2026-08-12T18:10:24.000Z
agentTools:
  siteIndex: https://techdocs.akamai.com/llms.txt
  projectIndex: https://techdocs.akamai.com/application-security/llms.txt
---

# List AI rules

__All products__ Returns all AI rules for the security policy. AI rules are WAF rules generated and refined using machine learning.

# OpenAPI definition

```json
{
  "externalDocs": {
    "description": "See documentation for Akamai's Application Security API",
    "url": "https://techdocs.akamai.com/application-security/reference"
  },
  "info": {
    "license": {
      "name": "Apache 2.0",
      "url": "https://www.apache.org/licenses/LICENSE-2.0.html"
    },
    "title": "Security policies",
    "version": "v1"
  },
  "openapi": "3.0.0",
  "paths": {
    "/configs/{configId}/versions/{versionNumber}/security-policies/{policyId}/ai-rules": {
      "get": {
        "description": "__All products__ Returns all AI rules for the security policy. AI rules are WAF rules generated and refined using machine learning.",
        "externalDocs": {
          "description": "See documentation for this operation in Akamai's Application Security API",
          "url": "https://techdocs.akamai.com/application-security/reference/get-policy-ai-rules"
        },
        "operationId": "get-policy-ai-rules",
        "parameters": [
          {
            "description": "For customers who manage more than one account, this [runs the operation from another account](https://techdocs.akamai.com/developer/docs/manage-many-accounts-with-one-api-client). The Identity and Access Management API provides a [list of available account switch keys](https://techdocs.akamai.com/iam-api/reference/get-client-account-switch-keys).",
            "in": "query",
            "name": "accountSwitchKey",
            "required": false,
            "schema": {
              "example": "1-5C0YLB:1-8BYUX",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "example": {
                  "aiRuleStatus": "ENABLED",
                  "aiRules": [
                    {
                      "action": "alert",
                      "conditionExceptions": [],
                      "riskScoreGroup": "SQL_AI",
                      "ruleDescription": "Detects SQL injection attack patterns identified by AI analysis.",
                      "ruleId": 3001000,
                      "ruleVersion": 1,
                      "title": "AI-Detected SQL Injection Attack"
                    },
                    {
                      "action": "deny",
                      "conditionExceptions": [],
                      "riskScoreGroup": "XSS_AI",
                      "ruleDescription": "Detects XSS attack patterns identified by AI analysis.",
                      "ruleId": 3001001,
                      "ruleVersion": 2,
                      "title": "AI-Detected Cross-site Scripting (XSS) Attack"
                    },
                    {
                      "action": "alert",
                      "conditionExceptions": [
                        {
                          "exception": {
                            "specificHeaderCookieParamXmlOrJsonNames": [
                              {
                                "names": [
                                  "safe-header"
                                ],
                                "selector": "REQUEST_HEADERS_NAMES",
                                "wildcard": false
                              }
                            ]
                          }
                        }
                      ],
                      "riskScoreGroup": "LFI_AI",
                      "ruleDescription": "Detects local file inclusion attack patterns identified by AI analysis.",
                      "ruleId": 3001002,
                      "ruleVersion": 1,
                      "title": "AI-Detected Local File Inclusion (LFI) Attack"
                    },
                    {
                      "action": "deny",
                      "conditionExceptions": [],
                      "riskScoreGroup": "RCE_AI",
                      "ruleDescription": "Detects remote code execution attack patterns identified by AI analysis.",
                      "ruleId": 3001003,
                      "ruleVersion": 1,
                      "title": "AI-Detected Remote Code Execution (RCE) Attack"
                    },
                    {
                      "action": "none",
                      "conditionExceptions": [],
                      "riskScoreGroup": "CMDI_AI",
                      "ruleDescription": "Detects command injection attack patterns identified by AI analysis.",
                      "ruleId": 3001004,
                      "ruleVersion": 3,
                      "title": "AI-Detected Command Injection Attack"
                    }
                  ]
                },
                "schema": {
                  "additionalProperties": false,
                  "description": "The AI rules for the security policy.",
                  "properties": {
                    "aiRuleStatus": {
                      "description": "Whether AI rules are active for the policy, either `ENABLED`, `DISABLED`, or `NOT_ENROLLED`. ",
                      "enum": [
                        "ENABLED",
                        "DISABLED",
                        "NOT_ENROLLED"
                      ],
                      "type": "string"
                    },
                    "aiRules": {
                      "description": "The list of AI rules. Absent when `aiRuleStatus` is `NOT_ENROLLED`.",
                      "items": {
                        "additionalProperties": false,
                        "description": "Describes the fields of an AI rule.",
                        "properties": {
                          "action": {
                            "description": "The action to take for an AI rule, either `alert`, `deny`, or `none`. If the action is `none`, the rule is inactive in the policy.",
                            "enum": [
                              "alert",
                              "deny",
                              "none"
                            ],
                            "type": "string",
                            "x-akamai": {
                              "file-path": "schemas/ai-rule-action.yaml"
                            }
                          },
                          "conditionExceptions": {
                            "description": "The condition exceptions applied to this AI rule.",
                            "items": {
                              "additionalProperties": false,
                              "description": "The GET Response JSON for conditions and exceptions.",
                              "properties": {
                                "advancedExceptions": {
                                  "additionalProperties": false,
                                  "description": "Describes the advanced exception fields that allow you to conditionally exclude requests from inspection. This is only available for attack groups and when the advanced exception feature is enabled.",
                                  "properties": {
                                    "conditionOperator": {
                                      "description": "Use `OR` to match any condition, or `AND` to match on all conditions.",
                                      "enum": [
                                        "OR",
                                        "AND"
                                      ],
                                      "type": "string"
                                    },
                                    "conditions": {
                                      "description": "The list of match conditions.",
                                      "items": {
                                        "additionalProperties": false,
                                        "description": "Describes what conditions can be set for an action to occur.",
                                        "properties": {
                                          "caseSensitive": {
                                            "description": "Whether to consider the case-sensitivity of the provided query parameter `value`. This only applies to the `uriQueryMatch` condition `type`.",
                                            "type": "boolean"
                                          },
                                          "clientLists": {
                                            "description": "The clientLists that trigger the condition. This only applies to the `clientListMatch` condition `type`.",
                                            "items": {
                                              "type": "string"
                                            },
                                            "minItems": 0,
                                            "type": "array"
                                          },
                                          "extensions": {
                                            "description": "The file extensions that trigger the condition. This only applies to the `extensionMatch` condition `type`.",
                                            "items": {
                                              "type": "string"
                                            },
                                            "type": "array"
                                          },
                                          "filenames": {
                                            "description": "The filenames that trigger the condition. This only applies to the `filenameMatch` condition `type`.",
                                            "items": {
                                              "type": "string"
                                            },
                                            "type": "array"
                                          },
                                          "header": {
                                            "description": "The HTTP header that triggers the condition. This only applies to the `requestHeaderMatch` condition `type`.",
                                            "type": "string"
                                          },
                                          "hosts": {
                                            "description": "The hostnames that trigger the condition. This only applies to the `hostMatch` condition `type`.",
                                            "items": {
                                              "type": "string"
                                            },
                                            "type": "array"
                                          },
                                          "ips": {
                                            "description": "The IPs that trigger the condition. This only applies to the `ipMatch` condition `type`.",
                                            "items": {
                                              "type": "string"
                                            },
                                            "type": "array"
                                          },
                                          "methods": {
                                            "description": "The HTTP request methods that trigger the condition. The possible values are `GET`, `POST`, `HEAD`, `PUT`, `DELETE`, `OPTIONS`, `TRACE`, `CONNECT` and `PATCH`. This only applies to the `requestMethodMatch` condition `type`.",
                                            "items": {
                                              "enum": [
                                                "GET",
                                                "POST",
                                                "HEAD",
                                                "PUT",
                                                "DELETE",
                                                "OPTIONS",
                                                "TRACE",
                                                "CONNECT",
                                                "PATCH"
                                              ],
                                              "type": "string"
                                            },
                                            "type": "array"
                                          },
                                          "name": {
                                            "description": "The query parameter name that triggers the condition. This only applies to the `uriQueryMatch` condition `type`.",
                                            "type": "string"
                                          },
                                          "nameCase": {
                                            "description": "Whether to consider the case-sensitivity of the provided query parameter `name`. This only applies to the `uriQueryMatch` condition `type`.",
                                            "type": "boolean"
                                          },
                                          "paths": {
                                            "description": "The paths that trigger the condition. This only applies to the  `pathMatch` condition `type`.",
                                            "items": {
                                              "type": "string"
                                            },
                                            "type": "array"
                                          },
                                          "positiveMatch": {
                                            "description": "Whether the condition should trigger on a match (`true`) or a lack of match (`false`).",
                                            "type": "boolean"
                                          },
                                          "type": {
                                            "description": "The condition type to match on. See [Export condition type values](https://techdocs.akamai.com/application-security/reference/etval).",
                                            "enum": [
                                              "hostMatch",
                                              "pathMatch",
                                              "filenameMatch",
                                              "extensionMatch",
                                              "uriQueryMatch",
                                              "ipMatch",
                                              "requestMethodMatch",
                                              "requestHeaderMatch",
                                              "clientListMatch"
                                            ],
                                            "type": "string"
                                          },
                                          "useHeaders": {
                                            "description": "Whether the condition should include `X-Forwarded-For` (XFF) header. This applies to the `ipMatch` and `clientListMatch` condition `type`.",
                                            "type": "boolean"
                                          },
                                          "value": {
                                            "description": "The query parameter value if the condition `type` is `uriQueryMatch` and header value if the condition `type` is `requestHeaderMatch`. This only applies when the condition `type` is `uriQueryMatch` or `requestHeaderMatch`.",
                                            "type": "string"
                                          },
                                          "valueCase": {
                                            "description": "Whether to consider the case-sensitivity of the provided header `value`. This only applies to the `requestHeaderMatch` condition `type`.",
                                            "type": "boolean"
                                          },
                                          "valueWildcard": {
                                            "description": "Whether the provided header `value` is a wildcard. This only applies to the `requestHeaderMatch` condition `type`.",
                                            "type": "boolean"
                                          },
                                          "wildcard": {
                                            "description": "Whether the provided query parameter `value` is a wildcard. This only applies to the `uriQueryMatch` condition `type`.",
                                            "type": "boolean"
                                          }
                                        },
                                        "required": [
                                          "type",
                                          "positiveMatch"
                                        ],
                                        "type": "object",
                                        "x-akamai": {
                                          "file-path": "schemas/condition.yaml"
                                        }
                                      },
                                      "type": "array"
                                    },
                                    "headerCookieOrParamValues": {
                                      "description": "The list of excepted values in headers, cookies, or query parameters.",
                                      "items": {
                                        "additionalProperties": false,
                                        "properties": {
                                          "criteria": {
                                            "description": "A list of criteria to limit the scope of this exception.",
                                            "items": {
                                              "additionalProperties": false,
                                              "description": "The hostname and path criteria to limit the scope of exception.",
                                              "properties": {
                                                "hostnames": {
                                                  "description": "The list of excepted hostnames.",
                                                  "items": {
                                                    "type": "string"
                                                  },
                                                  "type": "array"
                                                },
                                                "names": {
                                                  "description": "The list of excepted names.",
                                                  "items": {
                                                    "type": "string"
                                                  },
                                                  "type": "array"
                                                },
                                                "paths": {
                                                  "description": "The list of excepted paths.",
                                                  "items": {
                                                    "type": "string"
                                                  },
                                                  "type": "array"
                                                },
                                                "values": {
                                                  "description": "The list of excepted values.",
                                                  "items": {
                                                    "type": "string"
                                                  },
                                                  "type": "array"
                                                }
                                              },
                                              "required": [
                                                "paths",
                                                "names",
                                                "values"
                                              ],
                                              "type": "object",
                                              "x-akamai": {
                                                "file-path": "schemas/criteria.yaml"
                                              }
                                            },
                                            "type": "array"
                                          },
                                          "valueWildcard": {
                                            "default": false,
                                            "description": "Whether the provided header `name` is a wildcard.",
                                            "type": "boolean"
                                          },
                                          "values": {
                                            "description": "The list of request attribute names.",
                                            "items": {
                                              "type": "string"
                                            },
                                            "type": "array"
                                          }
                                        },
                                        "required": [
                                          "values"
                                        ],
                                        "type": "object"
                                      },
                                      "type": "array"
                                    },
                                    "specificHeaderCookieOrParamNameValue": {
                                      "description": "Contains details about the excepted name-value pairs in a request.",
                                      "items": {
                                        "additionalProperties": false,
                                        "properties": {
                                          "criteria": {
                                            "description": "A list of criteria to limit the scope of this exception.",
                                            "items": {
                                              "additionalProperties": false,
                                              "description": "The hostname and path criteria to limit the scope of exception.",
                                              "properties": {
                                                "hostnames": {
                                                  "description": "The list of excepted hostnames.",
                                                  "items": {
                                                    "type": "string"
                                                  },
                                                  "type": "array"
                                                },
                                                "names": {
                                                  "description": "The list of excepted names.",
                                                  "items": {
                                                    "type": "string"
                                                  },
                                                  "type": "array"
                                                },
                                                "paths": {
                                                  "description": "The list of excepted paths.",
                                                  "items": {
                                                    "type": "string"
                                                  },
                                                  "type": "array"
                                                },
                                                "values": {
                                                  "description": "The list of excepted values.",
                                                  "items": {
                                                    "type": "string"
                                                  },
                                                  "type": "array"
                                                }
                                              },
                                              "required": [
                                                "paths",
                                                "names",
                                                "values"
                                              ],
                                              "type": "object",
                                              "x-akamai": {
                                                "file-path": "schemas/criteria.yaml"
                                              }
                                            },
                                            "type": "array"
                                          },
                                          "namesValues": {
                                            "description": "A list of name-value pairs to except.",
                                            "items": {
                                              "additionalProperties": false,
                                              "properties": {
                                                "names": {
                                                  "description": "The list of request attribute names.",
                                                  "items": {
                                                    "type": "string"
                                                  },
                                                  "type": "array"
                                                },
                                                "values": {
                                                  "description": "The list of request attribute values.",
                                                  "items": {
                                                    "type": "string"
                                                  },
                                                  "type": "array"
                                                }
                                              },
                                              "required": [
                                                "names"
                                              ],
                                              "type": "object"
                                            },
                                            "type": "array"
                                          },
                                          "selector": {
                                            "description": "The request attribute to exclude from inspection. See [Exception selector values](https://techdocs.akamai.com/application-security/reference/exception-selector-values).",
                                            "enum": [
                                              "REQUEST_COOKIES",
                                              "JSON_PAIRS",
                                              "XML_PAIRS",
                                              "ARGS",
                                              "REQUEST_HEADERS"
                                            ],
                                            "type": "string"
                                          },
                                          "valueWildcard": {
                                            "default": false,
                                            "description": "Whether the provided header `value` is a wildcard.",
                                            "type": "boolean"
                                          },
                                          "wildcard": {
                                            "default": false,
                                            "description": "Whether the provided header `name` is a wildcard.",
                                            "type": "boolean"
                                          }
                                        },
                                        "required": [
                                          "namesValues",
                                          "selector"
                                        ],
                                        "type": "object"
                                      },
                                      "type": "array"
                                    },
                                    "specificHeaderCookieParamXmlOrJsonNames": {
                                      "description": "Describes the advanced exception fields that allow you to conditionally exclude requests from inspection. This is only available for attack groups and when the advanced exception feature is enabled.",
                                      "items": {
                                        "additionalProperties": false,
                                        "properties": {
                                          "criteria": {
                                            "description": "A list of criteria to limit the scope of this exception.",
                                            "items": {
                                              "additionalProperties": false,
                                              "description": "The hostname and path criteria to limit the scope of exception.",
                                              "properties": {
                                                "hostnames": {
                                                  "description": "The list of excepted hostnames.",
                                                  "items": {
                                                    "type": "string"
                                                  },
                                                  "type": "array"
                                                },
                                                "names": {
                                                  "description": "The list of excepted names.",
                                                  "items": {
                                                    "type": "string"
                                                  },
                                                  "type": "array"
                                                },
                                                "paths": {
                                                  "description": "The list of excepted paths.",
                                                  "items": {
                                                    "type": "string"
                                                  },
                                                  "type": "array"
                                                },
                                                "values": {
                                                  "description": "The list of excepted values.",
                                                  "items": {
                                                    "type": "string"
                                                  },
                                                  "type": "array"
                                                }
                                              },
                                              "required": [
                                                "paths",
                                                "names",
                                                "values"
                                              ],
                                              "type": "object",
                                              "x-akamai": {
                                                "file-path": "schemas/criteria.yaml"
                                              }
                                            },
                                            "type": "array"
                                          },
                                          "names": {
                                            "description": "The list of request attribute names.",
                                            "items": {
                                              "type": "string"
                                            },
                                            "type": "array"
                                          },
                                          "selector": {
                                            "description": "The request attribute to exclude from inspection. See [Exception selector values](https://techdocs.akamai.com/application-security/reference/exception-selector-values).",
                                            "enum": [
                                              "ARGS_NAMES",
                                              "ARGS",
                                              "REQUEST_HEADERS_NAMES",
                                              "REQUEST_HEADERS",
                                              "REQUEST_COOKIES_NAMES",
                                              "REQUEST_COOKIES",
                                              "JSON_NAMES",
                                              "JSON_PAIRS",
                                              "XML_PAIRS",
                                              "REQUEST_PROTOCOL",
                                              "REQUEST_METHOD",
                                              "REQUEST_URI",
                                              "QUERY_STRING",
                                              "REQUEST_FILENAME",
                                              "REQUEST_PATH_SEGMENT",
                                              "REQUEST_BODY",
                                              "REQBODY_PROCESSOR_ERROR",
                                              "FILES_NAMES"
                                            ],
                                            "type": "string"
                                          },
                                          "wildcard": {
                                            "default": false,
                                            "description": "Whether the provided header `name` is a wildcard.",
                                            "type": "boolean"
                                          }
                                        },
                                        "required": [
                                          "selector"
                                        ],
                                        "type": "object"
                                      },
                                      "type": "array"
                                    }
                                  },
                                  "type": "object",
                                  "x-akamai": {
                                    "file-path": "schemas/advanced-exception.yaml"
                                  }
                                },
                                "conditions": {
                                  "description": "The conditions list for a rule.",
                                  "items": {
                                    "additionalProperties": false,
                                    "description": "Describes what conditions can be set for an action to occur.",
                                    "properties": {
                                      "caseSensitive": {
                                        "description": "Whether to consider the case-sensitivity of the provided query parameter `value`. This only applies to the `uriQueryMatch` condition `type`.",
                                        "type": "boolean"
                                      },
                                      "clientLists": {
                                        "description": "The clientLists that trigger the condition. This only applies to the `clientListMatch` condition `type`.",
                                        "items": {
                                          "type": "string"
                                        },
                                        "minItems": 0,
                                        "type": "array"
                                      },
                                      "extensions": {
                                        "description": "The file extensions that trigger the condition. This only applies to the `extensionMatch` condition `type`.",
                                        "items": {
                                          "type": "string"
                                        },
                                        "type": "array"
                                      },
                                      "filenames": {
                                        "description": "The filenames that trigger the condition. This only applies to the `filenameMatch` condition `type`.",
                                        "items": {
                                          "type": "string"
                                        },
                                        "type": "array"
                                      },
                                      "header": {
                                        "description": "The HTTP header that triggers the condition. This only applies to the `requestHeaderMatch` condition `type`.",
                                        "type": "string"
                                      },
                                      "hosts": {
                                        "description": "The hostnames that trigger the condition. This only applies to the `hostMatch` condition `type`.",
                                        "items": {
                                          "type": "string"
                                        },
                                        "type": "array"
                                      },
                                      "ips": {
                                        "description": "The IPs that trigger the condition. This only applies to the `ipMatch` condition `type`.",
                                        "items": {
                                          "type": "string"
                                        },
                                        "type": "array"
                                      },
                                      "methods": {
                                        "description": "The HTTP request methods that trigger the condition. The possible values are `GET`, `POST`, `HEAD`, `PUT`, `DELETE`, `OPTIONS`, `TRACE`, `CONNECT` and `PATCH`. This only applies to the `requestMethodMatch` condition `type`.",
                                        "items": {
                                          "enum": [
                                            "GET",
                                            "POST",
                                            "HEAD",
                                            "PUT",
                                            "DELETE",
                                            "OPTIONS",
                                            "TRACE",
                                            "CONNECT",
                                            "PATCH"
                                          ],
                                          "type": "string"
                                        },
                                        "type": "array"
                                      },
                                      "name": {
                                        "description": "The query parameter name that triggers the condition. This only applies to the `uriQueryMatch` condition `type`.",
                                        "type": "string"
                                      },
                                      "nameCase": {
                                        "description": "Whether to consider the case-sensitivity of the provided query parameter `name`. This only applies to the `uriQueryMatch` condition `type`.",
                                        "type": "boolean"
                                      },
                                      "paths": {
                                        "description": "The paths that trigger the condition. This only applies to the  `pathMatch` condition `type`.",
                                        "items": {
                                          "type": "string"
                                        },
                                        "type": "array"
                                      },
                                      "positiveMatch": {
                                        "description": "Whether the condition should trigger on a match (`true`) or a lack of match (`false`).",
                                        "type": "boolean"
                                      },
                                      "type": {
                                        "description": "The condition type to match on. See [Export condition type values](https://techdocs.akamai.com/application-security/reference/etval).",
                                        "enum": [
                                          "hostMatch",
                                          "pathMatch",
                                          "filenameMatch",
                                          "extensionMatch",
                                          "uriQueryMatch",
                                          "ipMatch",
                                          "requestMethodMatch",
                                          "requestHeaderMatch",
                                          "clientListMatch"
                                        ],
                                        "type": "string"
                                      },
                                      "useHeaders": {
                                        "description": "Whether the condition should include `X-Forwarded-For` (XFF) header. This applies to the `ipMatch` and `clientListMatch` condition `type`.",
                                        "type": "boolean"
                                      },
                                      "value": {
                                        "description": "The query parameter value if the condition `type` is `uriQueryMatch` and header value if the condition `type` is `requestHeaderMatch`. This only applies when the condition `type` is `uriQueryMatch` or `requestHeaderMatch`.",
                                        "type": "string"
                                      },
                                      "valueCase": {
                                        "description": "Whether to consider the case-sensitivity of the provided header `value`. This only applies to the `requestHeaderMatch` condition `type`.",
                                        "type": "boolean"
                                      },
                                      "valueWildcard": {
                                        "description": "Whether the provided header `value` is a wildcard. This only applies to the `requestHeaderMatch` condition `type`.",
                                        "type": "boolean"
                                      },
                                      "wildcard": {
                                        "description": "Whether the provided query parameter `value` is a wildcard. This only applies to the `uriQueryMatch` condition `type`.",
                                        "type": "boolean"
                                      }
                                    },
                                    "required": [
                                      "type",
                                      "positiveMatch"
                                    ],
                                    "type": "object",
                                    "x-akamai": {
                                      "file-path": "schemas/condition.yaml"
                                    }
                                  },
                                  "type": "array"
                                },
                                "exception": {
                                  "additionalProperties": false,
                                  "description": "Describes the exception fields that allow you to conditionally exclude requests from inspection.",
                                  "properties": {
                                    "anyHeaderCookieOrParam": {
                                      "description": "The list of request attributes to treat as rule or attack group exceptions. The possible values are `REQUEST_COOKIES`, `JSON_PAIRS` for a JSON parameter, `XML_PAIRS` for an XML parameter, `ARGS` for a request parameter, and `REQUEST_HEADERS` for a request header. Use this option if you can't get an exhaustive list of elements to exclude or the list is too large. You can exclude several attributes.",
                                      "items": {
                                        "enum": [
                                          "REQUEST_COOKIES",
                                          "JSON_PAIRS",
                                          "XML_PAIRS",
                                          "ARGS",
                                          "REQUEST_HEADERS"
                                        ],
                                        "type": "string"
                                      },
                                      "type": "array"
                                    },
                                    "headerCookieOrParamValues": {
                                      "description": "The list of excepted values in headers, cookies, or query parameters.",
                                      "items": {
                                        "type": "string"
                                      },
                                      "type": "array"
                                    },
                                    "specificHeaderCookieOrParamNameValue": {
                                      "additionalProperties": false,
                                      "description": "Contains details about the excepted name-value pair in a request.",
                                      "properties": {
                                        "name": {
                                          "description": "The name of the request attribute.",
                                          "type": "string"
                                        },
                                        "selector": {
                                          "description": "The request attribute that includes the excepted name-value pair. Either `REQUEST_COOKIES`, `JSON_PAIRS` for a JSON parameter, `XML_PAIRS` for an XML parameter, `ARGS` for a request parameter, or `REQUEST_HEADERS` for a request header.",
                                          "enum": [
                                            "REQUEST_COOKIES",
                                            "JSON_PAIRS",
                                            "XML_PAIRS",
                                            "ARGS",
                                            "REQUEST_HEADERS"
                                          ],
                                          "type": "string"
                                        },
                                        "value": {
                                          "description": "The value of the request attribute.",
                                          "type": "string"
                                        }
                                      },
                                      "required": [
                                        "name",
                                        "selector",
                                        "value"
                                      ],
                                      "type": "object"
                                    },
                                    "specificHeaderCookieOrParamNames": {
                                      "additionalProperties": false,
                                      "description": "Contains details about the excepted request attribute name.",
                                      "properties": {
                                        "names": {
                                          "description": "The list of request attribute names.",
                                          "items": {
                                            "type": "string"
                                          },
                                          "type": "array"
                                        },
                                        "selector": {
                                          "description": "The request attribute that includes the excepted name. Either `REQUEST_COOKIES`, `JSON_PAIRS` for a JSON parameter, `XML_PAIRS` for an XML parameter, `ARGS` for a request parameter, or `REQUEST_HEADERS` for a request header.",
                                          "enum": [
                                            "REQUEST_COOKIES",
                                            "JSON_PAIRS",
                                            "XML_PAIRS",
                                            "ARGS",
                                            "REQUEST_HEADERS"
                                          ],
                                          "type": "string"
                                        }
                                      },
                                      "required": [
                                        "names",
                                        "selector"
                                      ],
                                      "type": "object"
                                    },
                                    "specificHeaderCookieOrParamPrefix": {
                                      "additionalProperties": false,
                                      "description": "Contains details about the excepted request attribute name prefix.",
                                      "properties": {
                                        "prefix": {
                                          "description": "The request attribute name prefix.",
                                          "type": "string"
                                        },
                                        "selector": {
                                          "description": "The request attribute that includes the excepted name prefix. Either `REQUEST_COOKIES`, `JSON_PAIRS` for a JSON parameter, `XML_PAIRS` for an XML parameter, `ARGS` for a request parameter, or `REQUEST_HEADERS` for a request header.",
                                          "enum": [
                                            "REQUEST_COOKIES",
                                            "JSON_PAIRS",
                                            "XML_PAIRS",
                                            "ARGS",
                                            "REQUEST_HEADERS"
                                          ],
                                          "type": "string"
                                        }
                                      },
                                      "required": [
                                        "prefix",
                                        "selector"
                                      ],
                                      "type": "object"
                                    },
                                    "specificHeaderCookieParamXmlOrJsonNames": {
                                      "description": "Contains details about the excepted request attribute names. This is only available for attack groups and when advanced exception is not enabled.",
                                      "items": {
                                        "additionalProperties": false,
                                        "properties": {
                                          "names": {
                                            "description": "Lists request attribute names, required with several `selector` options. With `wildcard` enabled, `*` represents a sequence and `?` represents any single character. For example, `*` matches any name, and `*session` matches a subset.",
                                            "items": {
                                              "type": "string"
                                            },
                                            "type": "array"
                                          },
                                          "selector": {
                                            "description": "The request attribute to exclude from inspection. The following selectors require a set of `names`: `ARGS_NAMES`, `ARGS`, `REQUEST_HEADERS_NAMES`, `REQUEST_HEADERS`, `REQUEST_COOKIES_NAMES`, `REQUEST_COOKIES`, `JSON_NAMES`, `JSON_PAIRS`, and `XML_PAIRS`. See [Exception selector values](https://techdocs.akamai.com/application-security/reference/exception-selector-values).",
                                            "enum": [
                                              "ARGS_NAMES",
                                              "ARGS",
                                              "REQUEST_HEADERS_NAMES",
                                              "REQUEST_HEADERS",
                                              "REQUEST_COOKIES_NAMES",
                                              "REQUEST_COOKIES",
                                              "JSON_NAMES",
                                              "JSON_PAIRS",
                                              "XML_PAIRS",
                                              "REQUEST_PROTOCOL",
                                              "REQUEST_METHOD",
                                              "REQUEST_URI",
                                              "QUERY_STRING",
                                              "REQUEST_FILENAME",
                                              "REQUEST_PATH_SEGMENT",
                                              "REQUEST_BODY",
                                              "REQBODY_PROCESSOR_ERROR",
                                              "FILES_NAMES"
                                            ],
                                            "type": "string"
                                          },
                                          "wildcard": {
                                            "default": false,
                                            "description": "Whether you can specify wildcards to flexibly match `names`, either `*` for any set of characters, or `?` for any single character.",
                                            "type": "boolean"
                                          }
                                        },
                                        "required": [
                                          "selector"
                                        ],
                                        "type": "object"
                                      },
                                      "type": "array"
                                    }
                                  },
                                  "type": "object",
                                  "x-akamai": {
                                    "file-path": "schemas/exception.yaml"
                                  }
                                }
                              },
                              "type": "object",
                              "x-akamai": {
                                "file-path": "schemas/condition-exception-get-200.yaml"
                              }
                            },
                            "type": "array"
                          },
                          "riskScoreGroup": {
                            "description": "The AI rule's risk score group.",
                            "type": "string"
                          },
                          "ruleDescription": {
                            "description": "A description of the AI rule.",
                            "type": "string"
                          },
                          "ruleId": {
                            "description": "Uniquely identifies the AI rule.",
                            "type": "integer",
                            "x-akamai": {
                              "file-path": "schemas/ai-rule-id.yaml"
                            }
                          },
                          "ruleVersion": {
                            "description": "The AI rule's version number.",
                            "type": "integer",
                            "x-akamai": {
                              "file-path": "schemas/ai-rule-version.yaml"
                            }
                          },
                          "title": {
                            "description": "The AI rule's title.",
                            "type": "string"
                          }
                        },
                        "required": [
                          "ruleId",
                          "ruleVersion",
                          "title",
                          "riskScoreGroup",
                          "ruleDescription",
                          "action"
                        ],
                        "type": "object",
                        "x-akamai": {
                          "file-path": "schemas/ai-rule.yaml"
                        }
                      },
                      "type": "array"
                    }
                  },
                  "required": [
                    "aiRuleStatus"
                  ],
                  "type": "object",
                  "x-akamai": {
                    "file-path": "schemas/ai-rules-get-200.yaml"
                  }
                }
              }
            },
            "description": "Successfully retrieved AI rules."
          },
          "400": {
            "content": {
              "application/json": {
                "example": {
                  "detail": "The request could not be understood by the server due to malformed syntax.",
                  "instance": "https://problems.luna.akamaiapis.net/appsec/error-instances/d54686b5-21cb-4ab7-a8d6-a92282cf1749",
                  "status": 400,
                  "title": "Bad Request",
                  "type": "https://problems.luna.akamaiapis.net/appsec/error-types/BAD-REQUEST"
                },
                "schema": {
                  "additionalProperties": true,
                  "description": "Details the errors you can receive.",
                  "properties": {
                    "detail": {
                      "description": "The detailed error message.",
                      "type": "string"
                    },
                    "fieldErrors": {
                      "description": "Pointers to fields for which invalid input was provided, whose values are messages detailing the reason this input was invalid for this field.",
                      "type": "object"
                    },
                    "instance": {
                      "description": "The non-referenceable URI that indicates the error instance.",
                      "example": "https://problems.luna.akamaiapis.net/api-definitions/error-instances/d54686b5-21cb-4ab7-a8d6-a92282cf1749",
                      "type": "string"
                    },
                    "status": {
                      "description": "The HTTP status code.",
                      "example": 404,
                      "type": "integer"
                    },
                    "title": {
                      "description": "The error title.",
                      "example": "Not Found",
                      "type": "string"
                    },
                    "type": {
                      "description": "The URL for the error type.",
                      "example": "https://problems.luna.akamaiapis.net/api-definitions/error-types/NOT-FOUND",
                      "type": "string"
                    }
                  },
                  "required": [
                    "title",
                    "type",
                    "detail",
                    "instance",
                    "status"
                  ],
                  "type": "object",
                  "x-akamai": {
                    "file-path": "schemas/problem-details.yaml"
                  }
                }
              }
            },
            "description": "[Invalid](https://techdocs.akamai.com/application-security/reference/400). Client error, such as invalid or malformed input.",
            "x-akamai": {
              "file-path": "errors/400-client-read-errors.yaml"
            }
          },
          "404": {
            "content": {
              "application/problem+json": {
                "example": {
                  "detail": "The requested resource is not found",
                  "instance": "https://problems.luna.akamaiapis.net/appsec/error-instances/d54686b5-21cb-4ab7-a8d6-a92282cf1749",
                  "status": 404,
                  "title": "Not Found",
                  "type": "https://problems.luna.akamaiapis.net/appsec/error-types/NOT-FOUND"
                },
                "schema": {
                  "additionalProperties": true,
                  "description": "Details the errors you can receive.",
                  "properties": {
                    "detail": {
                      "description": "The detailed error message.",
                      "type": "string"
                    },
                    "fieldErrors": {
                      "description": "Pointers to fields for which invalid input was provided, whose values are messages detailing the reason this input was invalid for this field.",
                      "type": "object"
                    },
                    "instance": {
                      "description": "The non-referenceable URI that indicates the error instance.",
                      "example": "https://problems.luna.akamaiapis.net/api-definitions/error-instances/d54686b5-21cb-4ab7-a8d6-a92282cf1749",
                      "type": "string"
                    },
                    "status": {
                      "description": "The HTTP status code.",
                      "example": 404,
                      "type": "integer"
                    },
                    "title": {
                      "description": "The error title.",
                      "example": "Not Found",
                      "type": "string"
                    },
                    "type": {
                      "description": "The URL for the error type.",
                      "example": "https://problems.luna.akamaiapis.net/api-definitions/error-types/NOT-FOUND",
                      "type": "string"
                    }
                  },
                  "required": [
                    "title",
                    "type",
                    "detail",
                    "instance",
                    "status"
                  ],
                  "type": "object",
                  "x-akamai": {
                    "file-path": "schemas/problem-details.yaml"
                  }
                }
              }
            },
            "description": "[Not found](https://techdocs.akamai.com/application-security/reference/404). The security policy doesn't exist, doesn't carry application layer controls, or no rule with this ID is available for use in this policy.",
            "x-akamai": {
              "file-path": "errors/404-client-read-errors.yaml"
            }
          },
          "500": {
            "content": {
              "application/problem+json": {
                "example": {
                  "detail": "Internal Server Error",
                  "instance": "12ab3c45-789d-01ef-2gh3-ijk4l56m78no",
                  "status": 500,
                  "title": "Internal Server Error",
                  "type": "internal_server_error"
                },
                "schema": {
                  "additionalProperties": true,
                  "description": "Details the errors you can receive.",
                  "properties": {
                    "detail": {
                      "description": "The detailed error message.",
                      "type": "string"
                    },
                    "fieldErrors": {
                      "description": "Pointers to fields for which invalid input was provided, whose values are messages detailing the reason this input was invalid for this field.",
                      "type": "object"
                    },
                    "instance": {
                      "description": "The non-referenceable URI that indicates the error instance.",
                      "example": "https://problems.luna.akamaiapis.net/api-definitions/error-instances/d54686b5-21cb-4ab7-a8d6-a92282cf1749",
                      "type": "string"
                    },
                    "status": {
                      "description": "The HTTP status code.",
                      "example": 404,
                      "type": "integer"
                    },
                    "title": {
                      "description": "The error title.",
                      "example": "Not Found",
                      "type": "string"
                    },
                    "type": {
                      "description": "The URL for the error type.",
                      "example": "https://problems.luna.akamaiapis.net/api-definitions/error-types/NOT-FOUND",
                      "type": "string"
                    }
                  },
                  "required": [
                    "title",
                    "type",
                    "detail",
                    "instance",
                    "status"
                  ],
                  "type": "object",
                  "x-akamai": {
                    "file-path": "schemas/problem-details.yaml"
                  }
                }
              }
            },
            "description": "[Internal server error](https://techdocs.akamai.com/application-security/reference/500). Something went wrong on our side. Try again in a few minutes or contact support if the error persists.",
            "x-akamai": {
              "file-path": "errors/500-server-errors.yaml"
            }
          }
        },
        "summary": "List AI rules",
        "tags": [
          "WAF rules: AI rules"
        ],
        "x-akamai": {
          "labels": [
            "All products"
          ]
        }
      },
      "parameters": [
        {
          "description": "A unique identifier for each configuration.",
          "in": "path",
          "name": "configId",
          "required": true,
          "schema": {
            "example": 77653,
            "format": "int64",
            "type": "integer"
          },
          "x-akamai": {
            "file-path": "parameters/config-id-path.yaml"
          }
        },
        {
          "description": "A unique identifier for each version of a configuration.",
          "in": "path",
          "name": "versionNumber",
          "required": true,
          "schema": {
            "example": 25,
            "type": "integer"
          },
          "x-akamai": {
            "file-path": "parameters/version-number-path.yaml"
          }
        },
        {
          "description": "A unique identifier for a security policy.",
          "in": "path",
          "name": "policyId",
          "required": true,
          "schema": {
            "example": "boBF_19288",
            "type": "string"
          },
          "x-akamai": {
            "file-path": "parameters/policy-id-path.yaml"
          }
        }
      ],
      "x-akamai": {
        "file-path": "paths/ai-rules.yaml",
        "path-info": "/configs/{configId}/versions/{versionNumber}/security-policies/{policyId}/ai-rules"
      }
    }
  },
  "servers": [
    {
      "url": "https://{hostname}/appsec/v1"
    }
  ],
  "tags": [
    {
      "description": "Manage WAF rules generated and continuously refined using machine learning.",
      "name": "WAF rules: AI rules"
    }
  ],
  "x-akamai": {
    "auth-type": "EDGE_GRID",
    "file-path": "02-security-policies.yaml"
  },
  "x-readme": {
    "explorer-enabled": false,
    "samples-languages": [
      "curl",
      "python",
      "node"
    ]
  }
}
```

# Sibling pages

* [Get AI rules status](https://techdocs.akamai.com/application-security/reference/get-policy-ai-rules-status.md)
* [Update AI rules status](https://techdocs.akamai.com/application-security/reference/put-policy-ai-rules-status.md)
* [Get an AI rule's action](https://techdocs.akamai.com/application-security/reference/get-policy-ai-rule-action.md)
* [Update an AI rule's action](https://techdocs.akamai.com/application-security/reference/put-policy-ai-rule-action.md)