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
| Name | In | Type | Required | Description |
|---|---|---|---|---|
bundle | query | string | No | Only rows of this bundle |
target | query | string | No | Only rows of this stage |
Responses
| Code | Description |
|---|---|
200 | The rows, newest first |
401 | The caller has no identity |
503 | The 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
| Field | Type | Required | Default | Description | Constraints |
|---|---|---|---|---|---|
bundle | string | Yes | The bundle that was deployed, 1 to 64 characters, no /. | ||
files | array of object | No | The files of the bundle this deploy read, at most 200; empty when the caller sent none. | ||
files[].path | string | Yes | The path relative to the bundle directory, with / separators. | ||
files[].sha256 | string | Yes | The file's content, lowercase hex sha256 (64 characters). | ||
ownerGroup | string | Yes | The owner group of the deployed pipelines; the caller must be a member. | ||
pipelines | array of object | No | The pipelines the deploy touched, at most 200. | ||
pipelines[].action | string | Yes | created, updated, deleted or unchanged. | ||
pipelines[].name | string | Yes | |||
pipelines[].namespace | string | Yes | |||
planId | string (nullable) | No | The 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. | ||
previousDeploymentId | integer (nullable) | No | The 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 | |
repository | string (nullable) | No | The bundle's repository, or absent. | ||
resources | array | No | The rendered documents this deploy applied — Pipeline and StreamApp; empty for a failed deploy. | ||
revision | string (nullable) | No | The commit that was deployed, or absent when it is not known. | ||
status | string | Yes | applied or failed. | ||
target | string | Yes | The stage the deploy went to, 1 to 64 characters, no /. |
Responses
| Code | Description |
|---|---|
201 | The stored row |
400 | A 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 |
401 | The caller has no identity |
403 | Only 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 |
409 | The planId does not name the rendered set of this row |
503 | The 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
| Field | Type | Required | Default | Description | Constraints |
|---|---|---|---|---|---|
bundle | string | Yes | |||
files | array of object | No | |||
files[].path | string | Yes | The path relative to the bundle directory, with / separators. | ||
files[].sha256 | string | Yes | The file's content, lowercase hex sha256 (64 characters). | ||
ownerGroup | string | Yes | |||
prune | boolean | No | Whether 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. | ||
resources | array | Yes | |||
revision | string (nullable) | No | The 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. | ||
target | string | Yes |
Responses
| Code | Description |
|---|---|
200 | The plan, with its identity |
400 | A name is empty, too long or carries a /, or there are more than 200 resources or 200 file digests |
401 | The caller has no identity |
403 | Only 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 |
503 | The 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
| Name | In | Type | Required | Description |
|---|---|---|---|---|
id | path | integer | Yes | The deployment's id |
Responses
| Code | Description |
|---|---|
200 | The row |
401 | The caller has no identity |
404 | No such row among the ones the caller may see |
503 | The 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
| Name | In | Type | Required | Description |
|---|---|---|---|---|
id | path | integer | Yes | The deployment's id |
Responses
| Code | Description |
|---|---|
201 | The new row recording the replay |
400 | A stored document no longer fits its kind (a pipeline or a stream) |
401 | The caller has no identity |
403 | A deploy principal may not roll back a row of another stage or of another owner group |
404 | No such row among the ones the caller may see |
409 | The row is not applied, it recorded no rendered resources, or a document was refused |
502 | The cluster or the notebook store did not answer |
503 | The state store is not configured, or there is no cluster connection |