Skip to main content

Jobs - TypeScript SDK

client.jobs is the generic job-kernel view across long-running task types. Use Training or Evaluation resources when domain-specific fields are needed.

Overview​

Available Operations​

MethodDescription
list(options?)Page jobs across domains.
get(id)Read one generic job.
logs(id, options?)Read the newest log lines.
cancel(id)Cancel a supported non-terminal job.

list​

Page jobs across domains.

Request​

Optional type, status, page, pageSize. The service uses lowercase domain values such as train and eval.

Response​

PageResult<JobStatusView>.

get​

Read one generic job.

Request​

id: string required.

Response​

JobStatusView.

logs​

Read the newest log lines.

Request​

id required; optional {tail}.

Response​

string[].

cancel​

Cancel a supported non-terminal job.

Request​

id: string required.

Response​

null.

Field Reference and Examples​

JobStatusView includes id, jobType, status, progress, progressInfo, metrics, artifacts, error, model/dataset/cluster context, and timestamps.

const page = await client.jobs.list({
type: "train",
status: "RUNNING",
page: 1,
pageSize: 20,
});
const job = await client.jobs.get("job-id");
const logs = await client.jobs.logs("job-id", { tail: 200 });
await client.jobs.cancel("job-id");

All methods use the shared authentication and typed error behavior described in Response Conventions and Retry and Security.