> ## Documentation Index
> Fetch the complete documentation index at: https://docs.aegister.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Block SQL injection and XSS on Cloud Defender

> Switch blocking of SQL injection, cross-site scripting and the other attack signatures on or off for one domain, with `{"enabled": true}` or `{"enabled": false}`. It is off by default: matches are only detected and listed by “Get Cloud Defender detections”. When it is on, matching requests are refused at the edge within about five minutes; switching it off undoes it in the same time. “Get Cloud Defender configuration” returns the current state as `signature_blocking` (`enabled`, `at`, `by`); when it is absent, blocking is off. A signature can also match a request your site needs: test the site after switching it on, and switch it off if it refuses something legitimate. Owners and security officers with a live licence; anyone else gets 404, and an `enabled` that is not a boolean gets 400.



## OpenAPI

````yaml put /api/v1/cloud-defender/{id}/signature-blocking
openapi: 3.1.0
info:
  title: Aegister API
  version: 2.10.0
servers: []
security: []
paths:
  /api/v1/cloud-defender/{id}/signature-blocking:
    put:
      tags:
        - cloud-defender
      summary: >-
        Switch SQL injection and XSS blocking on or off for a Cloud Defender
        domain
      description: >-
        Off by default: every request is checked and the matches listed as
        anomalies. On, they are refused at the

        edge; switch it off again if it refuses something the site needs.
      operationId: cloud_defender_signature_blocking_update
      parameters:
        - in: path
          name: id
          schema:
            type: integer
          required: true
      requestBody:
        content:
          application/json:
            schema:
              type: object
              required:
                - enabled
              properties:
                enabled:
                  type: boolean
            examples:
              SwitchBlockingOn:
                value:
                  enabled: true
                summary: Switch blocking on
      responses:
        '200':
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: integer
                    description: |-
                      Any value different from 0 indicates an error.  
                      More details can be found in `messages`.
                    minimum: 0
                    maximum: 0
                    examples:
                      - 0
                  messages:
                    type: array
                    description: >-
                      If `error` is `1`, contains zero or more details on the
                      error.
                    examples:
                      - []
                  data:
                    type: object
                    properties:
                      enabled:
                        type: boolean
              examples:
                BlockingOn:
                  value:
                    error: 0
                    messages: []
                    data:
                      enabled: true
                  summary: Blocking on
          description: ''
        '400':
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: integer
                    description: |-
                      Any value different from 0 indicates an error.  
                      More details can be found in `messages`.
                    minimum: 0
                    maximum: 0
                    examples:
                      - 1
                  messages:
                    type: array
                    description: >-
                      If `error` is `1`, contains zero or more details on the
                      error.
                    examples:
                      - - Invalid data provided
          description: ''
        '404':
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: integer
                    description: |-
                      Any value different from 0 indicates an error.  
                      More details can be found in `messages`.
                    minimum: 0
                    maximum: 0
                    examples:
                      - 1
                  messages:
                    type: array
                    description: >-
                      If `error` is `1`, contains zero or more details on the
                      error.
                    examples:
                      - []
          description: ''
      security:
        - ApiKeyAuth: []
components:
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: X-Aegister-Token

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.