Skip to main content

Methods

List Job Runs for provided Job Id. Filter the data based on parameters passed in the query

Parameters

job_id
str
required
Job id of the application
limit
typing.Optional[int]
Number of items per page
offset
typing.Optional[int]
Number of items to skip
search_prefix
typing.Optional[str]
Prefix used to search for job runs by name or identifier
sort_by
typing.Optional[JobRunsSortBy]
πŸ”— JobRunsSortByAttribute to sort by
order
typing.Optional[JobRunsSortDirection]
triggered_by
typing.Optional[typing.Union[str, typing.Sequence[str]]]
Array of subject slugs
status
typing.Optional[typing.Union[JobRunStatus, typing.Sequence[JobRunStatus]]]
πŸ”— JobRunStatusStatus of the job run

Returns

SyncPager[JobRun]
SyncPager[JobRun]
πŸ”— JobRunReturns all runs of a Job sorted by creation date in β€œdata” key and total count in β€œtotalCount” key

Usage

from truefoundry import TrueFoundry

client = TrueFoundry(
    api_key="YOUR_API_KEY",
    base_url="https://yourhost.com/path/to/api",
)

client.jobs.list_runs(
    job_id="value",
    limit=10,
    offset=10,
    search_prefix="value",
    sort_by="value",
    order="value",
    triggered_by="value",
    status="value",
)
Get Job Run for provided jobRunName and jobId

Parameters

job_id
str
required
Application Id of JOB
job_run_name
str
required
Job run name of the application

Returns

GetJobRunResponse
GetJobRunResponse
πŸ”— GetJobRunResponseReturn JobRun details of the provided jobRunName

Usage

from truefoundry import TrueFoundry

client = TrueFoundry(
    api_key="YOUR_API_KEY",
    base_url="https://yourhost.com/path/to/api",
)

client.jobs.get_run(
    job_id="value",
    job_run_name="value",
)
Delete Job Run for provided jobRunName and jobId

Parameters

job_id
str
required
Application Id of JOB
job_run_name
str
required
Job run name of the application

Returns

DeleteJobRunResponse
DeleteJobRunResponse

Usage

from truefoundry import TrueFoundry

client = TrueFoundry(
    api_key="YOUR_API_KEY",
    base_url="https://yourhost.com/path/to/api",
)

client.jobs.delete_run(
    job_id="value",
    job_run_name="value",
)
Trigger Job for provided deploymentId or applicationId

Parameters

deployment_id
typing.Optional[str]
Deployment Id of the job
application_id
typing.Optional[str]
Application Id of the job
input
typing.Optional[TriggerJobRequestInput]
metadata
typing.Optional[Metadata]
πŸ”— MetadataMetadata for the job run including job_alias_name

Returns

TriggerJobRunResponse
TriggerJobRunResponse
πŸ”— TriggerJobRunResponseReturns object with message, JobRun Name And Job Details on successful creation of Job

Usage

from truefoundry import TrueFoundry

client = TrueFoundry(
    api_key="YOUR_API_KEY",
    base_url="https://yourhost.com/path/to/api",
)

client.jobs.trigger(
    deployment_id="value",
    application_id="application_id_value",
    input="value",
    metadata="value",
)
Terminate Job for provided deploymentId and jobRunName

Parameters

deployment_id
str
required
Deployment Id of the Deployment
job_run_name
str
required
Job Run name

Returns

TerminateJobResponse
TerminateJobResponse
πŸ”— TerminateJobResponseReturns object with message and JobRun Status on successful termination of Job

Usage

from truefoundry import TrueFoundry

client = TrueFoundry(
    api_key="YOUR_API_KEY",
    base_url="https://yourhost.com/path/to/api",
)

client.jobs.terminate(
    deployment_id="value",
    job_run_name="value",
)
⌘I