Repository navigation
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.
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 |
Task.get_by_id(connection_object: XurrentApiHelper, id) -> TAPI: GET /tasks/{id}
Task.get_tasks(connection_object: XurrentApiHelper, predefinedFilter: TaskPredefinedFilter = None, queryfilter: dict = None, max_results: Optional[int] = None) -> List[T]API: GET /tasks · Enums: TaskPredefinedFilter
Task.create(connection_object: XurrentApiHelper, workflowID: int, data: dict) -> TCreate 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
Task.get_workflow_of_task(connection_object: XurrentApiHelper, id, expand: bool = False) -> 'Workflow'Uses: Workflow
Task.update_by_id(connection_object: XurrentApiHelper, id, data) -> Ttask.ref_str() -> strReturn a string representation of the object.
task.get_workflow(expand: bool = False) -> 'Workflow'Uses: Workflow
task.update(data) -> TAPI: PATCH /tasks/{id}
task.close(note: str = None, member_id: int = None) -> TClose the task.
-
note: Note to add to the task -
member_id: ID of the member who should close the task
task.approve(note: str = None, member_id: int = None) -> TApprove the task.
-
note: Note to add to the task -
member_id: ID of the member who should approve the task
task.reject(note: str = None, member_id: int = None) -> TReject the task.
-
note: Note to add to the task -
member_id: ID of the member who should reject the task
task.cancel(note: str = None, member_id: int = None) -> TCancel the task.
-
note: Note to add to the task -
member_id: ID of the member who should cancel the task
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
task.add_note(note) -> dictAdd a note to the current task instance.
API: POST /tasks/{id}/notes
task.get_approvals() -> List[dict]Retrieve all approvals for the current task instance.
API: GET /tasks/{id}/approvals
task.get_cis() -> ListRetrieve configuration items associated with the current task instance.
API: GET /tasks/{id}/cis · Uses: ConfigurationItem
task.get_predecessors() -> ListRetrieve predecessor tasks for the current task instance.
API: GET /tasks/{id}/predecessors
task.get_successors() -> ListRetrieve successor tasks for the current task instance.
API: GET /tasks/{id}/successors
task.get_service_instances() -> ListRetrieve service instances associated with the current task instance.
API: GET /tasks/{id}/service_instances · Uses: ServiceInstance
task.get_automation_rules() -> List[dict]Retrieve automation rules associated with the current task instance.
API: GET /tasks/{id}/automation_rules
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’ |
| 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 |
Uses:
-
ConfigurationItem:
get_cis() -
ServiceInstance:
get_service_instances() -
Workflow:
get_workflow(),get_workflow_of_task()
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()
- XurrentApiHelper
- Calendar
- ClosureCode
- ConfigurationItem
- Contract
- CustomCollection
- CustomCollectionElement
- EffortClass
- Holiday
- KnowledgeArticle
- Organization
- OutOfOfficePeriod
- Person
- Problem
- Product
- ProductCategory
- Project
- ProjectTask
- Release
- Request
- RequestTemplate
- Risk
- Service
- ServiceInstance
- ServiceOffering
- ShopArticle
- ShopArticleCategory
- ShopOrderLine
- Site
- SkillPool
- Task
- Team
- TimeAllocation
- UiExtension
- Workflow
- WorkflowTemplate