Skip to content
中文

Create a change

Code Mode: praxis.devops.projects.changes.create

HTTP: POST /devops/v1/projects/{project}/changes

Open a change: the unit that carries one piece of work from a branch to production. A change has no separate id — its id is its branch name, <type>/<slug> (for example feat/run-page-v2), and the branch is cut from main as part of this call. type says what the work is and slug names it; both together are the id, so the same pair sent again answers the change the first call made instead of creating a second. A change with a flag also creates a release flag whose key is the slug, off in every environment, so opening one changes no runtime behaviour; withFlag defaults to true for feat and false for every other type, and you may override it either way. Requesting a change opens it at once — there is no approval step — and the caller becomes its owner. A slug already used by another type in the project is refused with CHANGE_SLUG_TAKEN because both would need the same branch name. The stage in the answer is derived from facts such as pull requests and promotions; it is never something you set. The project id in the path comes from praxis api devops project list. After the call, put your checkout on the change’s branch with praxis devops change checkout <type>/<slug>, using the id the answer returns. tickets takes several references by repeating the option once per reference (--tickets "#812" --tickets "#813"); the option does not split a comma-joined value, so "#812,#813" is read as one reference.

Signature

praxis.devops.projects.changes.create(args:{path:{/** e.g. "dvp_01JQ8Z3M9K4V7B2N6C5X0YTRHW" */ project:string};body:{/** What the work is, in commitlint vocabulary; together with slug it forms the change id <type>/<slug>. e.g. "feat" */ type:"feat"|"fix"|"perf"|"refactor"|"docs"|"test"|"build"|"ci"|"chore"|"revert";/** Lower-case letters, digits and hyphens, 2 to 60 characters; it becomes the branch name after the type and the key of the change's flag. e.g. "run-page-v2" */ slug:string;/** One line saying what the change is for, shown wherever the change is listed and used as the flag's name. e.g. "Run page v2: streaming output and tool cards" */ title:string;/** Ticket references the change belongs to, as a magic word or a #number; omit it when there is none. */ tickets?:Array<string>;/** True to create a release flag keyed by the slug; omitted means true for feat and false for every other type. e.g. true */ withFlag?:boolean;/** True for an urgent fix that may take the patch path with a recorded authorization to skip develop; omitted means false. e.g. false */ urgent?:boolean;/** RFC 3339 UTC deadline by which the flag's observation must be decided; only used when the change creates a flag. e.g. "2026-12-01T00:00:00Z" */ observeUntil?:string;/** Caller-chosen key that makes a retry answer the change the first call made instead of creating another. e.g. "open-run-page-v2-1" */ requestId?: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}}>}>;

Parameters

NameInTypeRequiredDescription
projectpathstringyesIdentifies the project whose data you are reading, from the project list or create answer.

Request body

RequiredContent typesDescription
yesapplication/json

Responses

StatusContent typesDescription
200application/jsonThe created change, or the existing one when the same type and slug were already created, with its derived stage and one cell per environment.
400application/jsonCHANGE_TYPE_INVALID means type is not one of the ten change types; CHANGE_SLUG_INVALID means slug is not lower-case letters, digits and hyphens of 2 to 60 characters. Nothing was created; correct the named field and send it again.
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/jsonPROJECT_NOT_FOUND means no project with that id is visible to this organization; list the projects and use an id from that answer.
409application/jsonCHANGE_SLUG_TAKEN means another change in this project already uses that slug under a different type, so the branch name is taken; read the change it names, or choose a different slug. Nothing was created.
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.