Sign in to a declared Sandbox application port
const url = 'https://example.com/apis/nodus.dev/v1/namespaces/example/sandboxes/example/previews';const options = { method: 'POST', headers: {'Content-Type': 'application/json'}, body: '{"expectedUID":"example","port":1}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://example.com/apis/nodus.dev/v1/namespaces/example/sandboxes/example/previews \ --header 'Content-Type: application/json' \ --data '{ "expectedUID": "example", "port": 1 }'Parameters
Section titled “ Parameters ”Path Parameters
Section titled “ Path Parameters ”The project.
The object’s name.
Request Bodyrequired
Section titled “ Request Bodyrequired ”SandboxPreviewRequest mints a short-lived browser sign-in for one declared app port, without waking compute.
object
ExpectedUID binds the request to the displayed Sandbox, not a replacement with the same name.
Port is a port declared in spec.ingress.ports.
Example generated
{ "expectedUID": "example", "port": 1}Responses
Section titled “ Responses ”OK
SandboxPreviewResponse contains a host-bound sign-in URL. Treat it as a credential; it expires in 60 seconds.
object
Example generated
{ "url": "example"}default
Section titled “ default ”An error: a metav1.Status whose reason is a registered code.
Status is the error body of every API response: a Kubernetes metav1.Status (so kubectl and client-go understand it) plus three top-level extensions that those clients ignore (ADR-028).
object
object
object
Docs is the URL of the code’s docs page.
Fix says what to do next, for example a CLI command or the field to change.
object
object
RequestID identifies the request in logs and support tickets.
Example generated
{ "apiVersion": "example", "code": 1, "details": { "causes": [ { "field": "example", "message": "example", "reason": "example" } ], "group": "example", "kind": "example", "name": "example", "retryAfterSeconds": 1, "uid": "example" }, "docs": "example", "fix": "example", "kind": "example", "message": "example", "metadata": { "continue": "example", "remainingItemCount": 1, "resourceVersion": "example", "selfLink": "example", "shardInfo": { "selector": "example" } }, "reason": "example", "requestId": "example", "status": "example"}