Skip to content

Jobs

JobsService

Service for managing API payloads and job inbox interactions.

A job represents a single execution of an automation - it is created when you start a process and contains information about that specific run, including its status, start time, and any input/output data.

link_attachment(
    *,
    attachment_key,
    job_key,
    category=None,
    folder_key=None,
    folder_path=None,
)

Link an attachment to a job.

This method links an existing attachment to a specific job.

Parameters:

Name Type Description Default
attachment_key UUID

The key of the attachment to link.

required
job_key UUID

The key of the job to link the attachment to.

required
category Optional[str]

Optional category for the attachment in the context of this job.

None
folder_key Optional[str]

The key of the folder. Override the default one set in the SDK config.

None
folder_path Optional[str]

The path of the folder. Override the default one set in the SDK config.

None

Raises:

Type Description
Exception

If the link operation fails.

Examples:

from uipath import UiPath

client = UiPath()

client.jobs.link_attachment(
    attachment_key=uuid.UUID("123e4567-e89b-12d3-a456-426614174000"),
    job_key=uuid.UUID("123e4567-e89b-12d3-a456-426614174001"),
    category="Result"
)
print("Attachment linked to job successfully")
link_attachment_async(
    *,
    attachment_key,
    job_key,
    category=None,
    folder_key=None,
    folder_path=None,
)

Link an attachment to a job asynchronously.

This method asynchronously links an existing attachment to a specific job.

Parameters:

Name Type Description Default
attachment_key UUID

The key of the attachment to link.

required
job_key UUID

The key of the job to link the attachment to.

required
category Optional[str]

Optional category for the attachment in the context of this job.

None
folder_key Optional[str]

The key of the folder. Override the default one set in the SDK config.

None
folder_path Optional[str]

The path of the folder. Override the default one set in the SDK config.

None

Raises:

Type Description
Exception

If the link operation fails.

Examples:

import asyncio
from uipath import UiPath

client = UiPath()

async def main():
    await client.jobs.link_attachment_async(
        attachment_key=uuid.UUID("123e4567-e89b-12d3-a456-426614174000"),
        job_key=uuid.UUID("123e4567-e89b-12d3-a456-426614174001"),
        category="Result"
    )
    print("Attachment linked to job successfully")

list_attachments

list_attachments(
    *, job_key, folder_key=None, folder_path=None
)

List attachments associated with a specific job.

This method retrieves all attachments linked to a job by its key.

Parameters:

Name Type Description Default
job_key UUID

The key of the job to retrieve attachments for.

required
folder_key Optional[str]

The key of the folder. Override the default one set in the SDK config.

None
folder_path Optional[str]

The path of the folder. Override the default one set in the SDK config.

None

Returns:

Type Description
List[Attachment]

List[Attachment]: A list of attachment objects associated with the job.

Raises:

Type Description
Exception

If the retrieval fails.

Examples:

from uipath import UiPath

client = UiPath()

attachments = client.jobs.list_attachments(
    job_key=uuid.UUID("123e4567-e89b-12d3-a456-426614174000")
)
for attachment in attachments:
    print(f"Attachment: {attachment.Name}, Key: {attachment.Key}")

list_attachments_async async

list_attachments_async(
    *, job_key, folder_key=None, folder_path=None
)

List attachments associated with a specific job asynchronously.

This method asynchronously retrieves all attachments linked to a job by its key.

Parameters:

Name Type Description Default
job_key UUID

The key of the job to retrieve attachments for.

required
folder_key Optional[str]

The key of the folder. Override the default one set in the SDK config.

None
folder_path Optional[str]

The path of the folder. Override the default one set in the SDK config.

None

Returns:

Type Description
List[Attachment]

List[Attachment]: A list of attachment objects associated with the job.

Raises:

Type Description
Exception

If the retrieval fails.

Examples:

import asyncio
from uipath import UiPath

client = UiPath()

async def main():
    attachments = await client.jobs.list_attachments_async(
        job_key=uuid.UUID("123e4567-e89b-12d3-a456-426614174000")
    )
    for attachment in attachments:
        print(f"Attachment: {attachment.Name}, Key: {attachment.Key}")

resume

resume(
    *,
    inbox_id=None,
    job_id=None,
    folder_key=None,
    folder_path=None,
    payload,
)

Sends a payload to resume a paused job waiting for input, identified by its inbox ID.

Parameters:

Name Type Description Default
inbox_id Optional[str]

The inbox ID of the job.

None
job_id Optional[str]

The job ID of the job.

None
folder_key Optional[str]

The key of the folder to execute the process in. Override the default one set in the SDK config.

None
folder_path Optional[str]

The path of the folder to execute the process in. Override the default one set in the SDK config.

None
payload Any

The payload to deliver.

required

resume_async async

resume_async(
    *,
    inbox_id=None,
    job_id=None,
    folder_key=None,
    folder_path=None,
    payload,
)

Asynchronously sends a payload to resume a paused job waiting for input, identified by its inbox ID.

Parameters:

Name Type Description Default
inbox_id Optional[str]

The inbox ID of the job. If not provided, the execution context will be used to retrieve the inbox ID.

None
job_id Optional[str]

The job ID of the job.

None
folder_key Optional[str]

The key of the folder to execute the process in. Override the default one set in the SDK config.

None
folder_path Optional[str]

The path of the folder to execute the process in. Override the default one set in the SDK config.

None
payload Any

The payload to deliver.

required

Examples:

import asyncio

from uipath import UiPath

sdk = UiPath()


async def main():  # noqa: D103
    payload = await sdk.jobs.resume_async(job_id="38073051", payload="The response")
    print(payload)


asyncio.run(main())