get_task_history
imerit_ango.sdk.SDK.
get_task_history(task_history_id, task_id)
Get the stage history of a task.
Parameters
- task_history_id: string, optional, default None - Optionally, the ID of the stage history item. 
- For example, if you run this function on a task without passing - task_history_id, assuming the task has been through 6 stages, you will receive a list with 6 objects. Each of these objects has its own- _idvalue. If you pass this- _idvalue as the- task_history_idparameter, you can filter out all tak stage history items and only return the one with this specific ID.
- Example: - '0000000aa0a00a0000aaaa0a'
 
- task_id: string - ID of the task to get the history of. Task IDs can be obtained from the UI, and from get_tasks. 
- Example: - '0000000aa0a00a0000aaaa0a'
 
Returns:
- output: dict - A dictionary containing the result of the operation. 
 
Example
Get the task history of a specific task.
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_history(task_id=task_id)curl -X GET "https://imeritapi.ango.ai/v2/task/$TASK_ID/history" \
  -H "Content-Type: application/json" \
  -H "apikey: $ANGO_API_KEY"Last updated

