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

# Update a Benchmark.

> Update a Benchmark. Fields that are null will preserve the existing value. Fields that are provided (including empty values) will replace the existing value entirely.



## OpenAPI

````yaml /openapi-specs/stainless-processed-openapi.json post /v1/benchmarks/{id}
openapi: 3.1.0
info:
  title: RunLoop API
  version: '0.1'
  description: >-
    The RunLoop API spec that allows you to host lambda functions and Devboxes
    to enable scaled long running ai workflows.
  contact:
    name: Runloop AI Support
    url: https://runloop.ai
    email: support@runloop.ai
servers:
  - url: https://api.runloop.ai
    description: Runloop API
    variables: {}
security:
  - bearerAuth: []
tags:
  - name: Benchmark
  - name: Blueprint
  - name: Blueprint-Lifecycle
  - name: Blueprint-ObservabilityTools
  - name: Devbox
  - name: Devbox-FileTools
  - name: Devbox-Lifecycle
  - name: Devbox-NetworkTools
  - name: Devbox-ObservabilityTools
  - name: Devbox-PersistenceTools
  - name: Devbox-ShellTools
  - name: Scenario
  - name: ScenarioScorer
  - name: accounts
  - name: agents
  - name: apikeys
  - name: axons
  - name: executions
  - name: gateway-configs
  - name: mcp-configs
  - name: network-policies
  - name: objects
  - name: restricted_keys
  - name: secrets
  - name: streaming
paths:
  /v1/benchmarks/{id}:
    post:
      tags:
        - Benchmark
      summary: Update a Benchmark.
      description: >-
        Update a Benchmark. Fields that are null will preserve the existing
        value. Fields that are provided (including empty values) will replace
        the existing value entirely.
      operationId: updateBenchmark
      parameters:
        - name: id
          in: path
          description: The Benchmark ID.
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/BenchmarkUpdateParameters'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BenchmarkDefinitionView'
      x-codeSamples:
        - lang: JavaScript
          source: |-
            import Runloop from '@runloop/api-client';

            const client = new Runloop({
              bearerToken: process.env['RUNLOOP_API_KEY'], // This is the default and can be omitted
            });

            const benchmarkView = await client.benchmarks.update('id');

            console.log(benchmarkView.id);
        - lang: Python
          source: |-
            import os
            from runloop_api_client import Runloop

            client = Runloop(
                bearer_token=os.environ.get("RUNLOOP_API_KEY"),  # This is the default and can be omitted
            )
            benchmark_view = client.benchmarks.update(
                id="id",
            )
            print(benchmark_view.id)
components:
  schemas:
    BenchmarkUpdateParameters:
      type: object
      description: >-
        BenchmarkUpdateParameters contain the set of parameters to update a
        Benchmark. All fields are optional - null fields preserve existing
        values, provided fields replace entirely.
      properties:
        name:
          description: The unique name of the Benchmark. Cannot be blank.
          type:
            - string
            - 'null'
        scenario_ids:
          items:
            type: string
          description: >-
            The Scenario IDs that make up the Benchmark. Pass in empty list to
            clear.
          type:
            - array
            - 'null'
        metadata:
          additionalProperties:
            type: string
          description: >-
            User defined metadata to attach to the benchmark. Pass in empty map
            to clear.
          type:
            - object
            - 'null'
        required_environment_variables:
          items:
            type: string
          description: >-
            Environment variables required to run the benchmark. If any required
            variables are not supplied, the benchmark will fail to start. Pass
            in empty list to clear.
          type:
            - array
            - 'null'
        required_secret_names:
          items:
            type: string
          description: >-
            Secrets required to run the benchmark with (environment variable
            name will be mapped to the your user secret by name). If any of
            these secrets are not provided or the mapping is incorrect, the
            benchmark will fail to start. Pass in empty list to clear.
          type:
            - array
            - 'null'
        attribution:
          description: >-
            Attribution information for the benchmark. Pass in empty string to
            clear.
          type:
            - string
            - 'null'
        description:
          description: >-
            Detailed description of the benchmark. Pass in empty string to
            clear.
          type:
            - string
            - 'null'
    BenchmarkDefinitionView:
      type: object
      description: >-
        A BenchmarkDefinitionView represents a grouped set of Scenarios that
        together form a Benchmark.
      properties:
        id:
          type: string
          description: The ID of the Benchmark.
        name:
          type: string
          description: The name of the Benchmark.
        scenarioIds:
          type: array
          items:
            type: string
          description: List of Scenario IDs that make up the benchmark.
        metadata:
          type: object
          additionalProperties:
            type: string
          description: User defined metadata to attach to the benchmark for organization.
        required_environment_variables:
          type: array
          items:
            type: string
          description: >-
            Required environment variables used to run the benchmark. If any
            required environment variables are missing, the benchmark will fail
            to start.
        required_secret_names:
          type: array
          items:
            type: string
          description: >-
            Required secrets used to run the benchmark. If any required secrets
            are missing, the benchmark will fail to start.
        is_public:
          type: boolean
          description: Whether this benchmark is public.
        attribution:
          type: string
          description: Attribution information for the benchmark.
        description:
          type: string
          description: Detailed description of the benchmark.
        status:
          $ref: '#/components/schemas/BenchmarkStatus'
          description: >-
            Whether the benchmark is active or archived. Archived benchmarks are
            excluded from listings and cannot be run.
      required:
        - id
        - name
        - scenarioIds
        - metadata
        - status
    BenchmarkStatus:
      type: string
      enum:
        - active
        - archived
  securitySchemes:
    bearerAuth:
      scheme: bearer
      type: http

````