Akamai API Security General policy settings API
Manage security policies and their versions.
Manage security policies and their versions.
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 General policy settings API'
version: v1
servers:
- url: https://{hostname}/appsec/v1
tags:
- description: Manage security policies and their versions.
name: General policy settings
paths:
/configs/{configId}/versions/{versionNumber}/security-policies:
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
x-akamai:
file-path: paths/policies.yaml
path-info: /configs/{configId}/versions/{versionNumber}/security-policies
post:
description: Creates a new copy of an existing security policy or creates a new security policy from scratch when you don't specify a policy to clone in the request. To create a new security policy, leave `createFromSecurityPolicy` empty in your request. _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/post-policy
operationId: post-policy
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:
createFromSecurityPolicy: '1_35752'
policyName: Open Cloned IV 2
policyPrefix: bt17
schema:
additionalProperties: false
description: Specifies the settings for a new clone of a security policy.
properties:
createFromSecurityPolicy:
description: The unique identifier (`policyId`) of the source policy to create the new policy from.
example: '{{createFromSecurityPolicy}}'
type: string
defaultSettings:
description: The default settings on the policy, `true` by default.
example: '{{defaultSettings}}'
type: string
policyName:
description: The name of the security policy. If not provided, the system generates a name automatically with the pattern `clone from <createFromSecurityPolicy>`.
example: '{{policyName}}'
type: string
policyPrefix:
description: The four-character alphanumeric string prefix for the `policyId`. If not provided, the prefix is autogenerated.
example: '{{policyPrefix}}'
type: string
source:
description: The source for the new the policy. If not provided, the source is blank. Other values are 'default' or the source security policy ID.
example: '{{source}}'
nullable: true
type: string
type: object
x-akamai:
file-path: schemas/policy-clone.yaml
required: true
responses:
'201':
content:
application/json:
example:
configId: 77653
policyId: bt17_75755
policyName: Open Cloned IV 2
policySecurityControls:
applyApiConstraints: true
applyApplicationLayerControls: true
applyBotmanControls: true
applyNetworkLayerControls: true
applyRateControls: true
applyReputationControls: true
applySlowPostControls: false
version: 144
schema:
additionalProperties: false
description: Specifies the details of a security policy.
properties:
configId:
description: Uniquely identifies the security configuration.
type: integer
hasRatePolicyWithApiKey:
description: Indicates whether this security policy has a rate policy which has `API_KEY` as a client identifier. APIs are managed using the [API Endpoint Definition API](https://techdocs.akamai.com/api-gateway/reference/api).
type: boolean
policyId:
description: Uniquely identifies the security policy.
type: string
policyName:
description: The name of the security policy.
type: string
policySecurityControls:
additionalProperties: false
description: The status of security controls defined in the security policy.
properties:
applyApiConstraints:
description: Whether you enabled API constraints.
type: boolean
applyApplicationLayerControls:
description: Whether you enabled application layer controls.
type: boolean
applyBotmanControls:
description: Whether you enabled Bot Manager controls.
type: boolean
applyNetworkLayerControls:
description: Whether you enabled network layer controls.
type: boolean
applyRateControls:
description: Whether you enabled rate controls.
type: boolean
applyReputationControls:
description: Whether you enabled reputation controls.
type: boolean
applySlowPostControls:
description: Whether you enabled slow post controls.
type: boolean
required:
- applyApplicationLayerControls
- applyNetworkLayerControls
- applyRateControls
- applyReputationControls
- applyBotmanControls
- applyApiConstraints
- applySlowPostControls
type: object
x-akamai:
file-path: schemas/security-controls.yaml
version:
description: The version number of the security configuration.
type: integer
required:
- hasRatePolicyWithApiKey
- policyId
- policyName
- policySecurityControls
type: object
x-akamai:
file-path: schemas/policy-2.yaml
description: Successfully created security policy.
'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 Clone or Create a Security Policy
tags:
- General policy settings
get:
description: Returns a list of security policies available for the specified security configuration. _Products:_ All.
externalDocs:
description: See documentation for this operation in Akamai's Application Security API
url: https://techdocs.akamai.com/application-security/reference/get-policies
operationId: get-policies
parameters:
- description: If `true`, returns all security policies in the configuration version that don't have a match target. If `false`, returns all security policies in the configuration version.
example: '{{notMatched}}'
in: query
name: notMatched
schema:
example: true
type: boolean
x-akamai:
file-path: parameters/not-matched-query.yaml
- description: When `true`, the results contain detailed information on versions. With the default `false`, the results contain summary information on versions.
example: '{{detail}}'
in: query
name: detail
schema:
default: false
example: true
type: boolean
x-akamai:
file-path: parameters/detail-query.yaml
- 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:
configId: 51074
policies:
- hasRatePolicyWithApiKey: true
policyId: NN3_61
policyName: NN FW 3
policySecurityControls:
applyApiConstraints: false
applyApplicationLayerControls: true
applyBotmanControls: true
applyNetworkLayerControls: true
applyRateControls: false
applyReputationControls: false
applySlowPostControls: false
- hasRatePolicyWithApiKey: false
policyId: NN_2
policyName: NN FW 1
policySecurityControls:
applyApiConstraints: false
applyApplicationLayerControls: true
applyBotmanControls: false
applyNetworkLayerControls: true
applyRateControls: false
applyReputationControls: false
applySlowPostControls: false
- hasRatePolicyWithApiKey: true
policyId: NN-2_3
policyName: NN FW 2
policySecurityControls:
applyApiConstraints: false
applyApplicationLayerControls: true
applyBotmanControls: false
applyNetworkLayerControls: true
applyRateControls: false
applyReputationControls: false
applySlowPostControls: false
version: 8
schema:
additionalProperties: false
description: Contains details of a security policy that you can apply to a configuration.
properties:
configId:
description: Uniquely identifies the security configuration.
type: integer
policies:
description: A list of security policies in this configuration version.
items:
additionalProperties: false
description: Specifies the details of a security policy.
properties:
configId:
description: Uniquely identifies the security configuration.
type: integer
hasRatePolicyWithApiKey:
description: Indicates whether this security policy has a rate policy which has `API_KEY` as a client identifier. APIs are managed using the [API Endpoint Definition API](https://techdocs.akamai.com/api-gateway/reference/api).
type: boolean
policyId:
description: Uniquely identifies the security policy.
type: string
policyName:
description: The name of the security policy.
type: string
policySecurityControls:
additionalProperties: false
description: The status of security controls defined in the security policy.
properties:
applyApiConstraints:
description: Whether you enabled API constraints.
type: boolean
applyApplicationLayerControls:
description: Whether you enabled application layer controls.
type: boolean
applyBotmanControls:
description: Whether you enabled Bot Manager controls.
type: boolean
applyNetworkLayerControls:
description: Whether you enabled network layer controls.
type: boolean
applyRateControls:
description: Whether you enabled rate controls.
type: boolean
applyReputationControls:
description: Whether you enabled reputation controls.
type: boolean
applySlowPostControls:
description: Whether you enabled slow post controls.
type: boolean
required:
- applyApplicationLayerControls
- applyNetworkLayerControls
- applyRateControls
- applyReputationControls
- applyBotmanControls
- applyApiConstraints
- applySlowPostControls
type: object
x-akamai:
file-path: schemas/security-controls.yaml
version:
description: The version number of the security configuration.
type: integer
required:
- policyId
- policyName
- hasRatePolicyWithApiKey
- policySecurityControls
type: object
x-akamai:
file-path: schemas/policy-1.yaml
type: array
version:
description: The security configuration's version number.
type: integer
required:
- configId
- policies
- version
type: object
x-akamai:
file-path: schemas/security-policies.yaml
description: Successfully returned resource.
'400':
content:
application/problem+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: '[Bad request](https://techdocs.akamai.com/application-security/reference/400). Invalid request body or URL parameter input.'
x-akamai:
file-path: errors/400.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 access to the resource.'
x-akamai:
file-path: errors/403.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:
# --- truncated at 32 KB (59 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/akamai-api-security/refs/heads/main/openapi/akamai-api-security-general-policy-settings-api-openapi.yml