> ## 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.

# Create an experiment job configuration

> Create a new job configuration for an experiment.



## OpenAPI

````yaml /api-reference/5.9/fusion-api-job-rest-server.json post /spark/configurations/experiment
openapi: 3.0.1
info:
  title: Job REST Server API
  description: This group of APIs allows you to manage jobs, recommendations, and signals.
  contact:
    name: Lucidworks
    url: www.lucidworks.com
    email: support@lucidworks.com
  license:
    name: License of the API
    url: https://lucidworks.com/legal/developer-license-agreement/
  version: '5.9'
servers:
  - url: https://{FUSION HOST}/api
    description: Fusion
    variables:
      FUSION HOST:
        default: FUSION_HOST
        description: Your environment host.
  - url: https://{FUSION HOST}/api/apps/{APP_NAME}
    description: Fusion app
    variables:
      FUSION HOST:
        default: FUSION_HOST
        description: Your environment host.
      APP_NAME:
        default: APP_NAME
        description: The name of your Fusion application.
security:
  - Basic auth: []
  - API key: []
tags:
  - name: Recommendation Controller API
    description: Endpoints for the recommendation controller.
  - name: Signals Controller API
    description: Endpoints for the signals controller.
  - name: Spark Job Config Controller API
    description: Use these endpoints to manage Spark job configurations.
  - name: Spark Job Controller API
    description: Use these endpoints to start, stop, and check the status of Spark jobs.
externalDocs:
  description: Lucidworks Documentation
  url: https://doc.lucidworks.com/
paths:
  /spark/configurations/experiment:
    post:
      tags:
        - Spark Job Config Controller API
      summary: Create an experiment job configuration
      description: Create a new job configuration for an experiment.
      operationId: createJobConfigurationsByExperiment
      parameters:
        - name: fusionResource
          description: ''
          in: query
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Experiment'
        required: true
      responses:
        '200':
          description: OK
components:
  schemas:
    Experiment:
      type: object
      properties:
        id:
          description: The experiment ID.
          type: string
        description:
          description: The experiment's description.
          type: string
        uniqueIdParameter:
          description: The name of the request parameter containing the user ID.
          type: string
        baseSignalsCollection:
          description: >-
            Signals resulting from requests that flow through this experiment
            will go into the signal collection associated with this base
            collection.
          type: string
        variants:
          description: The variants belonging to this experiment.
          type: array
          items:
            $ref: '#/components/schemas/ExperimentVariant'
        automaticallyAdjustTraffic:
          description: >-
            `true` to enable multi-armed bandits, eliminating the need to
            specify a traffic weight for each variant.
          type: boolean
        enabled:
          description: '`true` if this experiment is enabled.'
          type: boolean
        startTimestamp:
          description: The experiment's start time.
          type: string
          format: date-time
        runId:
          description: The experiment run ID.
          type: string
        metrics:
          description: Metrics calculated during the experiment.
          type: array
          items:
            $ref: '#/components/schemas/ExperimentMetric'
    ExperimentVariant:
      type: object
      properties:
        id:
          description: The unique ID for this variant.
          type: string
        name:
          description: The variant name.
          type: string
        collection:
          description: >-
            The name of the main collection with which this variant is
            associated.  The signals collection associated with the main
            collection is used for the experiment.
          type: string
        queryPipeline:
          description: The name of the query pipeline used by this variant.
          type: string
        params:
          description: The variant's query parameters.
          type: array
          items:
            $ref: '#/components/schemas/ParamAndValue'
        weight:
          description: This variant's traffic weight.
          type: number
          format: double
    ExperimentMetric:
      required:
        - type
      type: object
      properties:
        name:
          description: The metric name.
          type: string
        description:
          description: A human-readable description of the metric.
          type: string
        jobId:
          description: The ID of the experiment metrics job.
          type: string
        binary:
          description: ''
          type: boolean
        primary:
          description: ''
          type: boolean
        type:
          description: >-
            An abbreviation for the metric type, such as `ctr` for Click-Through
            Rate.
          type: string
      discriminator:
        propertyName: type
    ParamAndValue:
      type: object
      properties:
        key:
          type: string
        value:
          type: string
        policy:
          type: string
          enum:
            - replace
            - append
            - remove
            - default
  securitySchemes:
    Basic auth:
      type: http
      scheme: basic
    API key:
      name: x-api-key
      type: apiKey
      in: header

````