Skip to main content
The 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

Retrieve every task in the workspace.
  • HTTP endpoint: GET /api/tasks
  • Signature: list(*, options=None) -> List[Task]
list_tasks.py
Returns a list of Task objects.
Fetch a lightweight summary of all tasks.
  • HTTP endpoint: GET /api/tasks/list
  • Signature: list_summaries(*, options=None) -> {"tasks": List[TaskSummary]}
list_summaries.py
Each TaskSummary contains id, name, and an optional description.
Create or update a task. Pass create_version=True to snapshot the current version before saving.
  • HTTP endpoint: POST /api/tasks (with ?version=true when create_version is set)
  • Signature: save(task, *, create_version=False, options=None) -> Task
save_task.py
Returns the saved Task, including any server-generated id. For more about building actions, see Actions. For variable substitution, see Variables.
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
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
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
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
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
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
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
Execute a task and return its result. This is the public execution endpoint, reachable at /tasks/{id}/api.
  • HTTP endpoint: POST /tasks/{id}/api
  • Signature: run(task_id, input=None, *, options=None) -> ExecutionResult
run_task.py
The 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.