Skip to main content

Nova API — /api/deployments

The operations Nova tags public under /api/deployments. Generated from reference-src/nova-openapi.json.

GET /api/deployments​

Operation id deployments_list: in Python client.call("deployments_list", …), on the command line stardelt api deployments_list.

GET /api/deployments — the caller's rows, newest first, at most 50.

The deployment records the caller may see: an administrator sees every row, anybody else the rows of their own groups. Newest first, at most 50, a bare JSON array. ?bundle= and ?target= narrow the list to one bundle and one stage.

Parameters

NameInTypeRequiredDescription
bundlequerystringNoOnly rows of this bundle
targetquerystringNoOnly rows of this stage

Responses

CodeDescription
200The rows, newest first
401The caller has no identity
503The state store is not configured

POST /api/deployments​

Operation id deployments_record: in Python client.call("deployments_record", …), on the command line stardelt api deployments_record.

POST /api/deployments — 201 with the stored row.

Record one bundle deploy: the bundle, the owner group of its pipelines, the stage it went to, the commit and repository, whether it applied or failed, and the rendered documents it applied (its Pipelines and its StreamApps). Only an administrator or a member of the owner group may record one; the caller is stored as actor. A token issued to the Keycloak client stardelt-deploy-<stage> (a deploy principal) is refused with 403 unless the target is <stage> and the caller is a member of the owner group; an administrator's credential has no such client and is unaffected. A bundle belongs to the group that first recorded a deploy of it or imported a dashboard for it; a call that names another group answers 403, an administrator's too.

Request body

FieldTypeRequiredDefaultDescriptionConstraints
bundlestringYesThe bundle that was deployed, 1 to 64 characters, no /.
filesarray of objectNoThe files of the bundle this deploy read, at most 200; empty when the caller sent none.
files[].pathstringYesThe path relative to the bundle directory, with / separators.
files[].sha256stringYesThe file's content, lowercase hex sha256 (64 characters).
ownerGroupstringYesThe owner group of the deployed pipelines; the caller must be a member.
pipelinesarray of objectNoThe pipelines the deploy touched, at most 200.
pipelines[].actionstringYescreated, updated, deleted or unchanged.
pipelines[].namestringYes
pipelines[].namespacestringYes
planIdstring (nullable)NoThe planId of the plan this apply followed (POST /api/deployments/plan), or absent. When given, the row must describe the same rendered set the plan named; otherwise 409.
previousDeploymentIdinteger (nullable)NoThe deployment a rollback replayed, or absent. It is display metadata: the page links to it, and a row the caller may not see answers 404 there.format int64
repositorystring (nullable)NoThe bundle's repository, or absent.
resourcesarrayNoThe rendered documents this deploy applied — Pipeline and StreamApp; empty for a failed deploy.
revisionstring (nullable)NoThe commit that was deployed, or absent when it is not known.
statusstringYesapplied or failed.
targetstringYesThe stage the deploy went to, 1 to 64 characters, no /.

Responses

CodeDescription
201The stored row
400A name is empty, too long or carries a /, the status or an action is not one of the known values, or there are more than 200 pipelines
401The caller has no identity
403Only a member of the pipeline's owner group may record a deployment; a deploy principal may only record a deployment to its stage and of its own group, or the bundle belongs to another group
409The planId does not name the rendered set of this row
503The state store is not configured

POST /api/deployments/plan​

Operation id deployments_plan: in Python client.call("deployments_plan", …), on the command line stardelt api deployments_plan.

POST /api/deployments/plan — what the set would do, 200 with the plan, nothing written.

