跳转到内容
EN

Retrieve a change

Code Mode: praxis.devops.changes.retrieve

HTTP: GET /devops/v1/changes/{id}

Read one change in full: its derived stage, its pull requests (one per slice, oldest first), its flag, its workspace, and one cell per environment showing the version it rode and how far its flag has been rolled out there. The id is the branch name and contains a slash, so it must be percent-encoded in the path: feat/run-page-v2 is sent as feat%2Frun-page-v2. The stage is derived, not stored — with several pull requests it shows the slice that is furthest behind, so a change already in production that opens a new slice goes back to reviewing. When suspectedIn is set, the latest verification in that environment failed and this change is listed among the suspects until a later verification succeeds.

签名

praxis.devops.changes.retrieve(args:{path:{/** e.g. "feat/run-page-v2" */ id:string}}):Promise<{/** The change's id, which is its branch name <type>/<slug>; unique within the project and percent-encoded in paths. e.g. "feat/run-page-v2" */ id:string;/** The resource type of this answer, always change. */ object:"change";/** RFC 3339 UTC time the change was opened; the change list is ordered by it, newest first. e.g. "2026-11-08T06:30:00Z" */ createTime:string;/** RFC 3339 UTC time the change's own fields last changed. e.g. "2026-11-08T07:02:00Z" */ updateTime:string;/** Canonical Console link for this change. e.g. "https://console.deepraxis.com/devops/dvp_01m6j8swzteapw2j5sh4/changes/feat/run-page-v2" */ viewerUrl:string;/** The project this change belongs to, from the project list. e.g. "dvp_01m6j8swzteapw2j5sh4" */ project:string;/** The first half of the id, listed so readers need not split it. e.g. "feat" */ type:string;/** The second half of the id; also the key of the change's flag. e.g. "run-page-v2" */ slug:string;/** One line saying what the change is for. e.g. "Run page v2: streaming output and tool cards" */ title:string;/** Ticket references the change belongs to. */ tickets:Array<string>;/** Whether the change carries a flag that is rolled out in each environment on its own. e.g. true */ withFlag:boolean;owner:{/** What sort of actor this is, which decides how the id should be read. e.g. "user" */ kind:"user"|"agent"|"system";/** Identifier of the actor within its kind, such as a user id for a person. e.g. "usr_01JQ8Z3M9K4V7B2N6C5X0YTRHW" */ id:string;/** Display name for the actor at the time, so a record reads the way it did when it was written; absent when none was known. e.g. "Sean" */ label?:string};/** True for an urgent fix that may take the patch path. e.g. false */ urgent:boolean;/** The branch that was cut; null when the project has no connected repository. e.g. "feat/run-page-v2" */ branch:string|null;/** The pull requests whose head branch is this change's id, one per slice. */ pullRequests:Array<{/** The pull request identifier, used to read the pull request itself. e.g. "pr_01JQ8Z3M9K4V7B2N6C5X0YTRHW" */ id:string;/** The pull request number on the git host; slice order follows it. e.g. 412 */ number:number;/** The pull request's state on the git host. e.g. "open" */ state:"open"|"closed"|"merged";/** True while the pull request is a draft and cannot be merged. e.g. false */ draft:boolean;/** True once it was merged; equal to state merged. e.g. false */ merged:boolean;/** The commit that merged it into main; null before it is merged. e.g. "4f9c2ab" */ mergeCommit:string|null;/** The pull request title as it stands on the git host. e.g. "Run page v2: streaming output" */ title:string;/** RFC 3339 UTC time the pull request last changed. e.g. "2026-11-08T07:02:00Z" */ updateTime:string}>;/** The change's flag id, readable with the flag retrieve call; null when it has no flag. e.g. "flg_01JQ8Z3M9K4V7B2N6C5X0YTRHW" */ flag:string|null;/** The workspace that has the branch checked out; null when none does. e.g. null */ workspace:string|null;/** Whether the next merged pull request is the last slice; until it is true the change cannot roll out or finish. e.g. true */ lastSlice:boolean;/** True once the change was abandoned. e.g. false */ abandoned:boolean;stage:{/** The change's position; with several pull requests it is the slice furthest behind. e.g. "reviewing" */ stage:"developing"|"reviewing"|"integrating"|"integrated"|"deployed"|"rolling_out"|"done"|"abandoned"|"rolled_back";/** The environment the stage refers to, from the project's environment list; absent for stages that are not tied to one. e.g. "dve_01JQ8Z3M9K4V7B2N6C5X0YTRHW" */ environment?:string;/** A qualifier inside the stage: paused means the rollout was turned back to zero, verification_failed means the version deployed but its verification failed; othe e.g. "verification_failed" */ sub?:string};/** Set when this change is a suspect of a failed verification that no later success has replaced; null otherwise. */ suspectedIn?:{/** The promotion whose verification failed, from a promotion read. e.g. "prm_01JQ8Z3M9K4V7B2N6C5X0YTRHW" */ promotion:string;/** The release that promotion carried. e.g. "rls_01JQ8Z3M9K4V7B2N6C5X0YTRHW" */ release:string;/** The environment where verification failed. e.g. "dve_01JQ8Z3M9K4V7B2N6C5X0YTRHW" */ environment:string;/** The test runs that failed verification. */ runs:Array<string>}|null;/** One cell per environment of the project. */ cells:Array<{/** The environment this cell describes, from the project's environment list. e.g. "dve_01JQ8Z3M9K4V7B2N6C5X0YTRHW" */ environment:string;/** True once a promotion carrying this change succeeded in the environment. e.g. true */ deployed:boolean;/** The release the change rode into this environment; absent when it was not deployed there. e.g. "rls_01JQ8Z3M9K4V7B2N6C5X0YTRHW" */ version?:string;/** The change's flag in this environment; present only for a change that has a flag. */ flag?:{/** Whether the flag is on in this environment. e.g. true */ on:boolean;/** The share of traffic served while on, 0 to 100; absent while on means the internal organization only. e.g. 50 */ percent?:number;/** True when the rollout was paused and turned back to zero. e.g. false */ paused?:boolean}}>}>;

参数

名称位置类型必填说明
idpathstring是The change’s id, which is its branch name <type>/<slug> from a change list or create answer. Give it as it comes back — `feat/run-page-v2`: the SDK and the CLI encode the slash themselves, and an id that is already percent-encoded is encoded a second time and answers CHANGE_NOT_FOUND. Only a caller writing the HTTP request by hand sends feat%2Frun-page-v2.

响应

状态码内容类型说明
200application/jsonThe addressed change with its pull requests, flag and per-environment cells.
401application/jsonThe API key is missing or invalid; send a valid Praxis API key in the Authorization header before retrying.
403application/jsonThe credential carries no organization, or that organization cannot reach this project; use a key belonging to the project’s organization. No cross-organization read is possible.
404application/jsonCHANGE_NOT_FOUND means no change with that id exists in this organization; list the project’s changes and use an id from that answer, with its slash percent-encoded.
500application/jsonINTERNAL means the service could not complete the request; retry once, and if it repeats report the request id. A read is safe to repeat; a write that failed this way should be re-read before it is sent again.