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

# Proposal



## OpenAPI

````yaml https://api.galileo.ai/public/v2/openapi.json get /v2/projects/{project_id}/runs/{log_stream_id}/lens_suggestions/runs/{suggestion_run_id}/proposals/{proposal_id}
openapi: 3.1.0
info:
  title: FastAPI
  version: 0.1.0
servers:
  - url: https://api.galileo.ai
    description: Galileo Public APIs - galileo-v2
security: []
paths:
  /v2/projects/{project_id}/runs/{log_stream_id}/lens_suggestions/runs/{suggestion_run_id}/proposals/{proposal_id}:
    get:
      tags:
        - lens-suggestions
      summary: Proposal
      operationId: >-
        proposal_v2_projects__project_id__runs__log_stream_id__lens_suggestions_runs__suggestion_run_id__proposals__proposal_id__get
      parameters:
        - name: project_id
          in: path
          required: true
          schema:
            type: string
            format: uuid4
            title: Project Id
        - name: suggestion_run_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: Suggestion Run Id
        - name: proposal_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: Proposal Id
        - name: log_stream_id
          in: path
          required: true
          schema:
            type: string
            format: uuid4
            title: Log Stream Id
        - name: revision
          in: query
          required: true
          schema:
            type: string
            maxLength: 64
            title: Revision
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/LensProposalContext'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - APIKeyHeader: []
        - ClassicAPIKeyHeader: []
        - OAuth2PasswordBearer: []
        - HTTPBasic: []
