Skip to content
中文

List actors holding positions

Code Mode: praxis.workforce.actors.list

HTTP: GET /workforce/v1/actors

Lists every actor, person or agent, that currently holds at least one position, ordered by actor address, each with its primary position and all positions it holds; use it to see who works where. Actors holding nothing are not listed. 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. Example: GET /workforce/v1/actors?department_id=dept_123.

Signature

praxis.workforce.actors.list(args?:{query?:{limit?:number;page?:string;department_id?:string}}):Promise<{/** Actors on this page. */ data:Array<{/** Actor address, such as human:usr_123 for a person or agent:agent_123 for an agent. */ actor:string;/** Id of the position (pos_...) of the actor's primary assignment; null only if no assignment is marked primary. */ primary_position_id:string|null;/** Ids of all positions (pos_...) the actor currently holds, primary and concurrent, in ascending order. */ position_ids:Array<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 actors holding a position directly in this department (dept_…); sub-departments are not included.

Responses

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