Public API: getting the the user's tasks - pneumaticapp/pneumaticworkflow GitHub Wiki
The end point for getting the user's tasks is
GET /v3/tasks
Now 'the user' in this context refers to the user whose API key you're using to make the request
In python, making this request looks as follows:
import requests
import json
api_key = "g-DvJPOP8dJ9qme2kfQFUzwHGOIZTWDY"
user_tasks_endpoint = 'https://api.pneumatic.app/v3/tasks'
headers = {
'Authorization': f'Bearer {api_key}'
}
r = requests.get(
user_tasks_endpoint,
headers = headers
)
if r.ok:
user_tasks = r.json()
print(json.dumps(user_tasks, indent = 4))
else:
print(r)
The response is list of all the active tasks the user's currently assigned to as a performer directly or via a group.
[
{
"id": int,
"name": str,
"is_urgent": bool,
"workflow_name": str,
"date_started": str, // format ISO 8601: YYYY-MM-DDThh:mm:ss[.SSS]
"date_started_tsp": float, // timestamp in seconds
"date_completed": null | str, // format ISO 8601: YYYY-MM-DDThh:mm:ss[.SSS]
"date_completed_tsp": float, // timestamp in seconds
"due_date": null | str, // format ISO 8601: YYYY-MM-DDThh:mm:ss[.SSS]
"due_date_tsp": int, // timestamp in seconds
"template_id": int, // the template id (this is used for real time fitlering by template)
"template_task_id": int // DEPRECATED // the id of the step in the template (used in real time fitlering)
"template_task_api_name": str // the api_name of the step in the template (used in real time filtering)
"status": str // pending, active, completed, snoozed, skipped
}
]