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

# Get Application State

> Get the live runtime state of an application including pod-level details, node placement, restart counts, and the currently active deployment version.



## OpenAPI

````yaml /openapi.json get /api/svc/v1/x/apps/{id}/state
openapi: 3.1.0
info:
  title: TrueFoundry API
  description: API for TrueFoundry
  version: 0.1.0
  contact: {}
servers:
  - url: https://{controlPlaneURL}
    variables:
      controlPlaneURL:
        default: app.truefoundry.com
        description: Control Plane URL
security: []
tags:
  - name: Agent
  - name: Agent Skills
  - name: Applications
  - name: Apply
  - name: Artifacts
  - name: Audit Logs
  - name: Clusters
  - name: Jobs
  - name: Logs
  - name: MCP Servers V2
  - name: MLRepos
  - name: Model Deployments
  - name: Models
  - name: Personal Access Tokens
  - name: Prompts
  - name: Provider Integrations
  - name: SCIM v2
  - name: Secret Groups
  - name: Secrets
  - name: Teams
  - name: Traces
  - name: Users
  - name: Virtual Accounts
  - name: Role Bindings
  - name: Workspaces
paths:
  /api/svc/v1/x/apps/{id}/state:
    get:
      tags:
        - Applications
      summary: Get Application State
      description: >-
        Get the live runtime state of an application including pod-level
        details, node placement, restart counts, and the currently active
        deployment version.
      operationId: Application.getApplicationState
      parameters:
        - name: id
          required: true
          in: path
          description: Unique identifier of the application
          schema:
            type: string
      responses:
        '200':
          description: Live runtime state of the application
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetApplicationStateResponse'
        '403':
          description: Forbidden. User does not have read permission for this application
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HttpError'
        '404':
          description: Not found. Application with provided ID not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HttpError'
      security:
        - jwt: []
