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

# Update a planned measurement

> Patch a planned measurement.



## OpenAPI

````yaml https://api.ionworks.com/openapi.json patch /projects/{project_id}/planned_measurements/{planned_measurement_id}
openapi: 3.1.0
info:
  title: FastAPI
  version: 0.1.0
servers:
  - url: https://api.ionworks.com
    description: Production
security: []
paths:
  /projects/{project_id}/planned_measurements/{planned_measurement_id}:
    patch:
      tags:
        - Planned Measurements
      summary: Update a planned measurement
      description: Patch a planned measurement.
      operationId: >-
        update_planned_measurement_projects__project_id__planned_measurements__planned_measurement_id__patch
      parameters:
        - name: project_id
          in: path
          required: true
          schema:
            type: string
            title: Project Id
        - name: planned_measurement_id
          in: path
          required: true
          schema:
            type: string
            title: Planned Measurement Id
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdatePlannedMeasurement'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PlannedMeasurement'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    UpdatePlannedMeasurement:
      properties:
        name:
          anyOf:
            - type: string
              maxLength: 255
              minLength: 1
            - type: 'null'
          title: Name
        status:
          anyOf:
            - $ref: '#/components/schemas/PlannedMeasurementStatus'
            - type: 'null'
        cell_specification_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Cell Specification Id
        cell_instance_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Cell Instance Id
        channel_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Channel Id
        protocol:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Protocol
        test_setup:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Test Setup
        planned_start_time:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Planned Start Time
        planned_end_time:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Planned End Time
        estimated_duration_seconds:
          anyOf:
            - type: integer
              minimum: 1
            - type: 'null'
          title: Estimated Duration Seconds
        setup_duration_seconds:
          anyOf:
            - type: integer
              minimum: 0
            - type: 'null'
          title: Setup Duration Seconds
        teardown_duration_seconds:
          anyOf:
            - type: integer
              minimum: 0
            - type: 'null'
          title: Teardown Duration Seconds
        started_measurement_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Started Measurement Id
        notes:
          anyOf:
            - type: string
            - type: 'null'
          title: Notes
      type: object
      title: UpdatePlannedMeasurement
      description: Request model for patching a planned measurement.
    PlannedMeasurement:
      properties:
        name:
          type: string
          maxLength: 255
          minLength: 1
          title: Name
        cell_specification_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Cell Specification Id
          description: Cell specification the requester wants tested (set at request time).
        cell_instance_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Cell Instance Id
          description: Cell instance this future measurement will run on.
        channel_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Channel Id
          description: Channel reserved for this measurement, once scheduled.
        protocol:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Protocol
          description: Planned protocol metadata.
        test_setup:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Test Setup
          description: Planned physical setup.
        planned_start_time:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Planned Start Time
          description: When setup/run is planned to start.
        planned_end_time:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Planned End Time
          description: When this planned measurement is expected to release the channel.
        estimated_duration_seconds:
          anyOf:
            - type: integer
              minimum: 1
            - type: 'null'
          title: Estimated Duration Seconds
          description: Expected run duration before scheduled times exist.
        setup_duration_seconds:
          type: integer
          minimum: 0
          title: Setup Duration Seconds
          description: Operator setup duration before the test starts.
          default: 0
        teardown_duration_seconds:
          type: integer
          minimum: 0
          title: Teardown Duration Seconds
          description: Operator teardown duration after the test finishes.
          default: 0
        notes:
          anyOf:
            - type: string
            - type: 'null'
          title: Notes
          description: Free-text planning notes.
        id:
          type: string
          title: Id
        organization_id:
          type: string
          title: Organization Id
        project_id:
          type: string
          title: Project Id
        status:
          $ref: '#/components/schemas/PlannedMeasurementStatus'
        requested_by:
          type: string
          title: Requested By
        scheduled_by:
          anyOf:
            - type: string
            - type: 'null'
          title: Scheduled By
        scheduled_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Scheduled At
        started_measurement_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Started Measurement Id
        cancelled_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Cancelled At
        completed_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Completed At
        created_at:
          type: string
          format: date-time
          title: Created At
        updated_at:
          type: string
          format: date-time
          title: Updated At
        created_by_email:
          anyOf:
            - type: string
            - type: 'null'
          title: Created By Email
      type: object
      required:
        - name
        - id
        - organization_id
        - project_id
        - status
        - requested_by
        - created_at
        - updated_at
      title: PlannedMeasurement
      description: A planned measurement row returned by the API.
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    PlannedMeasurementStatus:
      type: string
      enum:
        - requested
        - scheduled
        - in_progress
        - completed
        - cancelled
      title: PlannedMeasurementStatus
      description: Lifecycle state for a planned measurement.
    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

````