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

# Preview a cell-spec mapping and its unit conversion

> What each mapped path reads in a cell spec: its value there and converted.



## OpenAPI

````yaml https://api.ionworks.com/openapi.json post /model_builders/preview_mapping
openapi: 3.1.0
info:
  title: FastAPI
  version: 0.1.0
servers:
  - url: https://api.ionworks.com
    description: Production
security: []
paths:
  /model_builders/preview_mapping:
    post:
      tags:
        - Model builders
      summary: Preview a cell-spec mapping and its unit conversion
      description: >-
        What each mapped path reads in a cell spec: its value there and
        converted.
      operationId: preview_mapping_model_builders_preview_mapping_post
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PreviewMappingRequest'
        required: true
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                additionalProperties:
                  $ref: '#/components/schemas/MappingPreview'
                type: object
                title: Response Preview Mapping Model Builders Preview Mapping Post
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    PreviewMappingRequest:
      properties:
        cell_spec_id:
          type: string
          title: Cell Spec Id
        mapping:
          additionalProperties:
            type: string
          type: object
          title: Mapping
          description: >-
            Parameter name -> dotted path in the cell spec, as in a DirectEntry
            mapping, e.g. 'cathode.properties.thickness'.
      type: object
      required:
        - cell_spec_id
        - mapping
      title: PreviewMappingRequest
      description: A mapping to read from one cell spec, to show its unit conversion.
    MappingPreview:
      properties:
        found:
          anyOf:
            - type: string
            - type: 'null'
          title: Found
          description: The spec's value, e.g. '75 um'.
        converted:
          anyOf:
            - type: string
            - type: 'null'
          title: Converted
          description: In the parameter's unit, e.g. '7.5e-05 m'.
        curve:
          anyOf:
            - items:
                items:
                  type: number
                type: array
              type: array
            - type: 'null'
          title: Curve
          description: 'For a table: a subsample of its converted [x, y] pairs.'
        issue:
          anyOf:
            - type: string
            - type: 'null'
          title: Issue
      type: object
      title: MappingPreview
      description: What one mapped path reads, before and after unit conversion.
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    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

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.