Skip to content

Jobs

Accessed via client.jobs.

pyawe.client.JobsClient

JobsClient(http: _HttpSession)

Methods for the /jobs resource.

list

list(team_id: UUID | str | None = None) -> builtins.list[Job]

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:~pyawe.models.Job objects.

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 "Not Started").

None
schedule_status ScheduleStatus | str | None

Initial schedule status (default "N/A").

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

"sprint", "kanban", or "backlog".

None
start_date str | None

Sprint start date (ISO 8601, e.g. "2026-01-01").

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

False makes a standing container job that propagation never marks Complete (default True).

None

Returns:

Type Description
Job

The newly created :class:~pyawe.models.Job.

Raises:

Type Description
AweAuthError

If not authenticated.

AweValidationError

On a 400 response.

get

get(job_id: UUID | str) -> JobWithWorkflows

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:~pyawe.models.JobWithWorkflows.

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

"sprint", "kanban", or "backlog".

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 (job_type == "kanban" queues only).

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

smtp connection used for outbound automated email.

None
inbound_email_connection_id UUID | str | None

imap connection treated as this queue's support mailbox.

None
ephemeral bool | None

Whether the job is deleted once it is empty.

None
auto_complete bool | None

False stops propagation from marking the job Complete.

None

Returns:

Type Description
Job

The updated :class:~pyawe.models.Job.

Raises:

Type Description
AweNotFoundError

If the job does not exist.

AweAuthError

If not authenticated.

get_workflow_allocations

get_workflow_allocations(job_id: UUID | str) -> builtins.list[WorkflowAllocation]

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:~pyawe.models.WorkflowAllocation objects.

Raises:

Type Description
AweAuthError

If not authenticated.

delete

delete(job_id: UUID | str) -> None

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

(kind, ref) of what the clone is made for, e.g. ("dam-asset", asset_id). It stays queryable (client.workflow_runs.list(origin_kind=..., origin_ref=...)) after an ephemeral instance has been deleted.

None

Returns:

Type Description
Workflow

The new :class:~pyawe.models.Workflow inside the job. Use

Workflow

meth:WorkflowsClient.get if you also need its cloned tasks/links.

Raises:

Type Description
AweNotFoundError

If the job or workflow does not exist.

AweAuthError

If not authenticated.

set_team

set_team(job_id: UUID | str, team_id: UUID | str) -> Job

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:~pyawe.models.Job.

Raises:

Type Description
AweNotFoundError

If the job does not exist.

AweAuthError

If not authenticated.

clear_team

clear_team(job_id: UUID | str) -> Job

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:~pyawe.models.Job.

Raises:

Type Description
AweNotFoundError

If the job does not exist.

AweAuthError

If not authenticated.