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

# Get a policy

> Returns one policy, with `owner` and `lastEditedBy`.

**Required permission:** `policies:read`




## OpenAPI

````yaml /api-reference/openapi.yaml get /api/v1/policies/{id}
openapi: 3.1.0
info:
  title: Igris Management API
  version: '1'
  description: >-
    REST API for managing Igris connections, policies, sessions, audit events
    and alerts.
servers:
  - url: https://api.igrisecurity.com
security:
  - bearerAuth: []
tags:
  - name: Connections
  - name: Policies
  - name: Sessions
  - name: Audit Events
  - name: Incidents
  - name: Webhooks
  - name: API Keys
  - name: Members
  - name: LLM Providers
  - name: LLM Cost
  - name: Observe
paths:
  /api/v1/policies/{id}:
    get:
      tags:
        - Policies
      summary: Get a policy
      description: |
        Returns one policy, with `owner` and `lastEditedBy`.

        **Required permission:** `policies:read`
      operationId: getPolicy
      parameters:
        - $ref: '#/components/parameters/Id'
      responses:
        '200':
          description: The policy.
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    $ref: '#/components/schemas/Policy'
              example:
                data:
                  id: 7b1d4c2e-0000-4000-8000-000000000002
                  name: Cap GPT-4o spend
                  description: null
                  connectionSlugs: null
                  rules:
                    - target:
                        kind: llm_model
                        model: gpt-4o*
                      action: allow
                      limit:
                        dollars: 50
                        per: day
                      contentGuard:
                        detectors:
                          - pii_email
                          - pii_phone
                        action: redact
                  enabled: true
                  owner:
                    name: Alice
                    email: alice@company.com
                  lastEditedBy:
                    name: Bob
                    email: bob@company.com
                  createdAt: '2026-01-01T00:00:00Z'
                  updatedAt: '2026-01-02T00:00:00Z'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
components:
  parameters:
    Id:
      name: id
      in: path
      required: true
      schema:
        type: string
        format: uuid
  schemas:
    Policy:
      type: object
      description: A policy as returned by `GET`. It has `owner` and `lastEditedBy`.
      properties:
        id:
          type: string
          format: uuid
        organizationId:
          type: string
        serverId:
          type:
            - string
            - 'null'
        connectionSlugs:
          type:
            - array
            - 'null'
          items:
            type: string
          description: >-
            Connection slugs the policy applies to, or `null` for an org-wide
            policy.
        name:
          type: string
        description:
          type:
            - string
            - 'null'
        rules:
          type: array
          items:
            $ref: '#/components/schemas/PolicyRule'
        enabled:
          type: boolean
        owner:
          $ref: '#/components/schemas/PolicyPerson'
        lastEditedBy:
          $ref: '#/components/schemas/PolicyPerson'
        createdAt:
          type: string
          format: date-time
        updatedAt:
          type: string
          format: date-time
    PolicyRule:
      type: object
      required:
        - target
        - action
      properties:
        target:
          $ref: '#/components/schemas/PolicyRuleTarget'
        action:
          type: string
          enum:
            - allow
            - deny
            - alert
            - redact
        conditions:
          type: object
          description: >
            When the rule applies. Keys can only be `user` or `metadata.<key>`;
            any other key returns `422`. A value is a string (exact match) or
            one of `{ eq }`, `{ neq }`, `{ in: [...] }`, `{ nin: [...] }`.
          additionalProperties:
            oneOf:
              - type: string
              - type: object
                properties:
                  eq:
                    type: string
              - type: object
                properties:
                  neq:
                    type: string
              - type: object
                properties:
                  in:
                    type: array
                    items:
                      type: string
              - type: object
                properties:
                  nin:
                    type: array
                    items:
                      type: string
          example:
            user: alice@company.com
            metadata.env:
              in:
                - prod
                - staging
        limit:
          type: object
          description: >-
            Rate limit. Applies to LLM rules only; on an `mcp_tool` rule it
            returns `422`.
          required:
            - per
          properties:
            requests:
              type: number
              exclusiveMinimum: 0
            tokens:
              type: number
              exclusiveMinimum: 0
            dollars:
              type: number
              exclusiveMinimum: 0
            per:
              type: string
              enum:
                - minute
                - hour
                - day
        tokenGuard:
          type: object
          properties:
            maxInputTokens:
              type: number
              exclusiveMinimum: 0
            maxOutputTokens:
              type: number
              exclusiveMinimum: 0
            maxRequestMaxTokens:
              type: number
              exclusiveMinimum: 0
        contentGuard:
          type: object
          description: Content detectors to run. See [Guards](/govern/guards).
          required:
            - detectors
            - action
          properties:
            detectors:
              type: array
              minItems: 1
              maxItems: 50
              items:
                type: string
                minLength: 1
                maxLength: 80
            action:
              type: string
              enum:
                - deny
                - redact
                - alert
            inspectResponse:
              type: boolean
        logContent:
          type: boolean
    PolicyPerson:
      type:
        - object
        - 'null'
      properties:
        name:
          type: string
        email:
          type: string
    Error:
      type: object
      required:
        - error
      properties:
        error:
          type: string
    ForbiddenError:
      type: object
      properties:
        error:
          type: string
          example: Forbidden
        required:
          type: string
          description: The permission the caller lacks.
          example: policies:write
    PolicyRuleTarget:
      description: What the rule matches.
      oneOf:
        - type: object
          title: MCP tool
          required:
            - kind
            - tool
          properties:
            kind:
              type: string
              const: mcp_tool
            tool:
              type: string
              minLength: 1
              description: Tool name. `*` wildcards are allowed.
              example: delete_*
        - type: object
          title: LLM model
          required:
            - kind
            - model
          properties:
            kind:
              type: string
              const: llm_model
            model:
              type: string
              minLength: 1
              example: gpt-4o*
        - type: object
          title: LLM endpoint
          required:
            - kind
            - endpoint
          properties:
            kind:
              type: string
              const: llm_endpoint
            endpoint:
              type: string
              enum:
                - chat.completions
                - embeddings
                - images.generate
                - audio.transcriptions
                - audio.speech
                - passthrough
  responses:
    Unauthorized:
      description: No valid session or API key, or the key's creator is no longer a member.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error: Unauthorized
    Forbidden:
      description: The caller lacks the required permission.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ForbiddenError'
    NotFound:
      description: Not found.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error: Not found
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: ig_...
      description: >-
        An Igris API key. It acts with the current role and permission overrides
        of the member who created it.

````

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