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

# Put experiments metrics



## OpenAPI

````yaml /api-reference/4.2/service-experiments.json put /experiments/{id}/metrics
openapi: 3.0.0
info:
  version: 4.2.6-rc1
  title: Fusion Service experiments
servers:
  - url: /api/apollo/
security: []
tags:
  - name: experiments
paths:
  /experiments/{id}/metrics:
    put:
      tags:
        - 4.2 Experiments API
      operationId: recompute
      parameters:
        - name: id
          in: path
          description: The experiment ID
          required: true
          schema:
            type: string
        - name: sync
          in: query
          description: >-
            When true, run the job synchronously; the request will not return
            until the metrics calculations jobs are complete
          required: false
          schema:
            type: boolean
            default: false
        - name: syncWaitSeconds
          in: query
          description: >-
            The maximum amount of time to wait for metrics calculation jobs to
            complete, in seconds. Applicable only if syncis 'true'
          required: false
          schema:
            type: integer
            format: int32
            default: 300
      responses:
        '200':
          description: successful operation
          headers: {}
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ExperimentRecomputeResponse'
components:
  schemas:
    ExperimentRecomputeResponse:
      type: object
      properties:
        jobs:
          type: array
          readOnly: true
          items:
            $ref: '#/components/schemas/SparkJobStatus'
    SparkJobStatus:
      type: object
      properties:
        state:
          type: string
          readOnly: true
          enum:
            - unknown
            - idle
            - starting
            - running
            - finishing
            - cancelling
            - finished
            - cancelled
            - error
            - skipped
        jobId:
          type: string
          readOnly: true
        jobConfig:
          $ref: '#/components/schemas/SparkJobConfig'
        hostname:
          type: string
          readOnly: true
        result:
          $ref: '#/components/schemas/SparkJobResult'
        startTime:
          type: string
          readOnly: true
        endTime:
          type: string
          readOnly: true
        duration:
          type: integer
          format: int64
          readOnly: true
    SparkJobConfig:
      type: object
      properties:
        id:
          type: string
          readOnly: true
    SparkJobResult:
      type: object
      properties:
        jobConfigId:
          type: string
          readOnly: true
        jobRunId:
          type: string
          readOnly: true
        docsWritten:
          type: integer
          format: int64
          readOnly: true
        exception:
          $ref: '#/components/schemas/JobExecutionError'
    JobExecutionError:
      type: object
      discriminator:
        propertyName: type
      properties:
        job:
          $ref: '#/components/schemas/FusionResource'
        jobRunId:
          type: string
          readOnly: true
        httpStatusCode:
          type: integer
          format: int32
          readOnly: true
        error:
          type: string
          readOnly: true
        message:
          type: string
          readOnly: true
        details:
          type: string
          readOnly: true
        cause:
          $ref: '#/components/schemas/Throwable'
        stackTrace:
          type: array
          items:
            $ref: '#/components/schemas/StackTraceElement'
        localizedMessage:
          type: string
        suppressed:
          type: array
          items:
            $ref: '#/components/schemas/Throwable'
        httpStatusMessage:
          type: string
          readOnly: true
        class:
          type: string
          readOnly: true
        requestId:
          type: string
          readOnly: true
    FusionResource:
      type: object
      properties:
        type:
          type: string
          enum:
            - APPKIT_APP
            - WEBAPP_ADMIN_APP
            - APP
            - COLLECTION
            - INDEX_PIPELINE
            - INDEX_STAGE
            - QUERY_STAGE
            - QUERY_PIPELINE
            - INDEX_PROFILE
            - QUERY_PROFILE
            - BLOB
            - PARSER
            - DATASOURCE
            - TASK
            - SCHEDULE
            - SEARCH_CLUSTER
            - EXPERIMENT
            - SPARK_JOB
            - GROUP
            - CUSTOM_RULE_TYPE
            - TYPE
            - RESOURCE
            - 'NULL'
        id:
          type: string
        canonicalName:
          type: string
        uri:
          type: string
          format: uri
    Throwable:
      type: object
      properties:
        cause:
          $ref: '#/components/schemas/Throwable'
        stackTrace:
          type: array
          items:
            $ref: '#/components/schemas/StackTraceElement'
        message:
          type: string
        localizedMessage:
          type: string
        suppressed:
          type: array
          items:
            $ref: '#/components/schemas/Throwable'
    StackTraceElement:
      type: object
      properties:
        methodName:
          type: string
        fileName:
          type: string
        lineNumber:
          type: integer
          format: int32
        className:
          type: string
        nativeMethod:
          type: boolean
          default: false

````