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

# Get Task Status

> Get the status of a task.



## OpenAPI

````yaml /api-reference/tasks.yaml get /tasks/{task_id}/status
openapi: 3.1.0
info:
  title: Tasks
  version: v1
servers:
  - description: Droidrun Cloud API
    url: https://api.mobilerun.ai/v1
security:
  - bearerAuth: []
paths:
  /tasks/{task_id}/status:
    get:
      tags:
        - Tasks
      summary: Get Task Status
      description: Get the status of a task.
      operationId: get_task_status_tasks__task_id__status_get
      parameters:
        - in: path
          name: task_id
          required: true
          schema:
            format: uuid
            title: Task Id
            type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TaskStatusResponse'
          description: Successful Response
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UnauthorizedResponse'
          description: Unauthorized
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          description: Not Found
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          description: Unprocessable Content
        '500':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          description: Internal Server Error
      x-codeSamples:
        - lang: JavaScript
          source: >-
            import Mobilerun from '@mobilerun/sdk';


            const client = new Mobilerun({
              apiKey: process.env['MOBILERUN_CLOUD_API_KEY'], // This is the default and can be omitted
            });


            const response = await
            client.tasks.getStatus('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e');


            console.log(response.status);
        - lang: Python
          source: |-
            import os
            from mobilerun_sdk import Mobilerun

            client = Mobilerun(
                api_key=os.environ.get("MOBILERUN_CLOUD_API_KEY"),  # This is the default and can be omitted
            )
            response = client.tasks.get_status(
                "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
            )
            print(response.status)
components:
  schemas:
    TaskStatusResponse:
      properties:
        execution:
          anyOf:
            - $ref: '#/components/schemas/TaskExecution'
            - type: 'null'
          description: Execution metadata for abnormal terminal outcomes
        lastResponse:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          description: The last agent response (FastAgentResponseEvent or ManagerPlanEvent)
          title: Lastresponse
        message:
          anyOf:
            - type: string
            - type: 'null'
          description: The agent's final answer or failure reason
          title: Message
        output:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          description: Structured output if outputSchema was set
          title: Output
        recordingDeviceId:
          anyOf:
            - format: uuid
              type: string
            - type: 'null'
          description: Device ID associated with recordingId
          title: Recordingdeviceid
        recordingId:
          anyOf:
            - format: uuid
              type: string
            - type: 'null'
          description: >-
            ID of the task's whole-task video recording, if recordingEnabled was
            set
          title: Recordingid
        status:
          $ref: '#/components/schemas/TaskStatus'
          description: The status of the task
        steps:
          anyOf:
            - type: integer
            - type: 'null'
          description: Number of steps taken
          title: Steps
        succeeded:
          anyOf:
            - type: boolean
            - type: 'null'
          description: Whether the task succeeded
          title: Succeeded
      required:
        - status
      title: TaskStatusResponse
      type: object
    UnauthorizedResponse:
      properties:
        detail:
          default: You are not authorized to access this resource
          description: The detail of the error
          title: Detail
          type: string
        errors:
          default: []
          description: The errors
          items: {}
          title: Errors
          type: array
        status:
          default: 401
          description: The status code of the error
          title: Status
          type: integer
        title:
          default: Unauthorized
          description: The title of the error
          title: Title
          type: string
      title: UnauthorizedResponse
      type: object
    ErrorResponse:
      properties:
        detail:
          description: The detail of the error
          title: Detail
          type: string
        errors:
          description: The errors
          items: {}
          title: Errors
          type: array
        status:
          description: The status code of the error
          title: Status
          type: integer
        title:
          description: The title of the error
          title: Title
          type: string
      required:
        - title
        - status
        - detail
        - errors
      title: ErrorResponse
      type: object
    TaskExecution:
      properties:
        checkpoint:
          $ref: '#/components/schemas/TaskExecutionCheckpoint'
        retrySafety:
          $ref: '#/components/schemas/TaskRetrySafety'
          default: unknown
        terminationReason:
          $ref: '#/components/schemas/TaskTerminationReason'
      required:
        - terminationReason
        - checkpoint
      title: TaskExecution
      type: object
    TaskStatus:
      enum:
        - prepared
        - queued
        - created
        - running
        - cancelling
        - completed
        - failed
        - cancelled
      title: TaskStatus
      type: string
    TaskExecutionCheckpoint:
      properties:
        currentSubgoal:
          anyOf:
            - type: string
            - type: 'null'
          title: Currentsubgoal
        plan:
          anyOf:
            - type: string
            - type: 'null'
          title: Plan
        progressSummary:
          anyOf:
            - type: string
            - type: 'null'
          title: Progresssummary
        steps:
          default: 0
          minimum: 0
          title: Steps
          type: integer
      title: TaskExecutionCheckpoint
      type: object
    TaskRetrySafety:
      enum:
        - unknown
      title: TaskRetrySafety
      type: string
    TaskTerminationReason:
      enum:
        - execution_timeout
        - worker_lost
        - cancelled
        - agent_failed
      title: TaskTerminationReason
      type: string
  securitySchemes:
    bearerAuth:
      bearerFormat: Opaque
      description: Bearer token via Authorization header
      scheme: bearer
      type: http

````

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