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

# Fetches rule sets associated with a specific domain

> Retrieve all rule sets linked to a particular domain



## OpenAPI

````yaml /api-reference/services_documented/waap_api.yaml get /waap/v1/domains/{domain_id}/rule-sets
openapi: 3.1.0
info:
  title: Gcore OpenAPI – WAAP API
  description: >-
    This OpenAPI is an aggregated OpenAPI specification that unifies all Gcore
    products into a single file. It covers Cloud, CDN, DNS, WAAP, DDoS
    Protection, Object Storage, Streaming, and FastEdge services.
  version: '2026-05-11T15:10:30.328297+00:00'
servers:
  - url: https://api.gcore.com
security:
  - APIKey: []
tags:
  - name: WAAP Service
    x-displayName: WAAP Service
  - name: Domains
    x-displayName: Domains
  - name: Policies
    x-displayName: Policies
  - name: Analytics
    x-displayName: Analytics
  - name: Custom Page Sets
    x-displayName: Custom Page Sets
  - name: Custom Rules
    x-displayName: Custom Rules
  - name: Filter Templates
    x-displayName: Filter Templates
  - name: Firewall Rules
    x-displayName: Firewall Rules
  - name: Advanced Rules
    x-displayName: Advanced Rules
  - name: Tags
    x-displayName: Tags
  - name: Network Organizations
    x-displayName: Network Organizations
  - name: API Discovery
    x-displayName: API Discovery
  - name: IP Spotlight
    x-displayName: IP Spotlight
  - name: Security Insights
    x-displayName: Security Insights
  - name: IP Reputation
    x-displayName: IP Reputation
paths:
  /waap/v1/domains/{domain_id}/rule-sets:
    get:
      tags:
        - Policies
      summary: Fetches rule sets associated with a specific domain
      description: Retrieve all rule sets linked to a particular domain
      operationId: get_rule_set_list_v1_domains__domain_id__rule_sets_get
      parameters:
        - name: domain_id
          in: path
          required: true
          schema:
            type: integer
            exclusiveMinimum: 0
            description: The domain ID
            title: Domain Id
          description: The domain ID
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/RuleSet'
                title: >-
                  Response Get Rule Set List V1 Domains  Domain Id  Rule Sets
                  Get
        '400':
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/APIError'
              example:
                type: http-bad-request
                title: Bad Request
                status: 400
                detail: 'Invalid domain name: '''''''''
          description: Bad Request
        '401':
          description: Unauthorized
          content:
            application/problem+json:
              example:
                detail: Auth token is missing or invalid
        '403':
          description: Unauthenticated
          content:
            application/problem+json:
              example:
                detail: Permission denied
        '404':
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/APIError'
              example:
                type: http-not-found
                title: Not Found
                status: 404
                detail: The resource is not found
          description: Not Found
        '422':
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/APICompositeError'
              example:
                type: request-validation-failed
                title: Request validation error.
                status: 422
                detail: One or more fields have validation errors.
                errors:
                  - loc:
                      - body
                      - name
                    detail: Input should be a valid string
                  - loc:
                      - body
                      - date
                    detail: Field required
                  - loc:
                      - query
                      - limit
                    detail: Field required
          description: Unprocessable Entity
        '500':
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/APIError'
              example:
                type: internal-server-error
                title: Internal server error.
                status: 500
                detail: >-
                  An unexpected condition was encountered which prevented the
                  server from fulfilling the request.
          description: Internal Server Error
      x-codeSamples:
        - lang: Python
          source: |-
            import os
            from gcore import Gcore

            client = Gcore(
                api_key=os.environ.get("GCORE_API_KEY"),  # This is the default and can be omitted
            )
            waap_rule_sets = client.waap.domains.list_rule_sets(
                1,
            )
            print(waap_rule_sets)
        - lang: Go
          source: "package main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\n\t\"github.com/G-Core/gcore-go\"\n\t\"github.com/G-Core/gcore-go/option\"\n)\n\nfunc main() {\n\tclient := gcore.NewClient(\n\t\toption.WithAPIKey(\"My API Key\"),\n\t)\n\twaapRuleSets, err := client.Waap.Domains.ListRuleSets(context.TODO(), 1)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf(\"%+v\\n\", waapRuleSets)\n}\n"
