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

# List guardrail rules

> Returns a paginated list of guardrail rules for the current project.



## OpenAPI

````yaml get /v2/guardrail-rules
openapi: 3.1.0
info:
  title: orq.ai API
  version: '2.0'
  description: orq.ai API documentation
servers:
  - url: https://api.orq.ai
security:
  - ApiKey: []
tags:
  - description: List models available through the AI Router.
    name: Models
  - name: Guardrail Rules
  - name: Policies
  - name: Routing Rules
  - name: API keys
    description: >-
      API keys authenticate programmatic access to the workspace. The unified
      key model exposes opaque tokens, per-domain access grants, and budget /
      rate-limit constraints (see ADR 0001 and ADR 0002).
  - name: Budgets
    description: >-
      Budgets govern spend, token usage, and request rate across six scopes:
      workspace, project, identity, api-key, provider, and model. A budget is
      hierarchical and defense-in-depth — every applicable budget is a hard
      gate, and the most restrictive one wins per dimension (see ADR 0007).
  - name: Documentation
    description: >-
      Search the orq.ai documentation. Proxies the workspace's query to the
      hosted docs search index.
  - name: Files
    description: File upload and retrieval operations.
  - name: Identities
    description: >-
      Identities represent end users from your system for usage and engagement
      tracking.
  - name: Projects
    description: Projects organize resources within a workspace
  - name: Skills
    description: >-
      Skills are modular instructions you can use to codify processes and
      conventions
  - name: Responses
  - description: >-
      Run agents on a cadence — cron, interval, or one-off. Minimum firing
      interval is 1 hour.
    name: Agent Schedules
  - name: Embeddings
  - name: Reporting
    description: >-
      GenAI reporting API over canonical analytics rollups. Accepts a metric
      name, time range, grain, group-by, and filters; returns a typed time
      series and optional totals.
externalDocs:
  url: https://docs.orq.ai
  description: orq.ai Documentation
paths:
  /v2/guardrail-rules:
    get:
      tags:
        - Guardrail Rules
      summary: List guardrail rules
      description: Returns a paginated list of guardrail rules for the current project.
      operationId: GuardrailRuleList
      parameters:
        - explode: false
          in: query
          name: limit
          schema:
            default: 10
            format: int64
            maximum: 200
            minimum: 1
            type: integer
        - description: A cursor for use in pagination.
          explode: false
          in: query
          name: starting_after
          schema:
            description: A cursor for use in pagination.
            type: string
        - description: A cursor for use in pagination.
          explode: false
          in: query
          name: ending_before
          schema:
            description: A cursor for use in pagination.
            type: string
        - description: Optional filter by project ID.
          explode: false
          in: query
          name: project_id
          schema:
            description: Optional filter by project ID.
            type: string
        - description: Filter by display name or description (case-insensitive).
          explode: false
          in: query
          name: search
          schema:
            description: Filter by display name or description (case-insensitive).
            type: string
        - description: Field to sort by. Defaults to created_at (newest first).
          explode: false
          in: query
          name: sort_by
          schema:
            description: Field to sort by. Defaults to created_at (newest first).
            enum:
              - created_at
              - updated_at
              - display_name
            type: string
        - description: Filter by enabled status.
          explode: false
          in: query
          name: enabled
          schema:
            description: Filter by enabled status.
            type:
              - boolean
              - 'null'
        - description: Filter by referenced guardrail ids (comma-separated).
          explode: false
          in: query
          name: guardrail_id
          schema:
            description: Filter by referenced guardrail ids (comma-separated).
            items:
              type: string
            type:
              - array
              - 'null'
      responses:
        '200':
          content:
            application/json:
              schema:
                additionalProperties: false
                properties:
                  data:
                    items:
                      $ref: '#/components/schemas/GuardrailRule'
                    type:
                      - array
                      - 'null'
                  has_more:
                    type: boolean
                  object:
                    type: string
                required:
                  - object
                  - data
                  - has_more
                type: object
          description: Guardrail rules retrieved successfully
components:
  schemas:
    GuardrailRule:
      additionalProperties: false
      properties:
        _id:
          type: string
        created_at:
          format: date-time
          type: string
        created_by_id:
          type: string
        description:
          maxLength: 2048
          type: string
        display_name:
          maxLength: 256
          minLength: 1
          type: string
        enabled:
          type: boolean
        expression:
          $ref: '#/components/schemas/Expression'
        guardrails:
          items:
            $ref: '#/components/schemas/GuardrailRef'
          type:
            - array
            - 'null'
        project_id:
          type: string
        timeout:
          format: int64
          minimum: 1000
          type: integer
        updated_at:
          format: date-time
          type: string
        updated_by_id:
          type: string
      required:
        - _id
        - created_at
        - updated_at
        - created_by_id
        - updated_by_id
        - project_id
        - display_name
        - enabled
        - timeout
      type: object
    Expression:
      additionalProperties: false
      properties:
        cel:
          maxLength: 2000
          minLength: 1
          type: string
        config:
          type: object
          additionalProperties: {}
      required:
        - cel
      type: object
    GuardrailRef:
      additionalProperties: false
      properties:
        execute_on:
          enum:
            - input
            - output
            - both
          type: string
        id:
          type: string
          minLength: 1
        is_guardrail:
          type: boolean
        options:
          type: object
          additionalProperties: {}
        sample_rate:
          format: double
          maximum: 1
          minimum: 0
          type: number
      required:
        - id
        - execute_on
      type: object
  securitySchemes:
    ApiKey:
      type: http
      scheme: bearer
      bearerFormat: JWT

````