Skip to content
中文

List positions

Code Mode: praxis.workforce.positions.list

HTTP: GET /workforce/v1/positions

Lists positions across the organization ordered by department and then number, vacant ones included; narrow it with department_id, job_id, status or is_head. Filters combine with AND. 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, a non-boolean is_head or a stale cursor; 403 PERMISSION_DENIED for a run or computer token, or a session token that names no agent. Example: GET /workforce/v1/positions?department_id=dept_123&status=active.

Signature

praxis.workforce.positions.list(args?:{query?:{limit?:number;page?:string;department_id?:string;status?:"active"|"frozen"|"closed";job_id?:string;is_head?:boolean}}):Promise<{/** Positions on this page. */ data:Array<{/** Position id (pos_...). */ id:string;/** Id of the organization that owns the position. */ organization_id:string;/** Id of the department (dept_...) the position sits in. */ department_id:string;/** Number inside the department, from 1; never reused after a position is closed. */ number:number;/** Id of the job (jpr_...) the position was opened from; null for a one-off position opened without a job. */ job_id:string|null;/** Title of the position; defaults to the job name when it was opened. */ title:string;/** The position's own copy of its duties; later revisions of the job do not change it. */ duties:string;/** The position's own copy of its methods; later revisions of the job do not change it. */ methods:string;/** Id of the job level (lvl_...) of the position; null when no level is set. */ job_level_id:string|null;/** Id of the position this one explicitly reports to; null means it follows the default line to its department head. */ reports_to_position_id:string|null;/** Whether this position is the head of its department. */ is_head:boolean;/** Where the position stands in its life. */ status:"active"|"frozen"|"closed";/** Current holder of the position, or null while it is vacant; otherwise the actor holding it and whether this is their primary position. */ holder:({/** Actor address of the holder, such as human:usr_123 or agent:agt_123. */ actor:string;/** Display name of the holder. */ name:string;/** Kind of actor holding the position. */ kind:"human"|"general"|"service"|"assume";/** URL of the holder's avatar; null when none is set. */ avatar:string|null;/** Whether the holder's account is archived. */ archived:boolean})&({/** True when this is the holder's primary position; false for a concurrent one, which make_primary can promote. */ primary:boolean})|null;/** The manager position after applying the default line; null at the top of the tree. */ effective_reports_to:{/** Id of the position that is the manager. */ position_id:string;/** Title of the manager position. */ title:string;/** Holder of the direct manager position; null while that position is vacant. */ holder:{/** Actor address of the holder, such as human:usr_123 or agent:agt_123. */ actor:string;/** Display name of the holder. */ name:string;/** Kind of actor holding the position. */ kind:"human"|"general"|"service"|"assume";/** URL of the holder's avatar; null when none is set. */ avatar:string|null;/** Whether the holder's account is archived. */ archived:boolean}|null;/** Holder of the first filled position further up the reporting line when the direct manager position is vacant; otherwise null. */ acting:{/** Actor address of the holder, such as human:usr_123 or agent:agt_123. */ actor:string;/** Display name of the holder. */ name:string;/** Kind of actor holding the position. */ kind:"human"|"general"|"service"|"assume";/** URL of the holder's avatar; null when none is set. */ avatar:string|null;/** Whether the holder's account is archived. */ archived:boolean}|null}|null;/** Actor address that opened the position, such as human:usr_123. */ created_by:string;/** UTC instant (RFC 3339) when the position was opened. */ create_time:string;/** UTC instant (RFC 3339) of the latest change to the position. */ 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.
department_idquerystringnoOnly positions in this department (dept_…); sub-departments are not included.
statusquery“active” | “frozen” | “closed”noOnly positions in this status; omit to list all of them.
job_idquerystringnoOnly positions opened from this job (jpr_…).
is_headquerybooleannotrue lists only department head positions; false lists only the others; omit for both.

Responses

StatusContent typesDescription
200application/jsonOne page of positions.
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.