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

# Retrieve all available WAF rules for a Shield Zone



## OpenAPI

````yaml https://api.bunny.net/shield/docs/v1/swagger.json get /shield/waf/rules/{shieldZoneId}
openapi: 3.0.4
info:
  title: Bunny Shield API
  description: >-
    Bunny.net API for Bunny Shield (WAF, DDoS, Rate Limiting, Bot Detection,
    Access Lists & API Guardian).
  version: v1
servers:
  - url: https://api.bunny.net
security: []
paths:
  /shield/waf/rules/{shieldZoneId}:
    get:
      tags:
        - WAF
      summary: Retrieve all available WAF rules for a Shield Zone
      operationId: Get WAF Rules
      parameters:
        - name: shieldZoneId
          in: path
          description: The ID of the Shield Zone for the WAF Rules.
          required: true
          schema:
            type: integer
            description: The ID of the Shield Zone for the WAF Rules.
            format: int64
      responses:
        '200':
          description: OK
          content:
            text/plain:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/WafRuleMainGroupModel'
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/WafRuleMainGroupModel'
            text/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/WafRuleMainGroupModel'
        '401':
          description: Unauthorized
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/UnauthorizedResult'
            application/json:
              schema:
                $ref: '#/components/schemas/UnauthorizedResult'
            text/json:
              schema:
                $ref: '#/components/schemas/UnauthorizedResult'
        '500':
          description: Internal Server Error
components:
  schemas:
    WafRuleMainGroupModel:
      type: object
      properties:
        name:
          type: string
          nullable: true
        ruleset:
          type: string
          nullable: true
        ruleGroups:
          type: array
          items:
            $ref: '#/components/schemas/WafRuleGroupModel'
          nullable: true
      additionalProperties: false
    UnauthorizedResult:
      type: object
      properties:
        statusCode:
          type: integer
          format: int32
      additionalProperties: false
    WafRuleGroupModel:
      type: object
      properties:
        id:
          type: integer
          format: int64
        name:
          type: string
          nullable: true
        code:
          type: string
          nullable: true
        fileName:
          type: string
          nullable: true
        mainGroup:
          type: string
          nullable: true
        ruleset:
          type: string
          nullable: true
        description:
          type: string
          nullable: true
        rules:
          type: array
          items:
            $ref: '#/components/schemas/WafRuleModel'
          nullable: true
      additionalProperties: false
    WafRuleModel:
      type: object
      properties:
        ruleId:
          type: string
          nullable: true
        description:
          type: string
          nullable: true
      additionalProperties: false

````