Akamai API Security Custom rule actions API

Manage the actions contained in your custom rules. Use custom rules to handle scenarios not covered by the included standard rules or to quickly patch new website vulnerabilities.

OpenAPI Specification

akamai-api-security-custom-rule-actions-api-openapi.yml Raw ↑
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 Custom rule actions API'
  version: v1
servers:
- url: https://{hostname}/appsec/v1
tags:
- description: 'Manage the actions contained in your custom rules.  Use custom

    rules to handle scenarios not covered by the included standard

    rules or to quickly patch new website vulnerabilities.'
  name: Custom rule actions
paths:
  /configs/{configId}/versions/{versionNumber}/security-policies/{policyId}/custom-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-custom-rules.yaml
      path-info: /configs/{configId}/versions/{versionNumber}/security-policies/{policyId}/custom-rules
    get:
      description: Returns a list of all configured custom rules for the specified configuration. It includes information for rules that are associated with this policy, as well as the latest versions of the rules in the configuration that aren't associated with the current policy. Unassociated rules have an action of `none`. _Products:_ All.
      externalDocs:
        description: See documentation for this operation in Akamai's Application Security API
        url: https://techdocs.akamai.com/application-security/reference/get-custom-rules
      operationId: get-custom-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:
                customRules:
                - action: alert
                  id: 622918
                  link: /appsec/v1/configs/16400/custom-rules/622918
                  name: Custom Rule Example 1
                - action: none
                  id: 657604
                  link: /appsec/v1/configs/16400/custom-rules/657604
                  name: Custom Rule Example 2
                - action: deny
                  id: 615894
                  link: /appsec/v1/configs/16400/custom-rules/615894
                  name: Custom Rule Example 3
              schema:
                additionalProperties: false
                description: Describes the settings for a custom rule.
                properties:
                  customRules:
                    description: Contains settings for custom rule actions.
                    items:
                      additionalProperties: false
                      properties:
                        action:
                          description: The action to assign to this custom rule, 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: Uniquely identifies a rule.
                          type: integer
                        link:
                          description: __Read-only__ The link to additional information about the rule associated with this policy or the latest version of a rule if `action` is set to `none` (unassociated).
                          example: /appsec/v1/configs/18323/custom-rules/621212
                          readOnly: true
                          type: string
                        name:
                          description: __Read-only__ The name you assign to the custom rule.
                          readOnly: true
                          type: string
                        status:
                          description: __Read-only__ The custom rule action's activation status. The custom rule deployment status. Either `activated` if a rule is enabled in at least one security policy within a security configuration currently active in production, `published` if a rule is associated with at least one security policy in an inactive security configuration, or `unused` if a rule exists as a shared resource, but isn't associated with any security policy.
                          enum:
                          - activated
                          - published
                          - unused
                          readOnly: true
                          type: string
                        version:
                          description: __Read-only__ The rule version.
                          readOnly: true
                          type: integer
                      required:
                      - link
                      - name
                      - action
                      type: object
                    type: array
                required:
                - customRules
                type: object
                x-akamai:
                  file-path: schemas/custom-rule-actions.yaml
          description: All the latest custom rules for this configuration.
      summary: Akamai API Security List Custom Rule Actions
      tags:
      - Custom rule actions
  /configs/{configId}/versions/{versionNumber}/security-policies/{policyId}/custom-rules/{ruleId}:
    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
    - description: A unique identifier for rule.
      example: '{{ruleId}}'
      in: path
      name: ruleId
      required: true
      schema:
        example: 699989
        type: integer
      x-akamai:
        file-path: parameters/rule-id-path.yaml
    x-akamai:
      file-path: paths/policy-custom-rule.yaml
      path-info: /configs/{configId}/versions/{versionNumber}/security-policies/{policyId}/custom-rules/{ruleId}
    put:
      description: Updates the action of a custom rule. _Products:_ All.
      externalDocs:
        description: See documentation for this operation in Akamai's Application Security API
        url: https://techdocs.akamai.com/application-security/reference/put-custom-rule
      operationId: put-custom-rule
      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:
              action: alert
            schema:
              additionalProperties: false
              description: Describes the actions you can set when you update a custom rule action.
              properties:
                action:
                  description: Specifies the action that the rule should trigger. Either `alert`, `deny`, deny_custom_{custom_deny_id}, or `none`.  If the action is `none`, it isn't associated with the policy.
                  enum:
                  - alert
                  - deny
                  - none
                  example: '{{action}}'
                  type: string
              required:
              - action
              type: object
              x-akamai:
                file-path: schemas/custom-rule-action-put.yaml
        required: true
      responses:
        '200':
          content:
            application/json:
              example:
                action: alert
              schema:
                additionalProperties: false
                description: Describes the actions you can set when you update a custom rule action.
                properties:
                  action:
                    description: Specifies the action that the rule should trigger. Either `alert`, `deny`, deny_custom_{custom_deny_id}, or `none`.  If the action is `none`, it isn't associated with the policy.
                    enum:
                    - alert
                    - deny
                    - none
                    type: string
                required:
                - action
                type: object
                x-akamai:
                  file-path: schemas/custom-rule-action-put.yaml
          description: Updated action.
        '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 edit permissions for this config.'
          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:
                - 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 config doesn''t exist or you don''t have access to it.'
          x-akamai:
            file-path: errors/404.yaml
      summary: Akamai API Security Modify a Custom Rule Action
      tags:
      - Custom rule actions
externalDocs:
  description: See documentation for Akamai's Application Security API
  url: https://techdocs.akamai.com/application-security/reference
x-readme:
  samples-languages:
  - curl
  - python
  - node