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

# List all results templates

> Returns a map of result ID to result object. Pass `?details=1` for full details.




## OpenAPI

````yaml /openapi/private/specs/services/pl.yml get /pl/results/
openapi: 3.1.0
info:
  title: Prompt Library (PL) Service API
  description: >
    The central configuration store for sages, council sages, contexts, and
    results.

    All entities use versioned soft-delete with history tables for full audit
    trails.


    ## Authentication

    All endpoints require authentication via one of two methods:

    - **API Key**: Pass the key in the `X-Auth` header (service-to-service
    calls)

    - **JWT Token**: Pass a Bearer token in the `Authorization` header
    (user-facing calls)


    The required permission level is noted per endpoint.


    ## Sub-Modules

    - **Sage** -- Base sage templates (interview configurations)

    - **Council Sage** -- Council-specific sage instances with customizations

    - **Context** -- Job description and role analysis data

    - **Results** -- Evaluation template configurations (scoring,
    recommendations)


    ## Data Model

    - **Versioning** -- Every update creates a new version (soft update)

    - **Soft Delete** -- Delete sets `active = false` rather than removing rows

    - **History Tables** -- Each entity has a parallel `_history` table

    - **Relationships** -- Council Sage references Sage, Context, Results, and
    Status


    ## Query Patterns

    - `?details=1` -- Include full object details in list responses

    - `?active=true|false|all` -- Filter by active status

    - `?custom=1` -- Filter for custom sages only

    - List endpoints return `{id: object}` maps; get endpoints return single
    objects
  version: 1.0.0
  contact:
    name: Platform Team
servers:
  - url: '{protocol}://{host}:{port}'
    description: Prompt Library Service
    variables:
      protocol:
        default: https
        enum:
          - http
          - https
      host:
        default: localhost
      port:
        default: '5000'
security: []
tags:
  - name: Sage
    description: Base sage template CRUD
  - name: Council Sage
    description: Council-specific sage instance CRUD and prompts
  - name: Context
    description: Job context CRUD (PL database)
  - name: Results
    description: Results template CRUD
  - name: Service
    description: Health checks and initialization
paths:
  /pl/results/:
    get:
      tags:
        - Results
      summary: List all results templates
      description: >
        Returns a map of result ID to result object. Pass `?details=1` for full
        details.
      operationId: listResults
      parameters:
        - $ref: '#/components/parameters/Details'
        - $ref: '#/components/parameters/RequiredPermission_council_screen'
      responses:
        '200':
          description: Results listed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResultMapResponse'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '500':
          $ref: '#/components/responses/InternalError'
      security:
        - jwtAuth: []
components:
  parameters:
    Details:
      name: details
      in: query
      required: false
      description: Set to `1` to include full object details
      schema:
        type: string
        enum:
          - '0'
          - '1'
        default: '0'
    RequiredPermission_council_screen:
      name: X-Permission-Info
      in: header
      required: false
      description: >-
        **Required JWT permission: `council_screen`** (informational only --
        enforced server-side)
      schema:
        type: string
  schemas:
    ResultMapResponse:
      type: object
      description: Map of result ID to result object
      additionalProperties:
        $ref: '#/components/schemas/ResultResponse'
    ResultResponse:
      type: object
      description: Results record (from ResultModel.to_dict())
      properties:
        id:
          type: string
          format: uuid
        name:
          type: string
        active:
          type: boolean
        version:
          type: integer
        evaluator_role:
          type:
            - string
            - 'null'
        recommendation:
          type:
            - string
            - 'null'
        output_format:
          type:
            - string
            - 'null'
        sage_id:
          type: string
          format: uuid
        meta_data:
          type:
            - object
            - 'null'
        intro:
          type:
            - string
            - 'null'
        directions:
          type:
            - string
            - 'null'
    ErrorResponse:
      type: object
      required:
        - error
      properties:
        error:
          type: string
          description: Human-readable error message
  responses:
    Unauthorized:
      description: Authentication failed
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          examples:
            noApiKey:
              summary: Missing API key
              value:
                error: Unauthorized - API key required
            invalidApiKey:
              summary: Invalid API key
              value:
                error: Unauthorized - Invalid API key
            noToken:
              summary: Missing JWT token
              value:
                error: Unauthorized - No valid token
            invalidToken:
              summary: Invalid or expired JWT
              value:
                error: Unauthorized3
            insufficientPermissions:
              summary: Token lacks required permission
              value:
                error: Unauthorized4
            apiKeyInsteadOfJwt:
              summary: API key sent to JWT-only endpoint
              value:
                error: Unauthorized - JWT token required, not API key
    InternalError:
      description: Unexpected server error
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          example:
            error: Internal server error
  securitySchemes:
    jwtAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: User JWT token passed in Authorization header

````