Skip to content
Fabian Steiner edited this page Nov 4, 2026 · 2 revisions

Task

from xurrent import Task · module xurrent.tasks · API resource /tasks · Xurrent API docs

A task of a workflow (change), e.g. an approval or an implementation activity.

Back to the overview

Fields

The named arguments of the constructor. Every other field of the API response is set as an attribute as well.

Field Type Default Converted to
id
subject str None
workflow dict None
description str None

Class methods

get_by_id

Task.get_by_id(connection_object: XurrentApiHelper, id) -> T

API: GET /tasks/{id}

get_tasks

Task.get_tasks(connection_object: XurrentApiHelper, predefinedFilter: TaskPredefinedFilter = None, queryfilter: dict = None, max_results: Optional[int] = None) -> List[T]

API: GET /tasks · Enums: TaskPredefinedFilter

create

Task.create(connection_object: XurrentApiHelper, workflowID: int, data: dict) -> T

Create a new task.

  • workflowID: ID of the workflow to create the task in
  • data: Data to create the task with

API: POST /workflows/{workflowID}/tasks

Static methods

get_workflow_of_task

Task.get_workflow_of_task(connection_object: XurrentApiHelper, id, expand: bool = False) -> 'Workflow'

Uses: Workflow

update_by_id

Task.update_by_id(connection_object: XurrentApiHelper, id, data) -> T

Methods

ref_str

task.ref_str() -> str

Return a string representation of the object.

get_workflow

task.get_workflow(expand: bool = False) -> 'Workflow'

Uses: Workflow

update

task.update(data) -> T

API: PATCH /tasks/{id}

close

task.close(note: str = None, member_id: int = None) -> T

Close the task.

  • note: Note to add to the task
  • member_id: ID of the member who should close the task

approve

task.approve(note: str = None, member_id: int = None) -> T

Approve the task.

  • note: Note to add to the task
  • member_id: ID of the member who should approve the task

reject

task.reject(note: str = None, member_id: int = None) -> T

Reject the task.

  • note: Note to add to the task
  • member_id: ID of the member who should reject the task

cancel

task.cancel(note: str = None, member_id: int = None) -> T

Cancel the task.

  • note: Note to add to the task
  • member_id: ID of the member who should cancel the task

get_notes

task.get_notes(queryfilter: dict = None, sort: Optional[str] = None, max_results: Optional[int] = None) -> List[dict]

Retrieve the notes of the current task.

  • queryfilter: Optional filter parameters (e.g. created_at, medium, person)
  • sort: Optional order, e.g. '-created_at' for the newest note first (default: ascending by id)
  • max_results: Return at most this many notes, fetching only the pages needed (default: all)
  • Returns: List of notes

API: GET /tasks/{id}/notes

add_note

task.add_note(note) -> dict

Add a note to the current task instance.

API: POST /tasks/{id}/notes

get_approvals

task.get_approvals() -> List[dict]

Retrieve all approvals for the current task instance.

API: GET /tasks/{id}/approvals

get_cis

task.get_cis() -> List

Retrieve configuration items associated with the current task instance.

API: GET /tasks/{id}/cis · Uses: ConfigurationItem

get_predecessors

task.get_predecessors() -> List

Retrieve predecessor tasks for the current task instance.

API: GET /tasks/{id}/predecessors

get_successors

task.get_successors() -> List

Retrieve successor tasks for the current task instance.

API: GET /tasks/{id}/successors

get_service_instances

task.get_service_instances() -> List

Retrieve service instances associated with the current task instance.

API: GET /tasks/{id}/service_instances · Uses: ServiceInstance

get_automation_rules

task.get_automation_rules() -> List[dict]

Retrieve automation rules associated with the current task instance.

API: GET /tasks/{id}/automation_rules

Enums

TaskPredefinedFilter

Used by: Task.get_tasks

Value Description
finished List all finished tasks
open List all open tasks
managed_by_me List all tasks that are part of a workflow which manager is the API user
assigned_to_my_team List all tasks that are assigned to one of the teams that the API user is a member of
assigned_to_me List all tasks that are assigned to the API user
approval_by_me List all approval tasks that are assigned to the API user and which status is different from ‘Registered’

TaskStatus

Value Description
registered Registered
declined Declined
assigned Assigned
accepted Accepted
in_progress In Progress
waiting_for Waiting for…
waiting_for_customer Waiting for Customer
request_pending Request Pending
failed Failed
rejected Rejected
completed Completed
approved Approved
canceled Canceled

Cross references

Uses:

Used by:

  • Project: get_tasks()
  • ShopOrderLine: fulfillment_task
  • Workflow: create_task(), get_task_by_template_id(), get_tasks(), get_workflow_task_by_template_id(), get_workflow_tasks_by_workflow_id()

Clone this wiki locally