Jobs¶
Accessed via client.jobs.
pyawe.client.JobsClient
¶
Methods for the /jobs resource.
list
¶
Return all jobs, optionally filtered by team.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
team_id
|
UUID | str | None
|
When supplied, returns only jobs for this team. |
None
|
Returns:
| Type | Description |
|---|---|
list[Job]
|
List of :class: |
Raises:
| Type | Description |
|---|---|
AweAuthError
|
If not authenticated. |
create
¶
create(name: str, *, status: Status | str | None = None, schedule_status: ScheduleStatus | str | None = None, team_id: UUID | str | None = None, project_id: UUID | str | None = None, job_type: str | None = None, start_date: str | None = None, end_date: str | None = None, ephemeral: bool | None = None, auto_complete: bool | None = None) -> Job
Create a new job.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
name
|
str
|
Job name. |
required |
status
|
Status | str | None
|
Initial status (default |
None
|
schedule_status
|
ScheduleStatus | str | None
|
Initial schedule status (default |
None
|
team_id
|
UUID | str | None
|
Assign to a team. |
None
|
project_id
|
UUID | str | None
|
Associate with a project. |
None
|
job_type
|
str | None
|
|
None
|
start_date
|
str | None
|
Sprint start date (ISO 8601, e.g. |
None
|
end_date
|
str | None
|
Sprint end date (ISO 8601). |
None
|
ephemeral
|
bool | None
|
Create the job as ephemeral (deleted once it is empty). |
None
|
auto_complete
|
bool | None
|
|
None
|
Returns:
| Type | Description |
|---|---|
Job
|
The newly created :class: |
Raises:
| Type | Description |
|---|---|
AweAuthError
|
If not authenticated. |
AweValidationError
|
On a 400 response. |
get
¶
Fetch a job with its associated workflows.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
job_id
|
UUID | str
|
UUID of the job. |
required |
Returns:
| Type | Description |
|---|---|
JobWithWorkflows
|
class: |
Raises:
| Type | Description |
|---|---|
AweNotFoundError
|
If the job does not exist. |
AweAuthError
|
If not authenticated. |
update
¶
update(job_id: UUID | str, *, name: str | None = None, status: Status | str | None = None, schedule_status: ScheduleStatus | str | None = None, archived: bool | None = None, project_id: UUID | str | None = None, job_type: str | None = None, start_date: str | None = None, end_date: str | None = None, ai_enabled: bool | None = None, ai_togra_project_id: UUID | str | None = None, ai_togra_job_id: UUID | str | None = None, ai_togra_template_id: UUID | str | None = None, ai_route_confidence_threshold: float | None = None, ai_rules: Any | None = None, email_connection_id: UUID | str | None = None, inbound_email_connection_id: UUID | str | None = None, ephemeral: bool | None = None, auto_complete: bool | None = None) -> Job
Update a job; only supplied fields are changed.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
job_id
|
UUID | str
|
UUID of the job to update. |
required |
name
|
str | None
|
New name. |
None
|
status
|
Status | str | None
|
New status. |
None
|
schedule_status
|
ScheduleStatus | str | None
|
New schedule status. |
None
|
archived
|
bool | None
|
Archive flag. |
None
|
project_id
|
UUID | str | None
|
Reassign to a different project. |
None
|
job_type
|
str | None
|
|
None
|
start_date
|
str | None
|
Sprint start date (ISO 8601). |
None
|
end_date
|
str | None
|
Sprint end date (ISO 8601). |
None
|
ai_enabled
|
bool | None
|
Whether new tickets in this queue are dispatched to
cunav's AI triage webhook ( |
None
|
ai_togra_project_id
|
UUID | str | None
|
Togra project routed to when AI confidence clears the threshold. |
None
|
ai_togra_job_id
|
UUID | str | None
|
Togra job routed to. |
None
|
ai_togra_template_id
|
UUID | str | None
|
Togra template routed to. |
None
|
ai_route_confidence_threshold
|
float | None
|
Confidence threshold for auto-routing. |
None
|
ai_rules
|
Any | None
|
Per-outcome-type enable/threshold config. |
None
|
email_connection_id
|
UUID | str | None
|
|
None
|
inbound_email_connection_id
|
UUID | str | None
|
|
None
|
ephemeral
|
bool | None
|
Whether the job is deleted once it is empty. |
None
|
auto_complete
|
bool | None
|
|
None
|
Returns:
| Type | Description |
|---|---|
Job
|
The updated :class: |
Raises:
| Type | Description |
|---|---|
AweNotFoundError
|
If the job does not exist. |
AweAuthError
|
If not authenticated. |
get_workflow_allocations
¶
Return first-task allocation summaries for every workflow in a job.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
job_id
|
UUID | str
|
UUID of the job. |
required |
Returns:
| Type | Description |
|---|---|
list[WorkflowAllocation]
|
List of :class: |
Raises:
| Type | Description |
|---|---|
AweAuthError
|
If not authenticated. |
delete
¶
Delete a job.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
job_id
|
UUID | str
|
UUID of the job to delete. |
required |
Raises:
| Type | Description |
|---|---|
AweNotFoundError
|
If the job does not exist. |
AweAuthError
|
If not authenticated. |
clone_workflow
¶
clone_workflow(job_id: UUID | str, workflow_id: UUID | str, *, name: str | None = None, origin: tuple[str, str] | None = None) -> Workflow
Clone a workflow template into a job.
An ephemeral template (see :meth:WorkflowsClient.update) gives an ephemeral instance.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
job_id
|
UUID | str
|
UUID of the target job. |
required |
workflow_id
|
UUID | str
|
UUID of the workflow template to clone. |
required |
name
|
str | None
|
Overrides the cloned workflow's name; omit or pass an empty/whitespace-only string to keep the template's name. |
None
|
origin
|
tuple[str, str] | None
|
|
None
|
Returns:
| Type | Description |
|---|---|
Workflow
|
The new :class: |
Workflow
|
meth: |
Raises:
| Type | Description |
|---|---|
AweNotFoundError
|
If the job or workflow does not exist. |
AweAuthError
|
If not authenticated. |
set_team
¶
Assign a job to a team.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
job_id
|
UUID | str
|
UUID of the job. |
required |
team_id
|
UUID | str
|
UUID of the team. |
required |
Returns:
| Type | Description |
|---|---|
Job
|
The updated :class: |
Raises:
| Type | Description |
|---|---|
AweNotFoundError
|
If the job does not exist. |
AweAuthError
|
If not authenticated. |
clear_team
¶
Remove the team assignment from a job.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
job_id
|
UUID | str
|
UUID of the job. |
required |
Returns:
| Type | Description |
|---|---|
Job
|
The updated :class: |
Raises:
| Type | Description |
|---|---|
AweNotFoundError
|
If the job does not exist. |
AweAuthError
|
If not authenticated. |