Skip to content
中文

Refresh the target catalog

Code Mode: praxis.devops.projects.targets.refresh

HTTP: POST /devops/v1/projects/{project}/targets:refresh

Re-read the repository at a commit and answer the deployment targets it implies, recording what was found. Call it after adding or removing a deployable service so later promotions see the current layout; omit commit to read the default branch’s head, or name one to read that commit. The answer includes the dependency graph and any cycles in it, and a cycle is reported rather than refused, matching how the deploy pipeline treats one. This is a read of the repository that also remembers what it read, so it is safe to call again; nothing is deployed by it.

Signature

praxis.devops.projects.targets.refresh(args:{path:{/** e.g. "dvp_01JQ8Z3M9K4V7B2N6C5X0YTRHW" */ project:string};body?:{/** Full 40-character commit sha to read instead of the default branch's head; use it to see what a past commit implied rather than what the branch says now. e.g. "4f2a9c1d8e7b6a5c4d3e2f1a0b9c8d7e6f5a4b3c" */ commit?:string}}):Promise<{/** The project this catalog was read for, from the project list. e.g. "dvp_01JQ8Z3M9K4V7B2N6C5X0YTRHW" */ project:string;/** The commit the discovery read; a catalog always describes exactly one commit, never a moving branch. e.g. "4f2a9c1d8e7b6a5c4d3e2f1a0b9c8d7e6f5a4b3c" */ commit:string;/** Every deployable this commit implies, in the order the discovery found them. */ targets:Array<{/** Path inside the repository that holds this deployable, relative to the repository root. e.g. "services/agent" */ path:string;/** What sort of artifact this deployable produces, in the same vocabulary a target uses. e.g. "worker" */ kind:"worker"|"pages"|"npm"|"image"|"container"|"other";/** Paths of the deployables this one depends on, as the discovery inferred them; empty when it depends on nothing. */ dependsOn:Array<string>}>;/** Dependency cycles found in the deploy graph, each one a closed loop of target paths; a cycle is reported rather than refused, and an empty list means the graph */ cycles:Array<Array<string>>;/** RFC 3339 UTC time the discovery finished and this catalog became the project's recorded reading. e.g. "2026-11-03T09:16:00Z" */ generateTime:string}>;

Parameters

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

Request body

RequiredContent typesDescription
noapplication/json

Responses

StatusContent typesDescription
200application/jsonThe catalog read at that commit: its targets, their dependencies and any cycles.
400application/jsonINVALID_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.
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.
503application/jsonSOURCE_NOT_CONFIGURED means the project has no repository binding, so there is no code to read; bind a repository to the project first. GITHUB_UNAVAILABLE and GITHUB_RATE_LIMITED mean the git host could not be read right now, which is transient — retry after a delay rather than changing the request.