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

# Preview a revision's RAW response + narrowed field map (no persist)

> Run a revision's HTTP config and return the RAW body + a narrowed preview.

Powers the dashboard field-map editor (ENG-631). Unlike ``/execute`` (which
runs the active revision and narrows by its saved map), this runs the given
revision with no narrowing so the raw side is always raw, then computes
``narrowed`` from the effective field map (request override → the revision's
saved ``response_schema`` → none). Verifies the revision belongs to the
caller's org AND to ``tool_id`` (404 otherwise). Persists nothing.



## OpenAPI

````yaml /api-reference/openapi.json post /v1/tools/{tool_id}/revisions/{revision_id}/test
openapi: 3.1.0
info:
  title: Feather API
  description: >-
    Unified customer experience platform API. Manages identity, conversations,
    memory, agents, procedures, policies, model routing, knowledge bases,
    integrations, and runtime execution.
  version: 1.21.0
servers:
  - url: https://api-sandbox.featherhq.com
    description: Sandbox
  - url: http://localhost:8000
    description: Local dev
security: []
paths:
  /v1/tools/{tool_id}/revisions/{revision_id}/test:
    post:
      tags:
        - tools
      summary: Preview a revision's RAW response + narrowed field map (no persist)
      description: >-
        Run a revision's HTTP config and return the RAW body + a narrowed
        preview.


        Powers the dashboard field-map editor (ENG-631). Unlike ``/execute``
        (which

        runs the active revision and narrows by its saved map), this runs the
        given

        revision with no narrowing so the raw side is always raw, then computes

        ``narrowed`` from the effective field map (request override → the
        revision's

        saved ``response_schema`` → none). Verifies the revision belongs to the

        caller's org AND to ``tool_id`` (404 otherwise). Persists nothing.
      operationId: testToolRevision
      parameters:
        - name: tool_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: Tool Id
        - name: revision_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: Revision Id
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ToolRevisionTestRequest'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ToolRevisionTestResponse'
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Authentication required
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Resource not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - APIKeyHeader: []
components:
  schemas:
    ToolRevisionTestRequest:
      properties:
        input:
          additionalProperties: true
          type: object
          title: Input
        metadata:
          additionalProperties: true
          type: object
          title: Metadata
        response_field_map:
          anyOf:
            - $ref: '#/components/schemas/ResponseFieldSelector'
            - type: 'null'
      additionalProperties: false
      type: object
      title: ToolRevisionTestRequest
      description: >-
        Preview a revision's response + narrowing without persisting (ENG-631).


        Runs the revision's HTTP config and returns the RAW body plus a
        ``narrowed``

        preview. ``response_field_map`` is an optional unsaved selection to
        preview;

        when omitted the router falls back to the revision's saved

        ``response_schema``. Mirrors the integrations ``test-invoke`` surface.
    ToolRevisionTestResponse:
      properties:
        status_code:
          type: integer
          title: Status Code
        headers:
          additionalProperties:
            type: string
          type: object
          title: Headers
        body:
          title: Body
        narrowed:
          anyOf:
            - {}
            - type: 'null'
          title: Narrowed
        success:
          type: boolean
          title: Success
          default: true
        error:
          anyOf:
            - type: string
            - type: 'null'
          title: Error
        execution_time_ms:
          anyOf:
            - type: number
            - type: 'null'
          title: Execution Time Ms
        request_url:
          anyOf:
            - type: string
            - type: 'null'
          title: Request Url
        request_method:
          anyOf:
            - type: string
            - type: 'null'
          title: Request Method
      type: object
      required:
        - status_code
      title: ToolRevisionTestResponse
      description: >-
        Raw response body + narrowed preview for the dashboard field-map editor.


        ``body`` is always the RAW upstream response (never narrowed).
        ``narrowed``

        is what the agent would receive after applying the effective field map

        (request override → saved ``response_schema``); ``None`` when no map
        applies.
    ErrorResponse:
      properties:
        error:
          type: string
          title: Error
        message:
          type: string
          title: Message
      type: object
      required:
        - error
        - message
      title: ErrorResponse
      description: Standard error response returned by all API error handlers.
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    ResponseFieldSelector:
      properties:
        field_mappings:
          items:
            $ref: '#/components/schemas/ResponseFieldMapping'
          type: array
          title: Field Mappings
      type: object
      title: ResponseFieldSelector
      description: Defines which fields to extract from a tool response.
    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
    ResponseFieldMapping:
      properties:
        path:
          type: string
          title: Path
          description: Dot-path into the response (e.g. 'data.order.id')
        alias:
          anyOf:
            - type: string
            - type: 'null'
          title: Alias
          description: Output key name; defaults to full dot-path
      type: object
      required:
        - path
      title: ResponseFieldMapping
      description: A single field to extract from a tool response body.
  securitySchemes:
    APIKeyHeader:
      type: apiKey
      in: header
      name: x-api-key

````