Akamai API Security WAF rules: General settings API
Manage your Web Application Firewall (WAF) rules and rule sets.
Manage your Web Application Firewall (WAF) rules and rule sets.
openapi: 3.0.0
info:
description: 'Manage your configurations for Kona Site Defender,
Web Application Protector, and Client Reputation.
'
license:
name: Apache 2.0
url: https://www.apache.org/licenses/LICENSE-2.0.html
title: 'Akamai: Application Security Activation history WAF rules: General settings API'
version: v1
servers:
- url: https://{hostname}/appsec/v1
tags:
- description: Manage your Web Application Firewall (WAF) rules and rule sets.
name: 'WAF rules: General settings'
paths:
/configs/{configId}/versions/{versionNumber}/security-policies/{policyId}/rules:
parameters:
- description: A unique identifier for each configuration.
example: '{{configId}}'
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.
example: '{{versionNumber}}'
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.
example: '{{policyId}}'
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/policy-rules.yaml
path-info: /configs/{configId}/versions/{versionNumber}/security-policies/{policyId}/rules
get:
description: Returns the action taken for each rule in a policy. The action occurs when the rules are triggered by a request. These are not the same rules as Custom Rules that you configure yourself. These rules are maintained by Akamai. _Products:_ Kona Site Defender, App & API Protector with the Advanced Security module.
externalDocs:
description: See documentation for this operation in Akamai's Application Security API
url: https://techdocs.akamai.com/application-security/reference/get-policy-rules
operationId: get-policy-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).
example: '{{accountSwitchKey}}'
in: query
name: accountSwitchKey
required: false
schema:
example: 1-5C0YLB:1-8BYUX
type: string
responses:
'200':
content:
application/json:
example:
ruleActions:
- action: alert
id: 699989
- action: alert
id: 699990
- action: alert
id: 699991
- action: alert
id: 699992
- action: alert
id: 699993
- action: alert
id: 699994
schema:
additionalProperties: false
description: Describes the members of a rule's actions.
properties:
ruleActions:
description: The list of rule actions, either `alert`, `deny`, `deny_custom_{custom_deny_id}`, or `none`. If the action is `none`, the rule is inactive in the policy.
items:
additionalProperties: false
description: The list of rule actions, either `alert`, `deny`, `deny_custom_{custom_deny_id}`, or `none`. If the action is `none`, the rule is inactive in the policy.
properties:
action:
description: The list of rule actions, either `alert`, `deny`, or `none`. Use `deny_custom_{custom_deny_id}` to apply a custom action instead of Akamai's default. Run [Modify a custom deny action](https://techdocs.akamai.com/application-security/reference/put-custom-deny) to manage your custom deny actions. If the action is `none`, the rule is inactive in the policy.
enum:
- alert
- deny
- none
type: string
id:
description: The unique identifier for each rule.
type: integer
required:
- action
- id
type: object
x-akamai:
file-path: schemas/rule-action.yaml
type: array
required:
- ruleActions
type: object
x-akamai:
file-path: schemas/rule-actions-get-200.yaml
description: Successfully retrieved the rule actions.
'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:
additionalProperties:
description: Fields that provide additional details about the problem.
type: string
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:
additionalProperties:
description: Fields that provide additional details about the problem.
type: string
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 named 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:
additionalProperties:
description: Fields that provide additional details about the problem.
type: string
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, and contact support if the error persists.'
x-akamai:
file-path: errors/500-server-errors.yaml
summary: Akamai API Security List Rules
tags:
- 'WAF rules: General settings'
put:
description: 'Upgrade to the most recent version of the KRS rule set. Akamai periodically updates these rules to keep protections current. However, the rules you use in your security policies do not automatically upgrade to the latest version when setting `mode` to `KRS`. These rules do update automatically when you have `mode` set to `AAG`. Before you upgrade, run [Get upgrade details](https://techdocs.akamai.com/application-security/reference/get-rules-upgrade-details) to see which rules have changed. If you want to test how these rules would operate with live traffic before committing to the upgrade, run them in evaluation mode. This applies to KRS rules only and does not allow you to make any changes to the rules themselves. The response is the same as the `mode` response. _Products:_ Kona Site Defender, App & API Protector with the Advanced Security module, Adaptive Security Engine. If you''re already using or want to switch from KRS to Adaptive Security Engine (ASE), pass `"upgrade": true,` and `"mode": "ASE_AUTO"` or `ASE_MANUAL` in your request. If you''re using Kona Rule Sets, continue to pass only the upgrade value. Note that this operation does not grant access to Adaptive Security Engine. It updates the ASE protections if you already have ASE on your contract. Once you switch to ASE protections, you can''t go back to KRS rules. Contact your account team if you want to add ASE to your contract.'
externalDocs:
description: See documentation for this operation in Akamai's Application Security API
url: https://techdocs.akamai.com/application-security/reference/put-policy-rules
operationId: put-policy-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).
example: '{{accountSwitchKey}}'
in: query
name: accountSwitchKey
required: false
schema:
example: 1-5C0YLB:1-8BYUX
type: string
requestBody:
content:
application/json:
example:
upgrade: true
schema:
type: string
x-akamai:
file-path: schemas/rules-put.yaml
required: true
responses:
'200':
content:
application/json:
example:
current: KRS 1.0 (Apr 20, 2020)
eval: disabled
mode: KRS
schema:
additionalProperties: false
description: The GET Response JSON for the security policy mode.
properties:
current:
description: The current rule set version and the ISO 8601 date the rule set version was introduced. This date acts like a version number.
type: string
eval:
description: Whether the evaluation mode is enabled or disabled.
type: boolean
evaluating:
description: The evaluation rule set version and the ISO 8601 date the evaluation starts.
type: string
expires:
description: The ISO 8601 time stamp when the evaluation is expiring. This value only appears when `eval` is set to `enabled`.
format: date-time
type: string
mode:
description: The security policy mode. Use `KRS` to update manually, or `AAG` to update automatically. For Adaptive Security Engine rule sets, use `ASE_AUTO` for automatic updates to the ASE evaluation rules, or `ASE_MANUAL` to manually retrieve current evaluation rules. When not specified, the mode uses default settings. For a KRS 1.0 policy, that means using the KRS 1.0 rule set.
enum:
- KRS
- AAG
- ASE_AUTO
- ASE_MANUAL
type: string
required:
- mode
type: object
x-akamai:
file-path: schemas/mode-get-200.yaml
description: Successfully updated to latest KRS rule set version.
'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:
additionalProperties:
description: Fields that provide additional details about the problem.
type: string
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
'403':
content:
application/problem+json:
example:
detail: You do not have the necessary access to perform this operation or the requested resource cannot be modified
instance: https://problems.luna.akamaiapis.net/appsec/error-instances/d54686b5-21cb-4ab7-a8d6-a92282cf1749
status: 403
title: Forbidden
type: https://problems.luna.akamaiapis.net/appsec-resource/error-types/ACCESS-DENIED
schema:
additionalProperties: true
description: Details the errors you can receive.
properties:
detail:
description: The detailed error message.
type: string
fieldErrors:
additionalProperties:
description: Fields that provide additional details about the problem.
type: string
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: '[Forbidden](https://techdocs.akamai.com/application-security/reference/403). You don''t have permission to write to this resource.'
x-akamai:
file-path: errors/403-client-write-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:
additionalProperties:
description: Fields that provide additional details about the problem.
type: string
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 named 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:
additionalProperties:
description: Fields that provide additional details about the problem.
type: string
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, and contact support if the error persists.'
x-akamai:
file-path: errors/500-server-errors.yaml
summary: Akamai API Security Upgrade KRS Ruleset
tags:
- 'WAF rules: General settings'
/configs/{configId}/versions/{versionNumber}/security-policies/{policyId}/rules/threat-intel:
parameters:
- description: A unique identifier for each configuration.
example: '{{configId}}'
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.
example: '{{versionNumber}}'
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.
example: '{{policyId}}'
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/policy-rules-threat-intel.yaml
path-info: /configs/{configId}/versions/{versionNumber}/security-policies/{policyId}/rules/threat-intel
get:
description: __Beta__ Returns whether adaptive intelligence is enabled. Adaptive intelligence allows our network to better tune rules for better accuracy. Contact your account team if you'd like to run this operation. _Products:_ All.
externalDocs:
description: See documentation for this operation in Akamai's Application Security API
url: https://techdocs.akamai.com/application-security/reference/get-rules-threat-intel
operationId: get-rules-threat-intel
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).
example: '{{accountSwitchKey}}'
in: query
name: accountSwitchKey
required: false
schema:
example: 1-5C0YLB:1-8BYUX
type: string
responses:
'200':
content:
application/json:
example:
threatIntel: 'on'
schema:
additionalProperties: false
description: Describes operational settings for adaptive intelligence.
properties:
action:
description: Set to `on` so our network analyzes a request and dynamically modifies protection methods to fit the detected threat level. Set to `off` to manually fine-tune your rule sets.
enum:
- 'on'
- 'off'
type: string
type: object
x-akamai:
file-path: schemas/threat-intel.yaml
description: Successfully retrieved threat intelligence settings.
'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:
additionalProperties:
description: Fields that provide additional details about the problem.
type: string
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:
# --- truncated at 32 KB (221 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/akamai-api-security/refs/heads/main/openapi/akamai-api-security-waf-rules-general-settings-api-openapi.yml