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

> Get cycle-level metrics for a simulation.

Computes metrics like discharge capacity, coulombic efficiency, capacity
retention, etc. for each cycle from the steps.parquet file using
ionworksdata.cycle_metrics.get_cycle_metrics.

Parameters
----------
simulation_id : str
    ID of the simulation
user_org_client : tuple[str, str | None, AsyncClient]
    Current user_id, organization_id, and Supabase client
simulation_repository : SimulationRepository
    Repository for simulations table
simulation_data_repository : SimulationDataRepository
    Repository for simulation_data table

Returns
-------
dict
    Dictionary with cycle metrics as lists, one value per cycle.
    Keys include: Cycle number, Discharge capacity [A.h],
    Charge capacity [A.h], Coulombic efficiency, Capacity retention, etc.

Raises
------
HTTPException
    404 if no results found, 500 for computation errors



## OpenAPI

````yaml https://api.ionworks.com/openapi.json get /simulations/{simulation_id}/cycles
openapi: 3.1.0
info:
  title: FastAPI
  version: 0.1.0
servers:
  - url: https://api.ionworks.com
    description: Production
security: []
paths:
  /simulations/{simulation_id}/cycles:
    get:
      tags:
        - Simulations
      summary: Get Simulation Cycles
      description: |-
        Get cycle-level metrics for a simulation.

        Computes metrics like discharge capacity, coulombic efficiency, capacity
        retention, etc. for each cycle from the steps.parquet file using
        ionworksdata.cycle_metrics.get_cycle_metrics.

        Parameters
        ----------
        simulation_id : str
            ID of the simulation
        user_org_client : tuple[str, str | None, AsyncClient]
            Current user_id, organization_id, and Supabase client
        simulation_repository : SimulationRepository
            Repository for simulations table
        simulation_data_repository : SimulationDataRepository
            Repository for simulation_data table

        Returns
        -------
        dict
            Dictionary with cycle metrics as lists, one value per cycle.
            Keys include: Cycle number, Discharge capacity [A.h],
            Charge capacity [A.h], Coulombic efficiency, Capacity retention, etc.

        Raises
        ------
        HTTPException
            404 if no results found, 500 for computation errors
      operationId: get_simulation_cycles_simulations__simulation_id__cycles_get
      parameters:
        - name: simulation_id
          in: path
          required: true
          schema:
            type: string
            title: Simulation Id
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    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

````