> ## Documentation Index
> Fetch the complete documentation index at: https://docs.dalus.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Get all states for a model

> Retrieves all states associated with a specific model



## OpenAPI

````yaml get /api/models/{modelId}/states
openapi: 3.0.0
info:
  title: Dalus Public API Documentation
  version: 1.0.0
  description: Public API documentation for Dalus application
servers:
  - url: http://localhost:3000
    description: Dalus API Server
security:
  - bearerAuth: []
tags:
  - name: models
    description: AI model management endpoints
  - name: models/requirements
    description: Requirements management for models
  - name: models/actions
    description: Action management for models
  - name: models/parts
    description: Part management for models
  - name: models/states
    description: State management for models
  - name: models/transitions
    description: Transition relationship management for models
  - name: models/signals
    description: Signal relationship management for models
  - name: models/interfaces
    description: Interface relationship management for models
  - name: models/ports
    description: Port management for models
paths:
  /api/models/{modelId}/states:
    get:
      tags:
        - models/states
      summary: Get all states for a model
      description: Retrieves all states associated with a specific model
      parameters:
        - name: modelId
          in: path
          required: true
          description: ID of the model
          schema:
            type: string
            format: uuid
        - name: type
          in: query
          required: false
          description: Filter states by type
          schema:
            type: string
      responses:
        '200':
          description: List of states
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/State'
        '401':
          description: Not authenticated
        '403':
          description: Forbidden - insufficient permissions
        '404':
          description: Model not found
        '500':
          description: Server error
components:
  schemas:
    State:
      type: object
      properties:
        label:
          type: string
          description: The label of the state
        notes:
          type: string
          description: Additional notes about the state
        entryState:
          type: boolean
          description: Whether this state is the entry point for the state machine
      required:
        - label
      description: A state in the model representing a condition or mode
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT

````