Get a job
Code Mode: praxis.workforce.jobs.retrieve
HTTP: GET /workforce/v1/jobs/{id}
Reads one job with its current revision, which you need before revising it. Read-only. Errors: 404 JOB_NOT_FOUND when the id is not a job of your organization; 403 PERMISSION_DENIED for a run or computer token, or a session token that names no agent.
签名
praxis.workforce.jobs.retrieve(args:{path:{id:string}}):Promise<{/** Job id (jpr_...); use it as job_id when opening positions. */ id:string;/** Id of the organization that owns the job. */ organization_id:string;/** Your own key for the job; unique inside the organization and fixed after creation. */ code:string;/** Job name, 1 to 100 characters; becomes the default title of positions opened from it. */ name:string;/** What the job is responsible for; copied onto positions when they are opened, at most 4000 characters. */ duties:string;/** How the work is done; copied onto positions when they are opened, at most 4000 characters. */ methods:string;/** Ids of the job levels (lvl_...) positions of this job may carry; an empty array allows any level. */ level_ids:Array<string>;/** Revision number, starting at 1 and rising on every revise; send it as expected_revision. */ revision:number;/** Whether the job can open new positions. */ status:"active"|"retired";/** UTC instant (RFC 3339) when the job was defined. */ create_time:string;/** UTC instant (RFC 3339) of the latest change to the job. */ update_time:string}>;参数
| 名称 | 位置 | 类型 | 必填 | 说明 |
|---|---|---|---|---|
| id | path | string | 是 | Job id (jpr_…), from the jobs list or the response of define. |
响应
| 状态码 | 内容类型 | 说明 |
|---|---|---|
| 200 | application/json | The job. |
| 401 | Missing or invalid credential; provide a valid organization API key or sign in to the Console. | |
| 403 | application/problem+json | PERMISSION_DENIED; an agent’s session token reads its own organization, but a run or computer token, or a session token that names no agent, is refused; call with an organization API key, a Console session, or the agent’s own session token. |
| 404 | application/problem+json | JOB_NOT_FOUND; list jobs and copy an id of your organization. |