Skip to main content

Nova API — /api/compute

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

GET /api/compute​

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

GET /api/compute: the Spark clusters this caller may use.

The Spark clusters the caller may use: an administrator sees every SparkCluster of the platform namespace, everyone else the ones owned by one of their groups or owned by them (owner.user is the sign-in name). Each row carries the owner, the class size, the runtime, the operator's phase (Starting for a requested Running before it has reported, Stopped otherwise) and message, the operator's reason while a cluster is Failed (a refused SparkConnect, a runtime that is not in the catalogue, a driver that cannot start), the Connect endpoint and startedAt while it runs (endpoint is absent when the caller reaches the cluster only through spec.viewers: such a server acts with its owner group's rights, so Nova issues a viewer no channel — #493), lastActivityAt once the operator reports it, idleStopMinutes, canUse, canAct, whether the caller may start, stop or edit the cluster. Each cluster also carries driverServiceAccount and workloadIdentity, the ServiceAccount its driver runs as and the catalog principal its projected token becomes (kubernetes~<uid>); both are absent on a platform server. Next to them the Spark server the platform's own manifests install appears with kind: platform — the public demo's sandbox — carrying mode (kubernetes or local), the container limits, who shares it (audience), when it is restarted (resetsAt) and yours, whether it is the Spark the caller's own notebook uses. A visitor of the public demo sees the sandbox only. Nothing in Nova is state of its own: the operator translates a SparkCluster into the Spark server. Without a cluster connection (a local run) the answer is an empty list. Answers Cache-Control: no-store.

Responses

CodeDescription
200The caller's clusters, sorted by name
401No token to sign in with
502The cluster did not answer
503No cluster connection

POST /api/compute/ensure​

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

POST /api/compute/ensure: the caller's group cluster, reused or created (#493 point 3).

The caller's group cluster: the one already owned by group, or a new SparkCluster named group with size: small, runtime: spark-4.1-py3.13, idleStopMinutes: 60 and state: Running. Only a member of group may call it (administrators are not exempt). An existing cluster is answered as it is, Stopped included; a group whose name is not a valid cluster name (1 to 40 lower-case letters, digits and dashes, starting with a letter) answers 400 and keeps its administrator-made cluster. Two callers at once create one cluster: the loser reads the winner's. Answers the ComputeCluster view of the cluster. Cache-Control: no-store.

Request body

FieldTypeRequiredDefaultDescriptionConstraints
groupstringYesThe owner group; the caller must be a member of it.

Responses

CodeDescription
200The group's cluster, existing or created
400The group name cannot be a cluster name
401No token to sign in with
403The caller is not a member of the group, or the sign-in is shared (the public demo)
409The cluster changed while it was created
502The cluster did not answer
503No cluster connection

POST /api/compute/{name}/start​

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

POST /api/compute/{name}/start: set spec.state: Running.

Start one Spark cluster by merge-patching spec.state: Running; the answer is the updated cluster. Idempotent: a cluster already Running answers its view without a patch. A cluster the caller may not use and a name that does not exist both answer the same 404. A caller outside the owner group answers 403. A cluster the operator is still Starting or Stopping answers 409.

Parameters

NameInTypeRequiredDescription
namepathstringYesThe cluster's name

Responses

CodeDescription
200The cluster, with spec.state: Running applied
401No token to sign in with
403A caller outside the cluster's owner group, or a shared sign-in
404No such cluster, or the caller may not use it
409The cluster is starting or stopping
502The cluster did not answer
503No cluster connection

POST /api/compute/{name}/stop​

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

POST /api/compute/{name}/stop: set spec.state: Stopped.

Stop one Spark cluster by merge-patching spec.state: Stopped; the answer is the updated cluster. Idempotent: a cluster already Stopped answers its view without a patch. A cluster the caller may not use and a name that does not exist both answer the same 404. A caller outside the owner group answers 403. A cluster the operator is still Starting or Stopping answers 409.

Parameters

NameInTypeRequiredDescription
namepathstringYesThe cluster's name

Responses

CodeDescription
200The cluster, with spec.state: Stopped applied
401No token to sign in with
403A caller outside the cluster's owner group, or a shared sign-in
404No such cluster, or the caller may not use it
409The cluster is starting or stopping
502The cluster did not answer
503No cluster connection