List spec revisions
Code Mode: praxis.workforce.specs.revisions.list
HTTP: GET /workforce/v1/specs/{kind}/{id}/revisions
Lists every stored revision of one subject’s spec, newest first, each with its body, author and creation instant; use it to see what changed over time or to pick a revision to read or diff. 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; 404 when the subject does not exist.
Signature
praxis.workforce.specs.revisions.list(args:{path:{kind:"organization"|"department"|"level"|"job"|"position"|"assignment";id:string};query?:{limit?:number;page?:string}}):Promise<{/** Revisions on this page, newest first. */ data:Array<{/** The language of this envelope, always workforce/v1. */ api_version:"workforce/v1";kind:"organization"|"department"|"level"|"job"|"position"|"assignment";metadata:{/** The subject's own id (org_..., dept_..., lvl_..., jpr_..., pos_... */ id:string;/** The subject's own name (the organization's, department's, job's, level's or position's title); null for an assignment or when it cannot be read. */ name:string|null;/** Revision, 0 until the first write and raised by one on every revise; send it as metadata.revision. */ revision:number;/** Short tags for grouping, at most 20 keys; a key is lowercase letters, digits, dot, underscore, slash or hyphen up to 63 characters and a value is a string up to */ labels:{[key:string]:string};/** Free notes for people and tools, at most 20 keys with string values up to 1000 characters. */ annotations:{[key:string]:string};/** Why this revision was written, up to 500 characters; each revision has its own, null when none was given. */ change_note:string|null;/** UTC instant (RFC 3339) this revision was written; null when the subject never had a spec written. */ update_time:string|null;/** Actor address that wrote this revision (human:usr_... */ updated_by:string|null};spec:{/** Markdown text of this unit, injected into each holder's memory as its own entry and never merged with other layers. */ document?:string;/** What the unit provisions its holders with: a map from block name to block value, merged along the chain of a seat and sent through verbatim. */ provision?:{[key:string]:unknown}}}>;/** 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
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| kind | path | “organization” | “department” | “level” | “job” | “position” | “assignment” | yes | Kind of the subject whose revision history to list. |
| id | path | string | yes | The subject’s own id (org_…, dept_…, lvl_…, jpr_…, pos_… or asg_…). |
| limit | query | number | no | Maximum revisions per page, from 1 to 100; defaults to 20. |
| page | query | string | no | Opaque next_page cursor returned by the previous response; omit for the first page. |
Responses
| Status | Content types | Description |
|---|---|---|
| 200 | application/json | One page of revisions, newest first. |
| 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; 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. |
| 404 | application/problem+json | The subject is not in your organization: DEPARTMENT_NOT_FOUND, JOB_LEVEL_NOT_FOUND, JOB_NOT_FOUND, POSITION_NOT_FOUND or ASSIGNMENT_NOT_FOUND. Copy an id from the subject’s list. |