components:
  schemas:
    LensProposalContext:
      properties:
        proposal:
          $ref: '#/components/schemas/LensProposalView'
        revision:
          type: string
          title: Revision
        project_id:
          type: string
          format: uuid
          title: Project Id
        run_id:
          type: string
          format: uuid
          title: Run Id
        existing_lens:
          anyOf:
            - $ref: '#/components/schemas/CurrentLensSnapshot'
            - type: 'null'
        current_lenses:
          items:
            $ref: '#/components/schemas/CurrentLensSnapshot'
          type: array
          title: Current Lenses
      additionalProperties: false
      type: object
      required:
        - proposal
        - revision
        - project_id
        - run_id
        - existing_lens
        - current_lenses
      title: LensProposalContext
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    LensProposalView:
      properties:
        action:
          type: string
          enum:
            - create
            - update
          title: Action
        lens_id:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
          title: Lens Id
        template_id:
          type: string
          maxLength: 256
          minLength: 1
          title: Template Id
        name:
          type: string
          maxLength: 20000
          minLength: 1
          title: Name
        definition:
          type: string
          maxLength: 20000
          minLength: 1
          title: Definition
        counting_unit:
          type: string
          maxLength: 20000
          minLength: 1
          title: Counting Unit
        human_work:
          type: string
          maxLength: 20000
          minLength: 1
          title: Human Work
        value_connection:
          type: string
          maxLength: 20000
          minLength: 1
          title: Value Connection
        evidence_refs:
          items:
            type: string
            maxLength: 256
            minLength: 1
          type: array
          maxItems: 100
          minItems: 1
          title: Evidence Refs
        assistant_prompt:
          type: string
          maxLength: 20000
          minLength: 1
          title: Assistant Prompt
        proposal_id:
          type: string
          format: uuid
          title: Proposal Id
        value_direction:
          type: string
          enum:
            - positive
            - negative
            - context_dependent
          title: Value Direction
        updated_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Updated At
          description: >-
            When this suggestion's product content last changed, independent of
            later checks.
      additionalProperties: false
      type: object
      required:
        - action
        - lens_id
        - template_id
        - name
        - definition
        - counting_unit
        - human_work
        - value_connection
        - evidence_refs
        - assistant_prompt
        - proposal_id
        - value_direction
      title: LensProposalView
    CurrentLensSnapshot:
      properties:
        lens_id:
          type: string
          format: uuid
          title: Lens Id
        name:
          type: string
          title: Name
        description:
          anyOf:
            - type: string
            - type: 'null'
          title: Description
        head_version:
          type: integer
          title: Head Version
        definition:
          $ref: '#/components/schemas/LensDefinition'
      additionalProperties: false
      type: object
      required:
        - lens_id
        - name
        - description
        - head_version
        - definition
      title: CurrentLensSnapshot
    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
    LensDefinition:
      properties:
        schema_version:
          type: integer
          const: 6
          title: Schema Version
          default: 6
        match_mode:
          type: string
          enum:
            - all
            - any
          title: Match Mode
          default: all
        criteria:
          items:
            oneOf:
              - $ref: '#/components/schemas/AgentCriterion'
              - $ref: '#/components/schemas/EvaluatorCriterion'
              - $ref: '#/components/schemas/MetadataCriterion'
            discriminator:
              propertyName: type
              mapping:
                agent: '#/components/schemas/AgentCriterion'
                eval_result: '#/components/schemas/EvaluatorCriterion'
                metadata: '#/components/schemas/MetadataCriterion'
          type: array
          maxItems: 20
          minItems: 1
          title: Criteria
        value_rules:
          items:
            $ref: '#/components/schemas/LensValueRule'
          type: array
          maxItems: 20
          minItems: 1
          title: Value Rules
      additionalProperties: false
      type: object
      required:
        - criteria
        - value_rules
      title: LensDefinition
      description: >-
        What counts, what it is worth and which spend it costs. One agent stream
        selects the sessions and supplies its full recorded cost.
    AgentCriterion:
      properties:
        type:
          type: string
          const: agent
          title: Type
          default: agent
        agent:
          $ref: '#/components/schemas/AgentReference'
      additionalProperties: false
      type: object
      required:
        - agent
      title: AgentCriterion
    EvaluatorCriterion:
      properties:
        type:
          type: string
          const: eval_result
          title: Type
          default: eval_result
        evaluator:
          $ref: '#/components/schemas/EvaluatorReference'
        operator:
          type: string
          enum:
            - eq
            - ne
          title: Operator
          default: eq
        value:
          type: boolean
          title: Value
      additionalProperties: false
      type: object
      required:
        - evaluator
        - value
      title: EvaluatorCriterion
    MetadataCriterion:
      properties:
        type:
          type: string
          const: metadata
          title: Type
          default: metadata
        key:
          type: string
          maxLength: 256
          minLength: 1
          title: Key
        operator:
          type: string
          enum:
            - eq
            - ne
          title: Operator
          default: eq
        value:
          type: string
          maxLength: 4096
          title: Value
      additionalProperties: false
      type: object
      required:
        - key
        - value
      title: MetadataCriterion
    LensValueRule:
      properties:
        position:
          type: integer
          maximum: 20
          minimum: 1
          title: Position
        evaluator:
          $ref: '#/components/schemas/EvaluatorReference'
        label:
          type: string
          maxLength: 4096
          minLength: 1
          title: Label
        value_per_result:
          type: string
          maxLength: 14
          pattern: ^(0|[1-9][0-9]*)(\.[0-9]{1,6})?$
          title: Value Per Result
      additionalProperties: false
      type: object
      required:
        - position
        - evaluator
        - label
        - value_per_result
      title: LensValueRule
    AgentReference:
      properties:
        kind:
          type: string
          const: log_stream
          title: Kind
          default: log_stream
        project_id:
          type: string
          format: uuid
          title: Project Id
        log_stream_id:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
          title: Log Stream Id
      additionalProperties: false
      type: object
      required:
        - project_id
        - log_stream_id
      title: AgentReference
    EvaluatorReference:
      properties:
        scorer_id:
          type: string
          format: uuid
          title: Scorer Id
        level:
          type: string
          enum:
            - session
            - trace
          title: Level
      additionalProperties: false
      type: object
      required:
        - scorer_id
        - level
      title: EvaluatorReference
  securitySchemes:
    APIKeyHeader:
      type: apiKey
      in: header
      name: Splunk-AO-API-Key
    ClassicAPIKeyHeader:
      type: apiKey
      in: header
      name: Galileo-API-Key
    OAuth2PasswordBearer:
      type: oauth2
      flows:
        password:
          scopes: {}
          tokenUrl: https://api.galileo.ai/login
    HTTPBasic:
      type: http
      scheme: basic

````