List projects
Code Mode: praxis.devops.projects.list
HTTP: GET /devops/v1/projects
List the delivery projects this organization has, newest first, with each project’s repository binding and settings. Call this first when you do not already hold a project id: every other operation in this domain is addressed by one. A project from another organization is never listed, so an empty page means this organization has none rather than that they are hidden. The order is by creation time descending; follow nextPageToken until it is empty to see them all. The page always carries visibleProjects: how many projects the caller’s own organization has in total, deleted ones excluded. Those are the projects visible to the credential’s organization — the count filters by organization_id and is not a permission check — so an empty items array reads as “this organization has none yet” instead of leaving you to guess whether the read was lost or the credential points at another organization. It is the organization’s total across all pages, not this page’s length.
签名
praxis.devops.projects.list(args?:{query?:{/** e.g. 20 */ pageSize?:number;/** e.g. "pt1.eyJvIjoyMH0" */ pageToken?:string}}):Promise<{/** The projects on this page, ordered by creation time descending; a project of another organization is never among them. */ items:Array<{/** 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}}>;/** Cursor for the next page; an empty string means this was the last page, which is the only signal a list is finished. e.g. "pt1.eyJvIjo1MH0" */ nextPageToken:string;/** How many undeleted projects the caller's own organization has: 0 means the organization has none yet, not that the read returned nothing. e.g. 3 */ visibleProjects:number}>;参数
| 名称 | 位置 | 类型 | 必填 | 说明 |
|---|---|---|---|---|
| pageSize | query | number | 否 | How many items this page returns, 1 to 100; omitted uses 50. A larger value is capped at 100 rather than refused, and 0 falls back to the default, so a paging loop never fails on a size alone. |
| pageToken | query | string | 否 | The cursor from the previous page’s nextPageToken. Treat it as opaque and never build one yourself; omit it for the first page. |
响应
| 状态码 | 内容类型 | 说明 |
|---|---|---|
| 200 | application/json | One page of projects visible to this organization, newest first. |
| 400 | application/json | INVALID_PARAMS or INVALID_ARGUMENT means a field, query value or identifier violates the documented format or range — an unknown enum value, a pageSize outside 1..100, an unsupported filter or orderBy field, or an id with the wrong prefix. Correct the named input; nothing was read or written. |
| 401 | application/json | The API key is missing or invalid; send a valid Praxis API key in the Authorization header before retrying. |
| 403 | application/json | The 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. |
| 500 | application/json | INTERNAL 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. |