get_task
imerit_ango.sdk.SDK.
get_task(task_id, include_answer)
Retrieve detailed information about a specific task.
Parameters
task_id: string
The unique identifier for the task. You can find the task ID in the user interface or retrieve it using the get_tasks function.
include_answer: bool, default False
Determines whether the task's answer data is included in the response.
Returns:
output: dict
A dictionary containing the result of the operation.
Including a
statusfield indicating whether the request was successful and adatafield containing the response payload with updated resources produced by the operation.
Example
import os
from dotenv import load_dotenv
from imerit_ango.sdk import SDK
load_dotenv('variables.env')
api_key = os.getenv('API_KEY')
ango_sdk = SDK(api_key)
task_id = "<YOUR TASK ID>"
sdk_response = ango_sdk.get_task(task_id=task_id, include_answer=True)
data_url = sdk_response['data']['task']['asset']['data']
external_id = sdk_response['data']['task']['asset']['externalId']curl -X GET "https://imeritapi.ango.ai/v2/task/$TASK_ID" \
-H "Content-Type: application/json" \
-H "apikey: $API_KEY"Last updated