components:
  schemas:
    RuleSet:
      properties:
        id:
          type: integer
          title: Id
          description: Identifier of the rule set.
        name:
          type: string
          title: Name
          description: Name of the rule set.
        description:
          type: string
          title: Description
          description: Detailed description of the rule set.
        is_active:
          type: boolean
          title: Is Active
          description: Indicates if the rule set is currently active.
        tags:
          items:
            $ref: '#/components/schemas/app__models__policies__Tag'
          type: array
          title: Tags
          description: Collection of tags associated with the rule set.
        resource_slug:
          anyOf:
            - type: string
            - type: 'null'
          title: Resource Slug
          description: The resource slug associated with the rule set.
        rules:
          items:
            $ref: '#/components/schemas/DomainPolicy'
          type: array
          title: Rules
          default: []
      type: object
      required:
        - id
        - name
        - description
        - is_active
        - tags
      title: RuleSet
      description: Represents a custom rule set.
    APIError:
      properties:
        type:
          type: string
          title: Type
          description: A URI identifier that categorizes the type of error.
        title:
          type: string
          title: Title
          description: A brief, human-readable title for the error.
        status:
          type: integer
          title: Status
          description: The HTTP status code applicable to this error.
        detail:
          anyOf:
            - type: string
            - type: 'null'
          title: Detail
          description: A detailed human-readable explanation of the error.
      type: object
      required:
        - type
        - title
        - status
        - detail
      title: APIError
    APICompositeError:
      properties:
        type:
          type: string
          title: Type
          description: A URI identifier that categorizes the type of error.
        title:
          type: string
          title: Title
          description: A brief, human-readable title for the error.
        status:
          type: integer
          title: Status
          description: The HTTP status code applicable to this error.
        detail:
          anyOf:
            - type: string
            - type: 'null'
          title: Detail
          description: A detailed human-readable explanation of the error.
        errors:
          items:
            $ref: '#/components/schemas/APIFieldError'
          type: array
          title: Errors
          description: A list of detailed errors for individual fields.
      type: object
      required:
        - type
        - title
        - status
        - detail
        - errors
      title: APICompositeError
    app__models__policies__Tag:
      properties:
        id:
          type: integer
          title: Id
          description: Identifier of the tag.
        name:
          type: string
          title: Name
          description: Name of the tag.
        description:
          type: string
          title: Description
          description: Detailed description of the tag.
      type: object
      required:
        - id
        - name
        - description
      title: Tag
      description: A single tag associated with a rule set.
    DomainPolicy:
      properties:
        id:
          type: string
          title: Id
          description: Unique identifier for the security rule
        name:
          type: string
          title: Name
          description: Name of the security rule
        description:
          type: string
          title: Description
          description: Detailed description of the security rule
        action:
          $ref: '#/components/schemas/PolicyAction'
          description: Specifies the action taken by the WAAP upon rule activation
        mode:
          type: boolean
          title: Mode
          description: Indicates if the security rule is active
        rule_set_id:
          type: integer
          title: Rule Set Id
          description: Identifier of the rule set to which the rule belongs
        group:
          type: string
          title: Group
          description: The rule set group name to which the rule belongs
      type: object
      required:
        - id
        - name
        - description
        - action
        - mode
        - rule_set_id
        - group
      title: DomainPolicy
      description: Represents a configurable WAAP security rule, also known as a policy.
    APIFieldError:
      properties:
        loc:
          anyOf:
            - items:
                anyOf:
                  - type: integer
                  - type: string
              type: array
            - {}
          title: Loc
          description: The location of the field or a character number causing the error.
        detail:
          type: string
          title: Detail
          description: A human-readable message describing the error.
      type: object
      required:
        - loc
        - detail
      title: APIFieldError
    PolicyAction:
      type: string
      enum:
        - Allow
        - Block
        - Captcha
        - Gateway
        - Handshake
        - Monitor
        - Composite
      title: PolicyAction
      description: The action taken by the WAAP upon rule activation.
  securitySchemes:
    APIKey:
      description: >-
        API key for authentication. Make sure to include the word `apikey`,
        followed by a single space and then your token.

        Example: `apikey 1234$abcdef`
      type: apiKey
      in: header
      name: Authorization

````