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

# Resubmit Optimization

> Resubmit an optimization's failed job; return the refreshed resource.



## OpenAPI

````yaml https://api.ionworks.com/openapi.json post /optimizations/{id}/resubmit
openapi: 3.1.0
info:
  title: FastAPI
  version: 0.1.0
servers:
  - url: https://api.ionworks.com
    description: Production
security: []
paths:
  /optimizations/{id}/resubmit:
    post:
      tags:
        - optimizations
      summary: Resubmit Optimization
      description: Resubmit an optimization's failed job; return the refreshed resource.
      operationId: resubmit_optimization_optimizations__id__resubmit_post
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
            title: Id
      responses:
        '202':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OptimizationResource'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    OptimizationResource:
      properties:
        id:
          type: string
          title: Id
          description: Canonical optimization identifier.
        name:
          anyOf:
            - type: string
            - type: 'null'
          title: Name
        description:
          anyOf:
            - type: string
            - type: 'null'
          title: Description
        project_id:
          type: string
          title: Project Id
        organization_id:
          type: string
          title: Organization Id
        status:
          anyOf:
            - $ref: '#/components/schemas/DomainStatus'
            - type: 'null'
          description: Lifecycle status derived from the optimization run.
        kind:
          anyOf:
            - type: string
            - type: 'null'
          title: Kind
          description: >-
            Optimization kind discriminator (e.g. 'optimize', 'datafit');
            determines how the config is interpreted.
        created_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Created At
        created_by_email:
          anyOf:
            - type: string
            - type: 'null'
          title: Created By Email
        cell_spec_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Cell Spec Id
        parameterized_model_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Parameterized Model Id
        parameterized_model_name:
          anyOf:
            - type: string
            - type: 'null'
          title: Parameterized Model Name
          description: Display name of the parameterized model.
        cell_name:
          anyOf:
            - type: string
            - type: 'null'
          title: Cell Name
          description: Display name of the cell specification.
        optimization_template_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Optimization Template Id
        metrics:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Metrics
          description: Result metrics of the optimization, when complete.
        objectives:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Objectives
          description: >-
            Objectives/constraints from the config, for list display. Populated
            on list responses only.
        error:
          anyOf:
            - type: string
            - type: 'null'
          title: Error
          description: Error message if the run failed.
        error_code:
          anyOf:
            - type: string
            - type: 'null'
          title: Error Code
          description: Machine-readable error code.
        run_count:
          type: integer
          title: Run Count
          description: Number of multistart runs.
          default: 0
      type: object
      required:
        - id
        - project_id
        - organization_id
      title: OptimizationResource
      description: |-
        Frontend-facing view of an optimization.

        Replaces the job-centric ``{optimization, job}`` payload: the linked
        job is collapsed into a flat ``status`` plus result ``metrics`` and
        error fields, so clients never see the underlying job. Heavy config
        and metadata blobs are served by dedicated sub-resource endpoints
        rather than inlined here.
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    DomainStatus:
      type: string
      enum:
        - queued
        - running
        - succeeded
        - failed
        - canceled
      title: DomainStatus
      description: Frontend-facing lifecycle status for an async resource.
    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

````