跳转到内容
EN

Retrieve a project

Code Mode: praxis.devops.projects.retrieve

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

Read one project by id: its repository binding, its release schedule and its gate settings. Use it to confirm a project’s configuration before releasing into it, and to learn which environment a promotion order starts from. A project that was deleted, or that belongs to another organization, answers PROJECT_NOT_FOUND — the two are indistinguishable on purpose, so the answer never tells you whether a project exists elsewhere.

签名

praxis.devops.projects.retrieve(args:{path:{/** e.g. "dvp_01JQ8Z3M9K4V7B2N6C5X0YTRHW" */ id:string}}):Promise<{/** Project identifier used by every other operation of this domain, so it is the first thing to read from this answer. e.g. "dvp_01JQ8Z3M9K4V7B2N6C5X0YTRHW" */ id:string;/** The resource type of this answer, always project; it lets a caller tell answers of different kinds apart. */ object:"project";/** RFC 3339 UTC time the project was created; the project list is ordered by it, newest first. e.g. "2026-10-20T04:00:00Z" */ createTime:string;/** RFC 3339 UTC time the project or one of its settings last changed. e.g. "2026-11-03T09:15:00Z" */ updateTime:string;/** Canonical Console link for this project, for putting a human-readable reference in a card or a message. e.g. "https://console.deepraxis.com/devops/projects/dvp_01JQ8Z3M9K4V7B2N6C5X0YTRHW" */ viewerUrl:string;/** Short kebab-case name unique inside the organization, used to tell projects apart in conversation. e.g. "praxis" */ name:string;/** What this project is for, in the author's own words; absent when none was given. e.g. "The Praxis monorepo's delivery line." */ description?:string;/** The repository this project deploys from, or null when no repository is bound yet — a project without one can hold flags but cannot release or read targets. */ repository:null|{/** The git host serving this repository; the value decides how fullName is read. e.g. "github" */ provider:"github"|"platform";/** Owner and repository name as the git host spells them, which is what a person sees in a clone URL. e.g. "deepractice/praxis" */ fullName:string;/** The branch releases are built from and behindMain is measured against, usually main. e.g. "main" */ defaultBranch:string;/** The git host connection that authorizes reads of this repository; null for a repository on our own Git, which needs none. e.g. "con_01JQ8Z3M9K4V7B2N6C5X0YTRHW" */ connection:(string)|null;/** Whether the repository is private; a private one is only readable through its connection, never anonymously. e.g. true */ private:boolean;mirror:{/** Where the mirror stands; a failed mirror still lets releases run, because a release reads the git host directly. e.g. "fresh" */ state:"syncing"|"fresh"|"stale"|"failed";/** The commit the mirror held when it was last read; absent before the first read finished. e.g. "4f2a9c1d8e7b6a5c4d3e2f1a0b9c8d7e6f5a4b3c" */ headSha?:string;/** RFC 3339 UTC time of that last read; absent before the first read finished. e.g. "2026-11-03T09:14:30Z" */ syncTime?:string;/** Why the last read failed, present only while state is failed; it names the git host's own message rather than a summary. e.g. "GitHub returned 403 for this installation." */ error?:string}};settings:{/** The cron that cuts a release on its own, or null for a project that only releases when a person asks. */ releaseSchedule:null|{/** Five-field cron expression, read in timeZone; it decides the release's start, not how long the release takes. e.g. "0 9 * * 1-5" */ cron:string;/** IANA zone the cron is read in, so a schedule does not move when the clocks do. e.g. "Asia/Shanghai" */ timeZone:string};/** Not read, kept for old records: the observation window is the observeMinutes of the environment a promotion deploys into, which wins over this value. e.g. 60 */ observationWindowMinutes:number;/** Whether merging into the default branch promotes to the first environment by itself; false means every promotion is asked for explicitly. e.g. true */ autoDeployOnMerge:boolean;/** Whether this project accepts a bypass that skips upstream verification. e.g. false */ allowSkipUpstream:boolean;/** Whether the merge gate is registered with the git host as a required check; true means the host itself blocks a merge the gate has not passed. e.g. true */ requireGate:boolean;gate?:{/** How the merge gate's tests check reads on this project. e.g. "evidence" */ tests?:"evidence"|"off";/** One rule per gate check: its mode (enforce counts it, evaluate shows it without counting, off hides it) and whether an unavailable check blocks. */ rules?:Array<{/** The gate check this rule governs. e.g. "lockfile" */ check:string;/** enforce counts the check toward the gate, evaluate records it without counting, off drops it. e.g. "enforce" */ mode:"enforce"|"evaluate"|"off";/** What an unavailable check does: fail-closed blocks the gate, fail-open shows it without blocking. e.g. "fail-closed" */ whenUnavailable:"fail-closed"|"fail-open";/** The check's own parameters; passed through unread. */ params?:{[key:string]:unknown}}>;/** Subjects allowed to bypass the gate, as agent:<id> or human:<id>. */ bypass?:Array<string>};retention?:{/** Delete a pull request's branch as soon as it merges, as GitHub's automatic head-branch deletion does. e.g. true */ deleteMergedBranch?:boolean;/** Days a stopped unit whose change is still open is kept before it is deleted (the unit pushes its work to a WIP ref first and is kept when it cannot). e.g. 30 */ stoppedUnitDays?:number;/** Days test evidence rows are kept. e.g. 90 */ evidenceDays?:number;/** How many ready prebuilds each workspace keeps, newest first; older ones are archived and their snapshots deleted. e.g. 2 */ prebuildVersions?:number};deploy?:{/** Which version of the deploy engine (the published @deepraxis/cli, which carries praxis devops deploy, the OpenTofu orchestration and the built-in cloudflare and e.g. "latest" */ engine?:string;/** Which machine a promotion is built on. e.g. "spot" */ builder?:"slim"|"spot"};release?:{/** Which engine runs a promotion of this project. e.g. "queue" */ engine?:"queue"|"workflow"}};/** Free-form key and value pairs on the project, for grouping and for a caller's own bookkeeping; empty when none were set. e.g. {"team":"platform"} */ labels:{[key:string]:string}}>;

参数

名称位置类型必填说明
idpathstring是The project identifier returned by the project list, not the project’s display name or its repository name.

响应

状态码内容类型说明
200application/jsonThe addressed project with its repository, settings and labels.
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.
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.