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

# Get policy input schema

> **Auth:** organization API key (`read` scope or higher) or a signed-in user.

The curated policy field catalogue merged with fields observed in this agent's traffic during the last 30 days. Each field carries its availability (`guaranteed`, `conditional`, `observed`) and a Rego snippet.



## OpenAPI

````yaml https://cp.xenovia.io/openapi.json get /api/v1/agents/{agent_id}/schema/policy-input
openapi: 3.1.0
info:
  title: Xenovia Control Plane API
  version: 1.0.0
  description: >-
    Management API for agents, providers, policies, telemetry, alerts and
    organization settings.
servers:
  - url: https://cp.xenovia.io
    description: Production
security:
  - BearerAuth: []
paths:
  /api/v1/agents/{agent_id}/schema/policy-input:
    get:
      tags:
        - agents
      summary: Get policy input schema
      description: >-
        **Auth:** organization API key (`read` scope or higher) or a signed-in
        user.


        The curated policy field catalogue merged with fields observed in this
        agent's traffic during the last 30 days. Each field carries its
        availability (`guaranteed`, `conditional`, `observed`) and a Rego
        snippet.
      operationId: get_policy_input_schema_api_v1_agents__agent_id__schema_policy_input_get
      parameters:
        - name: agent_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: Agent Id
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/PolicyInputFieldRead'
                title: >-
                  Response Get Policy Input Schema Api V1 Agents  Agent Id 
                  Schema Policy Input Get
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    PolicyInputFieldRead:
      properties:
        key:
          type: string
          title: Key
        value_type:
          type: string
          title: Value Type
        description:
          type: string
          title: Description
        group:
          type: string
          title: Group
          default: ''
        availability:
          type: string
          title: Availability
          default: observed
        stages:
          items:
            type: string
          type: array
          title: Stages
          default:
            - request
            - response
        snippet:
          type: string
          title: Snippet
          default: ''
        added_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Added At
        last_seen_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Last Seen At
      type: object
      required:
        - key
        - value_type
        - description
      title: PolicyInputFieldRead
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      description: >-
        Bearer token: an organization API key (`ak_…`) created under Settings →
        API Keys, or a dashboard user session token. Agent keys (`xe_…`) are not
        accepted here. Endpoints marked as user-only in their description reject
        organization keys with `403`.

````

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