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

# Get Simulation Spatial Profile

> Evaluate a one-dimensional spatial field from stored solution chunks.



## OpenAPI

````yaml https://api.ionworks.com/openapi.json get /simulations/{simulation_id}/spatial-profile
openapi: 3.1.0
info:
  title: FastAPI
  version: 0.1.0
servers:
  - url: https://api.ionworks.com
    description: Production
security: []
paths:
  /simulations/{simulation_id}/spatial-profile:
    get:
      tags:
        - Simulations
      summary: Get Simulation Spatial Profile
      description: Evaluate a one-dimensional spatial field from stored solution chunks.
      operationId: >-
        get_simulation_spatial_profile_simulations__simulation_id__spatial_profile_get
      parameters:
        - name: simulation_id
          in: path
          required: true
          schema:
            type: string
            title: Simulation Id
        - name: variable
          in: query
          required: true
          schema:
            type: string
            title: Variable
        - name: max_time_points
          in: query
          required: false
          schema:
            type: integer
            maximum: 1000
            minimum: 2
            default: 200
            title: Max Time Points
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SpatialProfile'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    SpatialProfile:
      properties:
        variable:
          type: string
          title: Variable
          description: Evaluated PyBaMM variable name.
        coordinate_name:
          type: string
          title: Coordinate Name
          description: Spatial coordinate used for the profile.
        coordinates:
          items:
            type: number
          type: array
          title: Coordinates
          description: One-dimensional mesh coordinates in metres.
        times:
          items:
            type: number
          type: array
          title: Times
          description: Stored simulation times in seconds.
        values:
          items:
            items:
              type: number
            type: array
          type: array
          title: Values
          description: Field values indexed as values[time][position].
        domains:
          items:
            type: string
          type: array
          title: Domains
          description: Ordered PyBaMM domains along the coordinate.
        domain_boundaries:
          items:
            type: number
          type: array
          title: Domain Boundaries
          description: Internal boundaries between adjacent domains in metres.
      type: object
      required:
        - variable
        - coordinate_name
        - coordinates
        - times
        - values
      title: SpatialProfile
      description: A time-dependent scalar field on a one-dimensional PyBaMM mesh.
    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

````