Detach a volume from a sandbox

A kept volume's writes are saved first; a throwaway volume's are gone.

DELETE/v1/sandboxes/{sandbox_id}/volumes/{volume_id}

Not available yet Volumes are not served by the API yet. Their calls answer from a stand-in.

A kept volume's writes are saved first; a throwaway volume's are gone. The volume can then be attached elsewhere. Deleting the sandbox detaches its volumes. A volume not attached to this sandbox is not_found.

A key with the sandboxes:write scope.

Request

curl -X DELETE "https://api.pod.mapier.ai/v1/sandboxes/sbx_3ahrz6dmv29gqy5ckt18fpx4b/volumes/vol_3ahrz6dmv29gqy5ckt18fpx4b" \
  -H "Authorization: Bearer $POD_API_KEY"

Parameters

NameInTypeRequiredWhat it is
sandbox_idpathstringYes
volume_idpathstringYesA block volume.
Idempotency-KeyheaderstringNoMakes a repeat of this call safe for 24 hours.

Answer

204. Detached.

Errors

The refusals this call is known for: not_found. Any call can also answer unauthorized, rate_limited, unavailable or internal; the error list says what each means and when to send the call again.

In the SDKs

ClientCall
TypeScriptpod.volumes.detach(sandbox, volume)
Pythonpod.volumes.detach(sandbox, volume)