Say what applying one bundle's rendered Pipeline documents to one stage would do, writing nothing. Every document goes through the same create rules pipelines_validate and the write routes use, so the plan and the apply cannot disagree: changes names a create, an update (with the sentences it would change) or an unchanged document, errors carries the rule that refuses one, and warnings names a pipeline this bundle and stage own that the set does not name (a warning unless prune is true, when it is a delete change). files says which of the bundle's files are new against the newest applied deployment of this bundle and stage. planId is the identity of the rendered set: the SHA-256 of the bundle, the stage, the documents in the order given and the files sorted by path. A later POST /api/deployments may carry it as planId, and answers 409 when the row's set is not the planned one. A prune: true request names each owned pipeline the set omits as a delete change. The stage modes are not covered yet; a StreamApp document is checked with the rules its write runs, and reads as an update when a StreamApp of that name exists, a create otherwise (a stream write is a PUT, so a stream change carries no diff yet). A token issued to the Keycloak client stardelt-deploy-<stage> (a deploy principal) answers 403 unless the target is <stage> and the caller is a member of the owner group; an administrator's credential has no such client and is unaffected. A bundle belongs to the group that first recorded a deploy of it or imported a dashboard for it; a call that names another group answers 403, an administrator's too.

Request body

FieldTypeRequiredDefaultDescriptionConstraints
bundlestringYes
filesarray of objectNo
files[].pathstringYesThe path relative to the bundle directory, with / separators.
files[].sha256stringYesThe file's content, lowercase hex sha256 (64 characters).
ownerGroupstringYes
prunebooleanNoWhether the apply that follows removes what this bundle and target own and the set no longer names (stardelt bundle deploy --prune). The plan names that set as delete changes; the plan itself removes nothing.
resourcesarrayYes
revisionstring (nullable)NoThe commit the bundle was read at; display metadata, not part of the plan's identity. Nothing reads it yet: the record carries the revision, and a later slice shows it beside the plan.
targetstringYes

Responses

CodeDescription
200The plan, with its identity
400A name is empty, too long or carries a /, or there are more than 200 resources or 200 file digests
401The caller has no identity
403Only a member of the pipeline's owner group may plan a deployment; a deploy principal may only plan a deployment to its stage and of its own group, or the bundle belongs to another group
503The state store is not configured, or there is no cluster connection

GET /api/deployments/{id}​

Operation id deployments_get: in Python client.call("deployments_get", …), on the command line stardelt api deployments_get.

GET /api/deployments/{id} — one row, or 404 when it is not one the caller may see.

One deployment record by id: an administrator sees every row, anybody else only a row of their own groups. A row that does not exist and a row of somebody else's group answer the same 404, so the route never says which ids exist.

Parameters

NameInTypeRequiredDescription
idpathintegerYesThe deployment's id

Responses

CodeDescription
200The row
401The caller has no identity
404No such row among the ones the caller may see
503The state store is not configured

POST /api/deployments/{id}/rollback​

Operation id deployments_rollback: in Python client.call("deployments_rollback", …), on the command line stardelt api deployments_rollback.

POST /api/deployments/{id}/rollback — replay a recorded deployment, 201 with the new row.

Roll back to what a recorded deployment applied: the stored rendered documents of a row of the caller's groups are replayed as the caller — each missing one is created and each existing one updated — and the replay is recorded as a new deployment row whose previousDeploymentId points at the source. It needs no Git: it applies exactly what ran. Only a row with status applied and at least one stored resource can be replayed. A StreamApp document is replayed with the rules of streams_put: a stream the caller's group owns is created or updated, and a stream of another group or one Nova did not write is refused with that route's sentence. A document the rules refuse stops the replay: the row is still recorded, as failed, and the answer is 409 with the sentence (400 when a stored document no longer fits its kind — a pipeline or a stream, 502/503 when the cluster did not answer). A token issued to the Keycloak client stardelt-deploy-<stage> (a deploy principal) is refused with 403 unless the row's stage is <stage> and the caller is a member of the row's owner group; an administrator's credential has no such client and is unaffected.

Parameters

NameInTypeRequiredDescription
idpathintegerYesThe deployment's id

Responses

CodeDescription
201The new row recording the replay
400A stored document no longer fits its kind (a pipeline or a stream)
401The caller has no identity
403A deploy principal may not roll back a row of another stage or of another owner group
404No such row among the ones the caller may see
409The row is not applied, it recorded no rendered resources, or a document was refused
502The cluster or the notebook store did not answer
503The state store is not configured, or there is no cluster connection