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

# GET /admin/api/rule-presets



## OpenAPI

````yaml /generated/openapi.json get /admin/api/rule-presets
openapi: 3.1.0
info:
  description: >-
    Forwarding, management, portal and OAuth APIs generated from Rust types.
    Input and output schemas preserve their respective Serde contracts.
    Streaming events and WebSocket messages are documented alongside HTTP
    payloads.
  title: GPROXY HTTP API
  version: 4.2.1
servers: []
security:
  - bearer: []
  - anthropicKey: []
  - googleKey: []
  - queryKey: []
paths:
  /admin/api/rule-presets:
    get:
      tags:
        - Management
      summary: GET /admin/api/rule-presets
      parameters:
        - description: Administrative scope selected by the caller.
          in: header
          name: x-gproxy-admin-scope
          required: false
          schema:
            type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                items:
                  $ref: '#/components/schemas/Output_RulePresetDto'
                type: array
          description: Success
        default:
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Output_Envelope'
          description: Gateway error
      security:
        - consoleSession: []
        - bearer: []
        - anthropicKey: []
        - googleKey: []
components:
  schemas:
    Output_RulePresetDto:
      description: >-
        A named set of rewrite rules. `rules` is what `apply_rule_preset`
        writes;

        it is the ordinary write shape, so a caller may edit the list first and

        send it through `rewrite().replace_rules` itself.
      properties:
        category:
          $ref: '#/components/schemas/Output_RulePresetCategory'
        description:
          description: |-
            A stable machine tag, `gproxy:preset:{id}:v1`, so a console can tell
            which preset a rule set came from.
          type: string
        id:
          type: string
        name:
          type: string
        rules:
          items:
            $ref: '#/components/schemas/Output_RewriteRuleWrite'
          type: array
      required:
        - id
        - name
        - description
        - category
        - rules
      type: object
    Output_Envelope:
      properties:
        error:
          $ref: '#/components/schemas/Output_EnvelopeBody'
      required:
        - error
      type: object
    Output_RulePresetCategory:
      oneOf:
        - const: application
          description: >-
            Rewrites that hide one client application's identity from the
            upstream.
          type: string
    Output_RewriteRuleWrite:
      properties:
        action:
          default: null
          type:
            - string
            - 'null'
        enabled:
          default: null
          type:
            - boolean
            - 'null'
        filterBody:
          default: null
        filterEventPattern:
          default: null
          type:
            - string
            - 'null'
        filterHeader:
          default: null
        filterHeaderPattern:
          default: null
          type:
            - string
            - 'null'
        filterModelPattern:
          default: null
          type:
            - string
            - 'null'
        filterOperationKeys:
          default: null
        id:
          default: null
          type:
            - string
            - 'null'
        paths:
          default: null
        pattern:
          type: string
        phase:
          default: null
          type:
            - string
            - 'null'
        replacement:
          type: string
        ruleSetId:
          default: null
          description: Ignored by `replace_rules`, which owns the set it is replacing.
          type:
            - string
            - 'null'
        sortOrder:
          default: null
          format: int64
          type:
            - integer
            - 'null'
        target:
          default: null
          type:
            - string
            - 'null'
        targetName:
          default: null
          type:
            - string
            - 'null'
      required:
        - id
        - ruleSetId
        - phase
        - action
        - target
        - targetName
        - paths
        - pattern
        - replacement
        - filterOperationKeys
        - filterModelPattern
        - filterHeaderPattern
        - filterEventPattern
        - filterBody
        - filterHeader
        - sortOrder
        - enabled
      type: object
    Output_EnvelopeBody:
      properties:
        code:
          type: string
        message:
          type: string
      required:
        - code
        - message
      type: object
  securitySchemes:
    bearer:
      scheme: bearer
      type: http
    anthropicKey:
      in: header
      name: x-api-key
      type: apiKey
    googleKey:
      in: header
      name: x-goog-api-key
      type: apiKey
    queryKey:
      in: query
      name: key
      type: apiKey
    consoleSession:
      in: cookie
      name: gproxy_session
      type: apiKey

````

## Related topics

- [Rewrite rules and protocol overrides](https://gproxy.leenhawk.com/guides/rules.md)
- [GET /admin/api/rules](https://gproxy.leenhawk.com/api-reference/management/get-adminapirules.md)
- [GET /admin/api/operation-rules](https://gproxy.leenhawk.com/api-reference/management/get-adminapioperation-rules.md)
- [GET /admin/api/price-rules](https://gproxy.leenhawk.com/api-reference/management/get-adminapiprice-rules.md)
- [GET /admin/api/rule-sets](https://gproxy.leenhawk.com/api-reference/management/get-adminapirule-sets.md)


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