api.storage

list()

api.storage.list() → Promise<ConnectedStorage[]>

Every active storage on the account, newest first — each one ready to use, not just described.

GET /api/storagefreereal objects
Using Python?

Switch any code block to Python: the choice applies to every page. Python SDK guide and resource reference.

Unlike most listings, these are not plain records: each one is a ConnectedStorage you can call run() on straight away.

const all = await api.storage.list();

for (const s of all) {
  console.log(`${s.label} · ${s.type}${s.service ? ` (${s.service})` : ""}${s.isDefault ? " · default" : ""}`);
}

// And use one immediately
const base = all.find((s) => s.service === "nosql");
await base.run({ action: "collections" });
storages = api.storage.list()

for s in storages:
    service = f" ({s.service})" if s.service else ""
    print(f"{s.label} · {s.type}{service}{' · default' if s.is_default else ''}")

# And use one immediately
base = next(s for s in storages if s.service == "nosql")
base.run(action="collections")

What comes back

Active storages only — one you removed is not in the list. Newest first, and no limit: an account has a handful of these, not thousands.

Finding the one you mean

const all = await api.storage.list();

const byLabel = all.find((s) => s.label === "Archive");
const computers = all.filter((s) => s.type === "filesystem");
const phones = all.filter((s) => s.type === "phone");
const ours = all.filter((s) => s.provider === "iagenify");
const fallback = all.find((s) => s.isDefault);
storages = api.storage.list()

by_label = next((s for s in storages if s.label == "Archive"), None)
computers = [s for s in storages if s.type == "filesystem"]
phones = [s for s in storages if s.type == "phone"]
ours = [s for s in storages if s.provider == "iagenify"]
fallback = next((s for s in storages if s.is_default), None)
Resolve by label once, then keep the id

Labels are not unique and the account holder can rename one. Looking a storage up by name on every run is a dependency on a display name.

Several computers is normal

Each machine the SDK runs on becomes its own storage. A deployment that loses its session cache on every restart registers a new one each time — so a pile of near-identical computers in this list is a signal worth reading.

const machines = (await api.storage.list()).filter((s) => s.type === "filesystem");

if (machines.length > expected) {
  for (const m of machines) console.log(m.label, m.hostname, m.createdAt);
  // Near-identical entries usually mean the session cache is not persisting.
}
machines = [s for s in api.storage.list() if s.type == "filesystem"]

if len(machines) > expected:
    for m in machines:
        print(m.label, m.machine_id, m.created_at)
    # Near-identical entries usually mean the session cache is not persisting.

Who holds the default

Exactly one carries isDefault. After removing the one that held it, this list is how you see which storage took it over.