components:
  schemas:
    GetApplicationStateResponse:
      type: object
      properties:
        eventGenerationTimestamp:
          type: string
          nullable: true
          description: Timestamp when this state snapshot was captured (ISO 8601)
        applicationId:
          type: string
          description: Application ID
          nullable: true
        clusterId:
          type: string
          description: Cluster ID where the application is deployed
        namespace:
          type: string
          description: Namespace of the application.
        activeVersion:
          type: string
          nullable: true
          description: Currently active deployment version
        components:
          nullable: true
          description: Application components with pod details
          type: array
          items:
            $ref: '#/components/schemas/ApplicationStateComponent'
      required:
        - eventGenerationTimestamp
        - applicationId
        - clusterId
        - namespace
        - activeVersion
        - components
      title: GetApplicationStateResponse
      x-fern-type-name: GetApplicationStateResponse
    HttpError:
      type: object
      properties:
        statusCode:
          type: integer
          description: HTTP Status Code
        message:
          type: string
          description: Error Message
        code:
          oneOf:
            - type: integer
            - type: string
          description: Error code
          nullable: true
        details:
          type: array
          description: Error details
          items:
            type: object
          nullable: true
      required:
        - statusCode
        - message
      title: HttpError
      x-fern-type-name: HttpError
    ApplicationStateComponent:
      type: object
      properties:
        pods:
          nullable: true
          description: Pods in this component
          type: array
          items:
            $ref: '#/components/schemas/ApplicationStatePod'
      required:
        - pods
      title: ApplicationStateComponent
      x-fern-type-name: ApplicationStateComponent
    ApplicationStatePod:
      type: object
      properties:
        name:
          type: string
          description: Pod name
        status:
          type: string
          description: 'Pod status: Running, Pending, Failed, Succeeded, Terminating, etc.'
        containers:
          description: Containers in this pod
          type: array
          items:
            $ref: '#/components/schemas/ApplicationStateContainer'
        node:
          nullable: true
          description: Node the pod is scheduled on (null if unscheduled)
          allOf:
            - $ref: '#/components/schemas/ApplicationStateNode'
        message:
          type: string
          nullable: true
          description: Pod status message (e.g. scheduling failure reason)
        podTemplateHash:
          type: string
          nullable: true
          description: Pod template hash linking pod to a deployment version
        startTime:
          type: string
          description: Pod start time (ISO 8601)
        endTime:
          type: string
          description: Pod end time (ISO 8601)
        version:
          type: string
          nullable: true
          description: Deployment version this pod belongs to
        restarts:
          type: number
          description: Total container restart count
        conditions:
          description: Pod conditions (Ready, PodScheduled, etc.)
          type: array
          items:
            $ref: '#/components/schemas/ApplicationStatePodCondition'
      required:
        - name
        - status
        - containers
        - startTime
        - endTime
        - restarts
        - conditions
      title: ApplicationStatePod
      x-fern-type-name: ApplicationStatePod
    ApplicationStateContainer:
      type: object
      properties:
        name:
          type: string
          description: Container name
        state:
          type: string
          description: 'Container state: running, waiting, or terminated'
        image:
          type: string
          description: Container image
        reason:
          type: string
          nullable: true
          description: Reason for the current state
        exitCode:
          type: number
          nullable: true
          description: Exit code of the container process
        lastState:
          description: Previous container state (before last restart)
          nullable: true
          allOf:
            - $ref: '#/components/schemas/ApplicationStateContainerState'
      required:
        - name
        - state
        - image
      title: ApplicationStateContainer
      x-fern-type-name: ApplicationStateContainer
    ApplicationStateNode:
      type: object
      properties:
        name:
          type: string
          description: Node name
        type:
          type: string
          nullable: true
          description: Node instance type (e.g. m5.xlarge)
        capacityType:
          type: string
          nullable: true
          description: Capacity type (e.g. on-demand, spot)
        status:
          description: Node health conditions
          allOf:
            - $ref: '#/components/schemas/ApplicationStateNodeCondition'
      required:
        - name
        - type
        - capacityType
        - status
      title: ApplicationStateNode
      x-fern-type-name: ApplicationStateNode
    ApplicationStatePodCondition:
      type: object
      properties:
        type:
          type: string
          description: Condition type (e.g. Ready, PodScheduled)
        status:
          type: string
          description: 'Condition status: True, False, or Unknown'
        reason:
          type: string
          description: Reason for the condition
          nullable: true
        message:
          type: string
          description: Human-readable message
          nullable: true
      required:
        - type
        - status
      title: ApplicationStatePodCondition
      x-fern-type-name: ApplicationStatePodCondition
    ApplicationStateContainerState:
      type: object
      properties:
        state:
          type: string
          description: 'Container state: running, waiting, or terminated'
        reason:
          type: string
          nullable: true
          description: Reason for the current state (e.g. CrashLoopBackOff)
        finishedAt:
          type: string
          nullable: true
          description: Timestamp when container finished (ISO 8601)
        exitCode:
          type: number
          description: Exit code of the container process
      required:
        - state
        - exitCode
      title: ApplicationStateContainerState
      x-fern-type-name: ApplicationStateContainerState
    ApplicationStateNodeCondition:
      type: object
      properties:
        memoryPressure:
          type: string
          nullable: true
          description: Whether the node has memory pressure.
          example: 'True'
        diskPressure:
          type: string
          nullable: true
          description: Whether the node has disk pressure.
          example: 'True'
        pidPressure:
          type: string
          nullable: true
          description: Whether the node has PID pressure.
          example: 'True'
        ready:
          type: string
          nullable: true
          description: Whether the node is ready.
          example: 'True'
      required:
        - memoryPressure
        - diskPressure
        - pidPressure
        - ready
      title: ApplicationStateNodeCondition
      x-fern-type-name: ApplicationStateNodeCondition
  securitySchemes:
    jwt:
      type: http
      scheme: bearer
      bearerFormat: JWT

````