Skip to content

Unexpose a VM app

DELETE/v1/vms/{uid}/apps/{app}

Removes an exposed port's public URL. The app moves to deleting and is removed when the operation finishes. Only apps in ready or failed state can be removed. If the app is already deleting, its in-flight operation is returned with 200 and is_replay: true.

This is asynchronous. It returns 202 Accepted with an operation_id. See Get an operation. Send an X-Idempotency key to make retries safe: a retry with the same key returns the original operation with 200, even after the app has been removed. The key is tied to the VM and the app: reusing it for another app or VM returns 409 with action: idempotency_key_reused.

Authentication

Send your API key as Authorization: Bearer <token>. The request is scoped to the workspace in X-Workspace-Slug.

Path parameters

uidstringRequired

The VM's uid.

appstringRequired

The app's slug (its name is also accepted and converted to a slug).

Headers

X-Workspace-SlugstringRequired

Slug of the workspace the request acts on. You can also pass it as the workspace_slug query parameter.

X-Idempotencystring

Optional unique key for this request, such as a UUID. Leading and trailing spaces are ignored. If you send a key you already used for the same action on the same resource, the original operation is returned with 200 OK and X-Idempotency-Replay: true, and nothing new is queued. The replay check runs before the resource is loaded or its state is checked, so a retry gets the original result even after the action has finished. Reusing a key for a different action, resource type or resource returns 409 with action: idempotency_key_reused. Keys are shared across the workspace. Without a key, every request is treated as new.

Response

202

The unexpose operation was queued.

successbooleanRequired

true when the request succeeded.

messagestringRequired

Human-readable status message.

dataobject
Show attributes
operation_idstringRequired

UID of the queued operation. Poll it with Get an operation.

vm_uidstringRequired

UID of the VM.

vm_namestringRequired

Name of the VM.

appobjectRequired

The app exposure. On a replay, its current state, or only uid, vm_uid and name if it has been removed.

Show attributes
uidstringRequired

Unique identifier of the app exposure.

vm_uidstringRequired

UID of the VM.

namestringRequired

Name of the exposure (stored in slug form).

slugstringRequired

Identifier used in the unexpose path.

statusstringRequired

pending while the route is being created, ready when live, deleting while being removed, failed if provisioning failed.

One ofpendingreadydeletingfailed

portintegerRequired

Port on the VM that the URL forwards to.

protocolstringRequired

Backend protocol.

One ofhttpgrpc

hostnamestringRequired

Public hostname of the exposure.

urlstringRequired

Public HTTPS URL of the exposure.

last_failurestring

Reason for the last failure. Omitted when there is none.

created_atstring (date-time)Required

When the exposure was created.

statusstringRequired

Status of the operation.

One ofqueuedrunningsucceededfailed

events_urlstringRequired

Path of the server-sent events stream with the operation's progress.

is_replaybooleanRequired

true when an existing operation was returned for a reused X-Idempotency key or an in-flight removal.

is_completedbooleanRequired

true when a returned existing operation has already finished.

Response

200

Replay. The X-Idempotency key was already used to unexpose this app, or the app is already being removed, so the existing operation is returned and nothing is queued. If the app is already gone, app holds only its uid, vm_uid and name.

successbooleanRequired

true when the request succeeded.

messagestringRequired

Human-readable status message.

dataobject
Show attributes
operation_idstringRequired

UID of the queued operation. Poll it with Get an operation.

vm_uidstringRequired

UID of the VM.

vm_namestringRequired

Name of the VM.

appobjectRequired

The app exposure. On a replay, its current state, or only uid, vm_uid and name if it has been removed.

Show attributes
uidstringRequired

Unique identifier of the app exposure.

vm_uidstringRequired

UID of the VM.

namestringRequired

Name of the exposure (stored in slug form).

slugstringRequired

Identifier used in the unexpose path.

statusstringRequired

pending while the route is being created, ready when live, deleting while being removed, failed if provisioning failed.

One ofpendingreadydeletingfailed

portintegerRequired

Port on the VM that the URL forwards to.

protocolstringRequired

Backend protocol.

One ofhttpgrpc

hostnamestringRequired

Public hostname of the exposure.

urlstringRequired

Public HTTPS URL of the exposure.

last_failurestring

Reason for the last failure. Omitted when there is none.

created_atstring (date-time)Required

When the exposure was created.

statusstringRequired

Status of the operation.

One ofqueuedrunningsucceededfailed

events_urlstringRequired

Path of the server-sent events stream with the operation's progress.

is_replaybooleanRequired

true when an existing operation was returned for a reused X-Idempotency key or an in-flight removal.

is_completedbooleanRequired

true when a returned existing operation has already finished.

Errors

StatusMeaning
400The request was malformed or failed validation.
401The API key is missing, invalid, expired or revoked.
403You cannot access the workspace, your role does not allow this action, or the account is suspended.
404The resource does not exist or you cannot access it.
409Conflict: app exposure is still being provisioned (app is pending), app exposure is already being removed, app exposure cannot be removed in its current state, vm is not available for this action, or the X-Idempotency key was used for a different operation (action: idempotency_key_reused).

Errors use the standard error format.