> For the complete documentation index, see [llms.txt](https://devs.truebit.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://devs.truebit.io/integrating-truebit-tasks/api-task-execution/get-task-status-api.md).

# Get Task Status API

## API Doc

Interactive API docs can be found at: <https://run.truebit.network/dispatcher/api-docs/>

## Overview

By calling this endpoint, you’ll receive the API Task execution status and, if available, the result associated with the specified `executionId`

## Get execution status by execution ID of an API TASK

> Retrieve the status of an API task execution using the execution ID.

```json
{"openapi":"3.1.0","info":{"title":"Task Execution API","version":"1.120.0-beta.275"},"tags":[{"name":"Task execution status","description":"Check status of a task execution"}],"servers":[{"description":"Public beta","url":"https://run.truebit.network"},{"description":"Current environment relative paths","url":"/"}],"paths":{"/task/api/execution-status/{executionId}":{"get":{"summary":"Get execution status by execution ID of an API TASK","description":"Retrieve the status of an API task execution using the execution ID.","operationId":"getApiExecutionStatus","tags":["Task execution status"],"parameters":[{"in":"path","name":"executionId","required":true,"schema":{"type":"string"},"description":"The ID of the task execution."}],"responses":{"200":{"description":"Successful api task response with execution status.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExecuteApiSyncResponse"}}}},"404":{"description":"Execution ID not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestResponse"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}},"components":{"schemas":{"ExecuteApiSyncResponse":{"type":"object","description":"Successful execution of the API task.","properties":{"executionId":{"type":"string","description":"The ID of the executed task."},"clearTextSolution":{"type":"object","description":"The result of the API task execution.","properties":{"output":{"type":"object","description":"The output of the task execution, containing task-specific details."},"status":{"type":"string","description":"Status of the execution within the solution.","enum":["succeed","failed"]},"senderAddress":{"type":"string","description":"The address of the sender who executed the task."}}},"status":{"type":"string","description":"Status of the execution.","enum":["Success","Running","Error"]},"totalTransferredBytes":{"type":"object","description":"Total bytes transferred during the request and response.","properties":{"request":{"type":"integer","description":"Bytes transferred in the request."},"response":{"type":"integer","description":"Bytes transferred in the response."}}},"errorMsg":{"type":"string","description":"Error message if execution encountered issues but still returned a result."}}},"BadRequestResponse":{"type":"object","description":"Bad request","properties":{"message":{"type":"string","description":"Error message."}}},"Error":{"type":"object","description":"Internal server error","properties":{"message":{"type":"string","description":"Internal server error"}}}}}}
```

### **status**

|             |                                                                                                      |
| ----------- | ---------------------------------------------------------------------------------------------------- |
| **Success** | The Task execution was completed successfully. The result was received within the specified timeout. |
| **Running** | The API task is still being executed.                                                                |
| **Error**   | There was an error during the task execution                                                         |


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://devs.truebit.io/integrating-truebit-tasks/api-task-execution/get-task-status-api.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
