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

# Figures

> Render the requested plots. A plot that fails comes back with ``ok=false``.



## OpenAPI

````yaml https://api.ionworks.com/openapi.json post /projects/{project_id}/dashboards/figures
openapi: 3.1.0
info:
  title: FastAPI
  version: 0.1.0
servers:
  - url: https://api.ionworks.com
    description: Production
security: []
paths:
  /projects/{project_id}/dashboards/figures:
    post:
      tags:
        - dashboards
      summary: Figures
      description: >-
        Render the requested plots. A plot that fails comes back with
        ``ok=false``.
      operationId: figures_projects__project_id__dashboards_figures_post
      parameters:
        - name: project_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: Project Id
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/FiguresRequest'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FiguresResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    FiguresRequest:
      properties:
        plots:
          items:
            $ref: '#/components/schemas/PlotRequest'
          type: array
          maxItems: 50
          minItems: 1
          title: Plots
      additionalProperties: false
      type: object
      required:
        - plots
      title: FiguresRequest
    FiguresResponse:
      properties:
        figures:
          items:
            $ref: '#/components/schemas/FigureResult'
          type: array
          title: Figures
      type: object
      required:
        - figures
      title: FiguresResponse
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    PlotRequest:
      properties:
        plot_id:
          type: string
          format: uuid
          title: Plot Id
        params:
          additionalProperties:
            $ref: '#/components/schemas/JsonValue'
          type: object
          title: Params
      additionalProperties: false
      type: object
      required:
        - plot_id
      title: PlotRequest
    FigureResult:
      properties:
        plot_id:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
          title: Plot Id
        ok:
          type: boolean
          title: Ok
        figure:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Figure
        error:
          anyOf:
            - type: string
            - type: 'null'
          title: Error
        warnings:
          items:
            type: string
          type: array
          title: Warnings
        provenance_summary:
          additionalProperties:
            type: integer
          type: object
          title: Provenance Summary
        cached:
          type: boolean
          title: Cached
          default: false
        cost:
          $ref: '#/components/schemas/Cost'
        summary:
          anyOf:
            - $ref: '#/components/schemas/FigureSummary'
            - type: 'null'
        datasets_summary:
          anyOf:
            - additionalProperties:
                $ref: '#/components/schemas/DatasetSummary'
              type: object
            - type: 'null'
          title: Datasets Summary
        controls:
          anyOf:
            - additionalProperties:
                items:
                  $ref: '#/components/schemas/ControlOption'
                type: array
              type: object
            - type: 'null'
          title: Controls
      type: object
      required:
        - ok
      title: FigureResult
    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
    JsonValue: {}
    Cost:
      properties:
        sources:
          type: integer
          title: Sources
          default: 0
        rows:
          type: integer
          title: Rows
          default: 0
        points:
          type: integer
          title: Points
          default: 0
        ms:
          type: integer
          title: Ms
          default: 0
      type: object
      title: Cost
    FigureSummary:
      properties:
        traces:
          type: integer
          title: Traces
        points:
          type: integer
          title: Points
        trace_names:
          items:
            type: string
          type: array
          title: Trace Names
        x_range:
          anyOf:
            - items:
                anyOf:
                  - type: number
                  - type: 'null'
              type: array
            - type: 'null'
          title: X Range
        y_range:
          anyOf:
            - items:
                anyOf:
                  - type: number
                  - type: 'null'
              type: array
            - type: 'null'
          title: Y Range
      type: object
      required:
        - traces
        - points
        - trace_names
      title: FigureSummary
      description: What the agent sees about a rendered figure without the whole payload.
    DatasetSummary:
      properties:
        kind:
          type: string
          enum:
            - rows
            - series
            - other
          title: Kind
        rows:
          anyOf:
            - type: integer
            - type: 'null'
          title: Rows
        ids:
          anyOf:
            - type: integer
            - type: 'null'
          title: Ids
        points:
          anyOf:
            - type: integer
            - type: 'null'
          title: Points
        columns:
          additionalProperties:
            $ref: '#/components/schemas/ColumnStats'
          type: object
          title: Columns
      type: object
      required:
        - kind
      title: DatasetSummary
      description: >-
        One executed step, as the author needs to see it before trusting a
        figure.
    ControlOption:
      properties:
        value:
          anyOf:
            - type: string
            - type: integer
            - type: number
            - type: boolean
          title: Value
        label:
          anyOf:
            - type: string
              maxLength: 200
            - type: 'null'
          title: Label
      additionalProperties: false
      type: object
      required:
        - value
      title: ControlOption
      description: 'One select choice: ``value`` reaches the recipe, ``label`` is displayed.'
    ColumnStats:
      properties:
        count:
          type: integer
          title: Count
        min:
          anyOf:
            - type: number
            - type: 'null'
          title: Min
        max:
          anyOf:
            - type: number
            - type: 'null'
          title: Max
        nan:
          anyOf:
            - type: integer
            - type: 'null'
          title: Nan
      type: object
      required:
        - count
      title: ColumnStats
      description: >-
        What one column of an executed step held. ``min``/``max``/``nan`` are
        set for

        numeric columns only; a string column reports ``count`` alone.

````