Nova API — /api/streams
The operations Nova tags public under /api/streams. Generated from reference-src/nova-openapi.json.
GET /api/streams
Operation id streams_list: in Python client.call("streams_list", …), on the command line stardelt api streams_list.
The calling user's streams: every StreamApp of their groups, and all of them for an administrator. phase is the operator's status.phase (Pending when it has not reported yet); lastError is the application's own terminal message when the phase is Failed; stopped is spec.stopped. deletionPolicy is Retain or Delete: Retain keeps the source topic and its messages when the stream is deleted. attempts is how many times Spark has submitted the application and lastSubmittedAt when it last did; both are absent until the operator reports them. namespace is Nova's own namespace; every stream lives there, and it is the <namespace> segment a write's path takes. No connection credentials and no checkpoint prefix are part of an answer. Answers Cache-Control: no-store.
Responses
| Code | Description |
|---|---|
200 | The caller's streams, sorted by namespace and name |
401 | No token to sign in with |
502 | The cluster did not answer |
503 | No cluster connection |
POST /api/streams/validate
Operation id streams_validate: in Python client.call("streams_validate", …), on the command line stardelt api streams_validate.
Check a stream write without writing it. The body is the body of streams_put: the stream's name, the ownerGroup the caller must belong to, source (topic, optional connectionRef naming a Connection) and sink (catalog, table as schema.table, mode merge or append, mergeKeys, optional checkpointPrefix), plus an optional restartPolicy (always or on-failure) and an optional provenance (bundle, target, optional revision and repository). Every rule a write runs is checked in order — the name, the body's name against the path's, the caller's groups, the provenance, the topic, the connection reference, the catalog, the table, the mode, the merge keys, the checkpoint prefix, the restart policy — and then the group's ready ServicePrincipal, then the sink pre-flight: a catalog the caller's groups may not write is a sentence with the catalog's name, and a sink table that does not exist is a sentence naming catalog and table (read-only checks; nothing is written). provenance is the stamp a bundle deploy writes; it is checked with the same rules as a pipeline's, and the answer's deployment is what is stored. A rule that refuses is an answer, ok: false with one sentence in errors, status 200, never a 4xx; nothing is written. A cluster that does not answer is still 502 or 503, as on pipelines_validate. Answers Cache-Control: no-store.
Request body
| Field | Type | Required | Default | Description | Constraints |
|---|---|---|---|---|---|
name | string | Yes | The stream's name; the PUT path is authoritative and a different body name is refused. | ||
ownerGroup | string | Yes | The group that owns the stream; the caller must be a member. | ||
provenance | object | No | Which bundle, target and commit this write deploys (stardelt bundle deploy). Omitted leaves what the stream already carries untouched. | ||
provenance.bundle | string | Yes | The bundle's name: 3 to 40 lower-case letters, digits and dashes. | ||
provenance.expiresAt | string (nullable) | No | When the preview copy is due to be removed, RFC 3339. At most 31 days after the deploy. | ||
provenance.preview | string (nullable) | No | The preview this deploy belongs to (stardelt bundle deploy --preview ID). Omitted on a normal deploy; set together with expires_at. | ||
provenance.repository | string (nullable) | No | The bundle's repository as an https://host/path address, so a later stage can link the pull request that promotes a commit. Omitted when the bundle's checkout names none. | ||
provenance.revision | string (nullable) | No | The commit the bundle was read at: 7 to 64 hex digits, with -dirty appended when the working tree had uncommitted changes. Omitted when the bundle is not in a Git checkout. | ||
provenance.target | string | Yes | The target of the bundle: 1 to 32 lower-case letters, digits and dashes. | ||
restartPolicy | string (nullable) | No | always (default) or on-failure. | ||
sink | object | Yes | |||
sink.catalog | string | Yes | |||
sink.checkpointPrefix | string (nullable) | No | |||
sink.mergeKeys | array of string | No | |||
sink.mode | string (nullable) | No | merge (default) or append. | ||
sink.table | string | Yes | schema.table. | ||
source | object | Yes | |||
source.connectionRef | string (nullable) | No | Name of the Connection (type: kafka); absent means the platform's own bus. | ||
source.topic | string | Yes | |||
viewers | array of string | No | Groups that may read this stream without being members (spec.viewers), read-only. At most 16, each a group name; empty writes none. |
Responses
| Code | Description |
|---|---|
200 | The verdict: accepted, or the one sentence that refuses it |
401 | No token to sign in with |
502 | The cluster did not answer |
503 | No cluster connection |
PUT /api/streams/{namespace}/{name}
Operation id streams_put: in Python client.call("streams_put", …), on the command line stardelt api streams_put.
Create or update one stream (StreamApp, D42). The body is the body of streams_validate; name must be the path's name. provenance (bundle, target, optional revision and repository) is the stamp a bundle deploy writes; it is checked with the same rules as a pipeline's, and the answer's deployment is what is stored. Nova writes runAs: pipeline-<groupId> itself (never from the body), stamps its own labels and the creator's annotation, and never carries stopped: it defaults to false on create and an update leaves the stored value alone. Refusals, in this order: a name outside 1 to 40 lower-case letters, digits and dashes starting with a letter, a body name that differs from the path, a group the caller is not a member of, a topic outside 1 to 249 letters, digits, dot, underscore or dash, a bad connection reference, catalog, table, mode, merge key, checkpoint prefix or restart policy, a bundle stamp outside a pipeline's provenance rules — all 400; a group without a ready ServicePrincipal 409 with the principals route's message; then the sink pre-flight: a catalog the caller's groups may not write, or a sink table that does not exist, 400 with a sentence naming the catalog, or the catalog and the table; a stream that belongs to another group 404 (the read path's rule, like a stream that does not exist); a body that moves an existing stream to another group 400 "the group of an existing stream cannot change"; a stream Nova did not write 409 this stream was created outside Nova; change it where it was created; a stream another writer changed between the read and the write 409 the stream changed while it was being written; retry. A foreign namespace and a stream that vanished are 404. The answer is the stored stream's view. Answers Cache-Control: no-store.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
name | path | string | Yes | The stream's name |
namespace | path | string | Yes | The stream's namespace; only Nova's own namespace |
Request body
| Field | Type | Required | Default | Description | Constraints |
|---|---|---|---|---|---|
name | string | Yes | The stream's name; the PUT path is authoritative and a different body name is refused. | ||
ownerGroup | string | Yes | The group that owns the stream; the caller must be a member. | ||
provenance | object | No | Which bundle, target and commit this write deploys (stardelt bundle deploy). Omitted leaves what the stream already carries untouched. | ||
provenance.bundle | string | Yes | The bundle's name: 3 to 40 lower-case letters, digits and dashes. | ||
provenance.expiresAt | string (nullable) | No | When the preview copy is due to be removed, RFC 3339. At most 31 days after the deploy. | ||
provenance.preview | string (nullable) | No | The preview this deploy belongs to (stardelt bundle deploy --preview ID). Omitted on a normal deploy; set together with expires_at. | ||
provenance.repository | string (nullable) | No | The bundle's repository as an https://host/path address, so a later stage can link the pull request that promotes a commit. Omitted when the bundle's checkout names none. | ||
provenance.revision | string (nullable) | No | The commit the bundle was read at: 7 to 64 hex digits, with -dirty appended when the working tree had uncommitted changes. Omitted when the bundle is not in a Git checkout. | ||
provenance.target | string | Yes | The target of the bundle: 1 to 32 lower-case letters, digits and dashes. | ||
restartPolicy | string (nullable) | No | always (default) or on-failure. | ||
sink | object | Yes | |||
sink.catalog | string | Yes | |||
sink.checkpointPrefix | string (nullable) | No | |||
sink.mergeKeys | array of string | No | |||
sink.mode | string (nullable) | No | merge (default) or append. | ||
sink.table | string | Yes | schema.table. | ||
source | object | Yes | |||
source.connectionRef | string (nullable) | No | Name of the Connection (type: kafka); absent means the platform's own bus. | ||
source.topic | string | Yes | |||
viewers | array of string | No | Groups that may read this stream without being members (spec.viewers), read-only. At most 16, each a group name; empty writes none. |
Responses
| Code | Description |
|---|---|
200 | The stream as written |
400 | A rule of the body refuses the write, with its sentence |
401 | No token to sign in with |
404 | The namespace is not Nova's own |
409 | No ready principal, a stream written outside Nova, or a concurrent change |
502 | The cluster did not answer |
503 | No cluster connection |
PATCH /api/streams/{namespace}/{name}
Operation id streams_patch: in Python client.call("streams_patch", …), on the command line stardelt api streams_patch.
Stop or resume one stream: merge spec.stopped and answer the updated view.
Stop or resume one stream by setting spec.stopped (the one verb a stream has). true stops the job and keeps the checkpoint so false resumes from it. A stream the caller may not see, a foreign namespace, and a name that does not exist all answer the same 404. The answer is the updated stream view. Answers Cache-Control: no-store.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
name | path | string | Yes | The stream's name |
namespace | path | string | Yes | The stream's namespace; only Nova's own namespace |
Request body
| Field | Type | Required | Default | Description | Constraints |
|---|---|---|---|---|---|
stopped | boolean | Yes | The desired spec.stopped. |
Responses
| Code | Description |
|---|---|
200 | The stream, with spec.stopped applied |
401 | No token to sign in with |
404 | No such stream, or the caller may not see it, or the namespace is not Nova's own |
502 | The cluster did not answer |
503 | No cluster connection |
DELETE /api/streams/{namespace}/{name}
Operation id streams_delete: in Python client.call("streams_delete", …), on the command line stardelt api streams_delete.
Delete one StreamApp that the caller's group owns. A KafkaTopic the operator created for the stream (platform bus, no connectionRef) follows spec.deletionPolicy: with Delete the topic is owned by the StreamApp, so Kubernetes deletes it and the topic operator deletes the topic with every message in it; with Retain (the default) the KafkaTopic carries no owner reference and stays, with every message, still managed. A topic read through a Connection, or one another KafkaTopic manages, always stays. Answers 204 when the object is gone, including when it was already gone.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
name | path | string | Yes | StreamApp name |
namespace | path | string | Yes | Namespace (must be the platform namespace) |
Responses
| Code | Description |
|---|---|
204 | The StreamApp is gone |
401 | Not signed in |
404 | No such stream, another namespace, or the caller may not act on it |
502 | The cluster did not answer |
503 | No cluster connection |