TasksResource on the Figranium Python SDK is the primary way to manage tasks. Use it to list, create, update, version, and run tasks. Every method accepts an optional options keyword for per-request overrides such as custom headers or timeouts. The async client (AsyncFigranium) exposes the same resource and methods, so you can await client.tasks.save(...) or await client.tasks.run(...) with identical signatures.
The client-level convenience
client.run_task(id, input) proxies directly to client.tasks.run(id, input).Methods
list
list
Retrieve every task in the workspace.Returns a list of
- HTTP endpoint:
GET /api/tasks - Signature:
list(*, options=None) -> List[Task]
list_tasks.py
Task objects.list_summaries
list_summaries
Fetch a lightweight summary of all tasks.Each
- HTTP endpoint:
GET /api/tasks/list - Signature:
list_summaries(*, options=None) -> {"tasks": List[TaskSummary]}
list_summaries.py
TaskSummary contains id, name, and an optional description.save
save
Create or update a task. Pass Returns the saved
create_version=True to snapshot the current version before saving.- HTTP endpoint:
POST /api/tasks(with?version=truewhencreate_versionis set) - Signature:
save(task, *, create_version=False, options=None) -> Task
save_task.py
Task, including any server-generated id. For more about building actions, see Actions. For variable substitution, see Variables.touch
touch
Refresh a task’s
last_opened timestamp without changing its definition.- HTTP endpoint:
POST /api/tasks/{id}/touch - Signature:
touch(task_id, *, options=None) -> Task
touch_task.py
update
update
Apply a partial patch to an existing task.
- HTTP endpoint:
PATCH /api/tasks/{id} - Signature:
update(task_id, patch, *, options=None) -> {"id": str, "updatedAt": int, "status": str, "task": Task}
update_task.py
delete
delete
Remove a task by ID.
- HTTP endpoint:
DELETE /api/tasks/{id} - Signature:
delete(task_id, *, options=None) -> {"id": str, "deleted": bool, "message": Optional[str]}
delete_task.py
versions
versions
List all saved versions for a task.
- HTTP endpoint:
GET /api/tasks/{id}/versions - Signature:
versions(task_id, *, options=None) -> {"versions": List[TaskVersion]}
list_versions.py
version
version
Retrieve a specific version snapshot.
- HTTP endpoint:
GET /api/tasks/{id}/versions/{versionId} - Signature:
version(task_id, version_id, *, options=None) -> {"snapshot": Task, "metadata": {"id": str, "timestamp": int}}
get_version.py
clear_versions
clear_versions
Delete all stored versions for a task.
- HTTP endpoint:
POST /api/tasks/{id}/versions/clear - Signature:
clear_versions(task_id, *, options=None) -> {"success": bool}
clear_versions.py
rollback
rollback
Restore a task to a previous version snapshot.
- HTTP endpoint:
POST /api/tasks/{id}/rollback - Signature:
rollback(task_id, version_id, *, options=None) -> Task
rollback_task.py
run
run
Execute a task and return its result. This is the public execution endpoint, reachable at The
/tasks/{id}/api.- HTTP endpoint:
POST /tasks/{id}/api - Signature:
run(task_id, input=None, *, options=None) -> ExecutionResult
run_task.py
input object accepts variables, taskVariables, webhookUrl, and runId. For more about execution results and streaming, see ExecutionsResource. To learn about task variables and runtime substitution, see Variables and Actions. For per-request overrides, see RequestOptions.