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.
签名
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}>;参数
| 名称 | 位置 | 类型 | 必填 | 说明 |
|---|---|---|---|---|
| limit | query | number | 否 | Maximum items per page, from 1 to 100; defaults to 20. |
| page | query | string | 否 | Opaque next_page cursor returned by the previous response; omit for the first page. |
| department_id | query | string | 否 | Only actors holding a position directly in this department (dept_…); sub-departments are not included. |
响应
| 状态码 | 内容类型 | 说明 |
|---|---|---|
| 200 | application/json | One page of actors. |
| 400 | application/problem+json | INVALID_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. |
| 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. |