Parameters
idstringrequiredFrom list(). Missing → the SDK throws.
Two very different outcomes
| Storage | What happens | Response |
|---|---|---|
| Connected (yours) | We forget the connection. Your data is untouched. | { ok: true } |
| IaGenify Cloud (ours) | The data is erased with it. | { ok: true, deleted: true } |
| A computer or a phone | We forget the device. Its files stay on it. | { ok: true } |
For a storage we host there is nowhere else for it to be. Read what matters out first — reading is free — because nothing here is recoverable.
const result = await api.storage.remove(id);
if (result.deleted) {
// What was in it no longer exists anywhere.
}result = api.storage.remove(storage_id)
if result.get("deleted"):
pass # What was in it no longer exists anywhere.Removing the default is allowed
It is not refused: the flag is handed to another active storage, in a deliberate order rather than whatever sorts first.
| Preferred heir | Why |
|---|---|
| An IaGenify Cloud storage | It can actually hold bytes for you. |
| Another connected storage | Same, through your own provider. |
| A computer or a phone, last | A save with no target cannot write there at all. |
| The most recent, on a tie | The one most likely to be in use. |
That order is the point: a default pointing at a device is a default that refuses every untargeted save. Read list() afterwards to see who took it.
await api.storage.remove(previousDefault);
const now = (await api.storage.list()).find((s) => s.isDefault);
console.log(`the default is now ${now.label} (${now.type})`);api.storage.remove(previous_default)
now = next(s for s in api.storage.list() if s.is_default)
print(f"the default is now {now.label} ({now.type})")Before you remove a connected storage
- Files saved to it through api.files lose the place they point at — list them first.
- Anything indexed from it stops being findable by meaning.
- An agent that was given it will no longer find it, and will say so rather than guess.
Errors
| Code | Status | When |
|---|---|---|
| — (thrown locally) | — | No id passed. |
| storage_not_found | 404 | No active storage of this account with that id. |
Removing twice answers 404 the second time. Note what is not here: there is no refusal for « this one is the default ». Every storage can be removed, the flag simply moves — otherwise the storage an account is born with could never be removed at all.