List periods
Code Mode: praxis.workforce.periods.list
HTTP: GET /workforce/v1/periods
Lists the periods of your organization’s OKR calendar, newest start first; use it to find the period_id to set objectives in, or to see which periods are still open for grading. Closed periods are included. Filter cadence to read one level of the calendar. 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/periods?cadence=quarter.
签名
praxis.workforce.periods.list(args?:{query?:{limit?:number;page?:string;cadence?:"year"|"half"|"quarter"}}):Promise<{/** Periods on this page. */ data:Array<{/** Period id (prd_...); use it as period_id and parent_id. */ id:string;/** Id of the organization that owns the period. */ organization_id:string;/** Period name, 1 to 100 characters, such as 2026 Q4. */ name:string;/** Level of the calendar this period sits on; periods of one cadence never overlap. e.g. "quarter" */ cadence:"year"|"half"|"quarter";/** Id of the coarser period (prd_...) that contains this one; null for a period with no parent. */ parent_id:string|null;/** First day of the period as a calendar date (YYYY-MM-DD). e.g. "2026-10-01" */ start_on:string;/** Last day of the period as a calendar date (YYYY-MM-DD), inclusive. e.g. "2026-12-31" */ end_on:string;/** Derived from the dates and today's UTC date, except closed, which only close sets. */ status:"planning"|"active"|"grading"|"closed";/** UTC instant (RFC 3339) when the period was opened. */ create_time:string;/** UTC instant (RFC 3339) of the latest change to the period. */ 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}>;参数
| 名称 | 位置 | 类型 | 必填 | 说明 |
|---|---|---|---|---|
| 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. |
| cadence | query | “year” | “half” | “quarter” | 否 | Only periods of this cadence; omit to list every level of the calendar. |
响应
| 状态码 | 内容类型 | 说明 |
|---|---|---|
| 200 | application/json | One page of periods. |
| 400 | application/problem+json | INVALID_PARAMS; an unknown query parameter, a limit outside 1 to 100 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. |