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

# Upsert burn-in evaluation results (internal)

> Idempotently bulk-upsert materialised burn-in evaluation results.



## OpenAPI

````yaml /openapi/fleet-manager-openapi.yaml post /api/v1/burn-in/evaluations/results/
openapi: 3.0.3
info:
  title: Fleet Manager API
  version: 1.0.0
  description: API for the Nscale Fleet Manager
servers: []
security: []
paths:
  /api/v1/burn-in/evaluations/results/:
    post:
      tags:
        - Burn-in
      summary: Upsert burn-in evaluation results (internal)
      description: Idempotently bulk-upsert materialised burn-in evaluation results.
      operationId: api_v1_burn_in_evaluations_results_create
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/BurnInEvaluationResultsRequest'
          application/x-www-form-urlencoded:
            schema:
              $ref: '#/components/schemas/BurnInEvaluationResultsRequest'
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/BurnInEvaluationResultsRequest'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BurnInEvaluationResultsResponse'
          description: ''
        '400':
          description: Validation error.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Authentication credentials were not provided or are invalid.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: You do not have permission to perform this action.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      security:
        - oauth2:
            - test-execution:evaluate
        - cookieAuth: []
components:
  schemas:
    BurnInEvaluationResultsRequest:
      type: object
      description: Bulk materialisation result upsert request.
      properties:
        results:
          type: array
          items:
            $ref: '#/components/schemas/BurnInEvaluationResultItem'
      required:
        - results
    BurnInEvaluationResultsResponse:
      type: object
      description: Bulk materialisation result upsert response.
      properties:
        written:
          type: integer
          minimum: 0
        unchanged:
          type: integer
          minimum: 0
        stale:
          type: integer
          minimum: 0
        invalid:
          type: integer
          minimum: 0
      required:
        - invalid
        - stale
        - unchanged
        - written
    ErrorResponse:
      type: object
      description: >-
        Uniform error body for every 4xx/5xx response. `detail` is a
        human-readable message, always present, safe to display to end users.
        `code` is the machine-readable identifier. `field_errors` lists
        per-input-field validation messages and is empty for non-field errors
        (auth, permission, not-found, conflict, server).
      required:
        - detail
        - code
        - field_errors
      properties:
        detail:
          type: string
        code:
          $ref: '#/components/schemas/ErrorCodeEnum'
        field_errors:
          type: array
          items:
            $ref: '#/components/schemas/FieldError'
    BurnInEvaluationResultItem:
      type: object
      description: One materialised evaluation result posted by the agent.
      properties:
        execution_id:
          type: string
          format: uuid
        evaluation_result:
          $ref: '#/components/schemas/BurnInEvaluationResultPayloadSchema'
        evaluation_source_key:
          type: string
          description: >-
            SHA-256 hex digest of the resolved thresholds the agent evaluated
            with. A write is rejected as stale when this no longer matches the
            API's current threshold resolution (mid-rollout version skew).
          pattern: ^[0-9a-f]{64}$
        expected_updated_at:
          type: string
          format: date-time
      required:
        - evaluation_result
        - evaluation_source_key
        - execution_id
        - expected_updated_at
    ErrorCodeEnum:
      type: string
      description: >-
        Stable machine-readable error identifier. New members may be added
        within this API version; clients must tolerate unknown values.
      enum:
        - error
        - invalid
        - parse_error
        - authentication_failed
        - not_authenticated
        - permission_denied
        - not_found
        - method_not_allowed
        - not_acceptable
        - unsupported_media_type
        - conflict
        - enrollment_infrastructure_reference_pending
        - enrollment_infrastructure_reference_changed
        - unprocessable_entity
        - throttled
        - service_unavailable
    FieldError:
      type: object
      description: One input field's validation messages.
      required:
        - field
        - messages
      properties:
        field:
          type: string
          description: >-
            Dotted path to the offending input field, or to the collection row
            when the whole row is invalid (e.g. `filters.end_date`,
            `memberships.0.role`, `memberships.0`).
        messages:
          type: array
          minItems: 1
          items:
            type: string
    BurnInEvaluationResultPayloadSchema:
      type: object
      description: Materialised EvaluationResult payload.
      properties:
        passed:
          type: boolean
        reason:
          type: string
          nullable: true
        metric_evaluations:
          type: object
          additionalProperties:
            $ref: '#/components/schemas/BurnInMetricEvaluationSchema'
      required:
        - passed
    BurnInMetricEvaluationSchema:
      type: object
      description: Per-metric materialised threshold evaluation.
      properties:
        passed:
          type: boolean
        value_evaluation:
          allOf:
            - $ref: '#/components/schemas/ThresholdResult'
          nullable: true
        statistic_evaluations:
          type: object
          additionalProperties:
            $ref: '#/components/schemas/ThresholdResult'
          nullable: true
      required:
        - passed
    ThresholdResult:
      type: object
      description: Atomic result of comparing a value against a threshold.
      properties:
        passed:
          type: boolean
        threshold:
          allOf:
            - $ref: '#/components/schemas/MetricDisplayValue'
          nullable: true
        comparator:
          allOf:
            - $ref: '#/components/schemas/ComparatorTypeEnum'
          nullable: true
      required:
        - comparator
        - passed
        - threshold
    MetricDisplayValue:
      anyOf:
        - type: number
        - type: string
      nullable: true
    ComparatorTypeEnum:
      enum:
        - gt
        - lt
        - eq
        - gte
        - lte
      type: string
      description: |-
        * `gt` - gt
        * `lt` - lt
        * `eq` - eq
        * `gte` - gte
        * `lte` - lte
  securitySchemes:
    oauth2:
      type: oauth2
      flows: {}
    cookieAuth:
      type: apiKey
      in: cookie
      name: sessionid

````

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