Skip to content
中文

List jobs

Code Mode: praxis.workforce.jobs.list

HTTP: GET /workforce/v1/jobs

Lists the jobs of your organization ordered by code; use it to find the job_id to open positions from. Retired jobs are included unless you filter status=active. Pass next_page unchanged as page; null means the end. Read-only. Errors: 400 INVALID_PARAMS for an unknown query parameter, a limit outside 1 to 100 or a stale cursor; 403 PERMISSION_DENIED for a run or computer token, or a session token that names no agent.

Signature

praxis.workforce.jobs.list(args?:{query?:{limit?:number;page?:string;status?:"active"|"retired"}}):Promise<{/** Jobs on this page. */ data:Array<{/** 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}>;/** Whether another page is available after this one. */ has_more:boolean;/** Cursor to pass as page to read the next page; null when no more items remain. */ next_page:string|null}>;

Parameters

NameInTypeRequiredDescription
limitquerynumbernoMaximum items per page, from 1 to 100; defaults to 20.
pagequerystringnoOpaque next_page cursor returned by the previous response; omit for the first page.
statusquery“active” | “retired”noOnly jobs in this status; omit to list active and retired jobs together.

Responses

StatusContent typesDescription
200application/jsonOne page of jobs.
400application/problem+jsonINVALID_PARAMS; an unknown query parameter, a limit outside 1 to 100, a bad filter value or a stale page cursor. The message lists the accepted parameters.
401Missing or invalid credential; provide a valid organization API key or sign in to the Console.
403application/problem+jsonPERMISSION_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.