Skip to content

Delete a leftover resource

Deletes a leftover resource — a server, snapshot, SSH key or firewall — from your organization's own cloud provider account: one that carries Forge's labels but belongs to no server Forge manages any more (none it knows about, or one left without an account when its account was disconnected, such as a server forgotten with forget_hosts=true, see Disconnect a cloud account), as listed under orphans by List servers. Such resources can still be charged by the provider, and Forge never deletes them on its own.

The resource is read again at the provider first, with your connected account, and deleted only while it still carries Forge's labels and is not protected against deletion; anything else is left untouched and refused. A leftover whose labels name a server Forge still manages is refused as not found, so this endpoint can never remove a live server; one labelled for a server left without an account by a disconnect is deleted only while the provider still labels it for that server. Answers 204 No Content when the resource was deleted or was already gone. Resources in Aitronos' own accounts are never listed or deletable here.

Requires a bearer token (or API key) whose principal holds the manage_forge capability in the acting organization. It works while Forge cloud compute is switched off.

DELETEhttps://api.aitronos.com/v1/forge/compute/orphans/{offering_id}/{provider_resource_id}

Path Parameters

offering_id string required

The bring-your-own offering whose connected account holds the resource, as listed with the orphan, e.g. digitalocean.

provider_resource_id string required

The resource's id at the provider, exactly as listed with the orphan (up to 255 characters). Some providers' ids contain a / (zone and id); send it unchanged — it is part of the path.

Query Parameters

organization_id string optional

The organization to act in. Defaults to your current organization. You must be an active member of it, or the request is refused with 403 ORGANIZATION_ACCESS_DENIED.

Headers

X-Organization-Id string optional

The same as organization_id, as a header. When both are sent, the query parameter wins.


Returns

No body — 204 No Content when the resource was deleted or was already gone.

Errors

StatusCodeWhen
401AUTHENTICATION_REQUIREDNo valid credential.
403ORGANIZATION_ACCESS_DENIEDorganization_id or X-Organization-Id names an organization you are not an active member of.
403INSUFFICIENT_PERMISSIONSThe caller does not hold manage_forge in the acting organization.
404FORGE_COMPUTE_ORPHAN_NOT_FOUNDNo leftover with this id is listed for this offering in the organization, or its labels name a server Forge still manages (any server but one left without an account when this offering's account was disconnected, such as one forgotten with forget_hosts=true).
409FORGE_COMPUTE_INVALID_STATEThe provider copy is protected against deletion or no longer carries Forge's labels (details.reason not_deletable), or it is busy with another provider action (details.state busy; try again later).
422FORGE_COMPUTE_CREDENTIAL_MISSINGThe account the resource was found in is no longer connected.
422FORGE_COMPUTE_CREDENTIAL_REJECTEDThe provider no longer accepts the connected account.
502FORGE_COMPUTE_PROVIDER_UNREACHABLEThe provider did not answer. Nothing was deleted.
cURL
curl -X DELETE "https://api.aitronos.com/v1/forge/compute/orphans/digitalocean/512399871" \
  -H "Authorization: Bearer $ACCESS_TOKEN"

Response:

(empty body)