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

# Approve a queued action (admin / editor)

> Performs the original request on the approver's behalf by replaying it through the normal request chain. Never permitted from an agent-initiated request. Refused as stale (409) if the target pipeline or tap changed since the action was queued.



## OpenAPI

````yaml /openapi.yaml post /api/v1/approvals/{id}/approve
openapi: 3.0.3
info:
  title: Datris API
  description: >
    REST API for the Datris AI Data Platform. Ingest, validate, transform,
    store, and retrieve data.


    For AI agent integration, use the [MCP
    Server](https://docs.datris.ai/mcp-server) instead.
  version: 1.28.0
  contact:
    name: Datris
    url: https://datris.ai
  license:
    name: Apache 2.0
servers:
  - url: http://localhost:8080
    description: Local development
security:
  - ApiKeyAuth: []
paths:
  /api/v1/approvals/{id}/approve:
    post:
      tags:
        - Agent Policy
      summary: Approve a queued action (admin / editor)
      description: >-
        Performs the original request on the approver's behalf by replaying it
        through the normal request chain. Never permitted from an
        agent-initiated request. Refused as stale (409) if the target pipeline
        or tap changed since the action was queued.
      parameters:
        - in: path
          name: id
          required: true
          schema:
            type: string
      responses:
        '200':
          description: >-
            Executed — `resultStatus` / `resultBody` carry the original call's
            outcome
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PendingAction'
        '409':
          description: Stale (resource version moved) or already decided
        '410':
          description: Expired before a decision
        '502':
          description: Approved but the replay failed (state `failed`)
components:
  schemas:
    PendingAction:
      type: object
      properties:
        id:
          type: string
        action:
          type: string
        resourceType:
          type: string
        resource:
          type: string
        resourceVersion:
          type: integer
        actor:
          type: object
        reason:
          type: string
        agentSession:
          type: string
        request:
          type: object
          description: The parked request (body already redacted)
        createdAt:
          type: string
        expiresAt:
          type: string
        state:
          type: string
          enum:
            - pending
            - approved
            - rejected
            - expired
            - executed
            - failed
        decidedBy:
          type: string
        decidedAt:
          type: string
        decisionNote:
          type: string
        executedAt:
          type: string
        resultStatus:
          type: integer
        resultBody:
          type: string
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: x-api-key
      description: Optional API key for authentication (enabled via application.yaml)

````