api.storage

create()

api.storage.create({ service, label }) → Promise<ConnectedStorage>

Opens an IaGenify Cloud storage. No host, no credentials, nothing to rotate — and it is read with the same calls as one you connected.

POST /api/cloud/storages201no credentials to supply
Using Python?

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

Parameters

servicestringrequired

nosql · sql · object. Missing → the SDK throws.

labelstring

The display name. The service's own name by default.

The three services

serviceIsRead and written with
nosqlA document database — collections and documents.run({ action: "find" | "insert" | "aggregate" … })
sqlA relational database — tables and SQL.run({ action: "sql" })
objectObject storage — keys and bytes.run({ action: "objects" | "put" | "remove" })
const base = await api.storage.create({ service: "nosql", label: "App data" });

base.id;
base.label;      // "App data"
base.type;       // "database"
base.service;    // "nosql"
base.provider;   // "iagenify"

await base.run({ action: "insert", collection: "events", documents: JSON.stringify([{ at: Date.now() }]) });
await base.run({ action: "count", collection: "events" });
import json, time

base = api.storage.create(service="nosql", label="App data")

base.id
base.label      # "App data"
base.type       # "database"
base.service    # "nosql"
base.provider   # "iagenify"

base.run(action="insert", collection="events", documents=json.dumps([{"at": int(time.time() * 1000)}]))
base.run(action="count", collection="events")

Why this rather than connecting your own

IaGenify CloudConnected
Credentialsnone to holdyours, to supply and rotate
Setupone callan account somewhere else
Spacewhat your plan gives, extendablewhatever you pay for there
Portabilityoursyours, and it stays yours

The calls are identical either way, so this is not a decision you are locked into — the code that reads one reads the other.

How many, and how much

The plan decides how many storages per service and how much space each one gets. Both are readable before you hit them with api.cloud.usage(), which is better than discovering a limit through a refusal.

const usage = await api.cloud.usage();
// per service: what is used, what the plan includes, what is available

const base = await api.storage.create({ service: "nosql", label: "App data" });
usage = api.cloud.usage()
# per service: what is used, what the plan includes, what is available

base = api.storage.create(service="nosql", label="App data")
A write past the quota is refused, a read is not

quota_exceeded stops you adding; reading and deleting keep working, so you can always get your data out and make room. That asymmetry is deliberate.

Errors

CodeStatusWhen
invalid_service400Not one of the three — thrown by the SDK when absent.
cloud_storage_limit403The plan's count for that service is reached.
cloud_service_unavailable503That service cannot be served right now.