API reference
Silos
Serverless PostgreSQL: instances, branches, snapshots and queries.
- Operations
- 21
- Base path
https://os.one.ml/api/v1/silos- Scopes
silos:readsilos:write- API keys
- 21 tested with an API key
- SDK
genesis.call('silos_listInstances', …)· helpers undergenesis.silos- MCP
- 21 tools
Operations
| Operation | Endpoint | API key |
|---|---|---|
| List database instances in the selected Genesis project | GET/instances | Tested with an API key |
| Create a database instance in the selected Genesis project | POST/instances | Tested with an API key |
| Get a database instance with branches, recent operations and 30-day usage | GET/instances/{instance_id} | Tested with an API key |
| Delete a database instance | DELETE/instances/{instance_id} | Tested with an API key |
| Rename a database instance | PATCH/instances/{instance_id} | Tested with an API key |
| Run up to 50 SQL statements in one transaction | POST/instances/{instance_id}/batch | Tested with an API key |
| List the branches of a database instance | GET/instances/{instance_id}/branches | Tested with an API key |
| Create a branch from the current state of another branch | POST/instances/{instance_id}/branches | Tested with an API key |
| Get a branch | GET/instances/{instance_id}/branches/{branch_id} | Tested with an API key |
| Delete a branch | DELETE/instances/{instance_id}/branches/{branch_id} | Tested with an API key |
| Rename a branch | PATCH/instances/{instance_id}/branches/{branch_id} | Tested with an API key |
| Restore a branch from a stored snapshot | POST/instances/{instance_id}/branches/{branch_id}/restore | Tested with an API key |
| Wait for PostgreSQL NOTIFY on one or more channels | POST/instances/{instance_id}/listen | Tested with an API key |
| Get live metrics for a database instance | GET/instances/{instance_id}/metrics | Tested with an API key |
| Run one SQL statement | POST/instances/{instance_id}/query | Tested with an API key |
| Resume a database instance now | POST/instances/{instance_id}/resume | Tested with an API key |
| List stored snapshots of every branch of an instance | GET/instances/{instance_id}/snapshots | Tested with an API key |
| Checkpoint a branch and store the snapshot | POST/instances/{instance_id}/snapshots | Tested with an API key |
| Suspend a database instance (checkpoint, then stop) | POST/instances/{instance_id}/suspend | Tested with an API key |
| List the regions Silos instances are created in | GET/regions | Tested with an API key |
| Silos usage of the selected Genesis project over the last 30 days | GET/usage | Tested with an API key |
Instances
List database instances in the selected Genesis project
GET/v1/silos/instances
Responses
- 200Instance metadata only; no credentials or endpoints.
Response fields
instancesobject[]requiredinstances[].[].idstring (uuid)requiredinstances[].[].namestringrequiredinstances[].[].enginestringrequiredRuntime engine,
postgres-wasm(PostgreSQL compiled to WebAssembly).instances[].[].pgVersionstringrequiredThe PostgreSQL version the runtime engine reports (
SHOW server_version), e.g. 17.5.instances[].[].statestringrequiredinstances[].[].regionstringrequiredinstances[].[].computeSizestringrequiredinstances[].[].storageBytesinteger | null (int64)requiredinstances[].[].defaultBranchIdstring | null (uuid)requiredinstances[].[].createdAtstring (date-time)requiredinstances[].[].updatedAtstring (date-time)requiredinstances[].[].lastActiveAtstring | null (date-time)The last statement that reached the instance.
instances[].[].suspendedAtstring | null (date-time)When it last stopped: suspended by a call, or after the idle window.
instances[].[].suspendAfterIdleSecondsinteger | nullIdle seconds after which a running instance checkpoints and stops (scale to zero); its next statement starts it again.
- 401Verified One account identity required
- 403Silos scope, or a signed Genesis project selection (
genesis select), required - 503Silos unavailable
- 4xx 5xxThe error envelope.
curl "https://os.one.ml/api/v1/silos/instances" \
-H "Authorization: Bearer $GENESIS_API_KEY"import { Genesis } from '@onesi/genesis'
const genesis = new Genesis({ apiKey: process.env.GENESIS_API_KEY })
const result = await genesis.call('silos_listInstances'){
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "silos_listInstances",
"arguments": {}
}
}Create a database instance in the selected Genesis project
POST/v1/silos/instances
Request body application/json
namestringrequiredmin length 1 · max length 63 · pattern
^[a-z][a-z0-9_-]*$
Responses
- 201Created instance metadata
Response fields
instanceobjectrequiredinstance.idstring (uuid)requiredinstance.namestringrequiredinstance.enginestringrequiredRuntime engine,
postgres-wasm(PostgreSQL compiled to WebAssembly).instance.pgVersionstringrequiredThe PostgreSQL version the runtime engine reports (
SHOW server_version), e.g. 17.5.instance.statestringrequiredinstance.regionstringrequiredinstance.computeSizestringrequiredinstance.storageBytesinteger | null (int64)requiredinstance.defaultBranchIdstring | null (uuid)requiredinstance.createdAtstring (date-time)requiredinstance.updatedAtstring (date-time)requiredinstance.lastActiveAtstring | null (date-time)The last statement that reached the instance.
instance.suspendedAtstring | null (date-time)When it last stopped: suspended by a call, or after the idle window.
instance.suspendAfterIdleSecondsinteger | nullIdle seconds after which a running instance checkpoints and stops (scale to zero); its next statement starts it again.
- 400Invalid instance name
- 401Verified One account identity required
- 403Silos scope, or a signed Genesis project selection (
genesis select), required - 409An instance already uses this name in this project. List to reconcile; no automatic replay.
- 503Silos unavailable
- 4xx 5xxThe error envelope.
curl -X POST "https://os.one.ml/api/v1/silos/instances" \
-H "Authorization: Bearer $GENESIS_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"name": "string"
}'import { Genesis } from '@onesi/genesis'
const genesis = new Genesis({ apiKey: process.env.GENESIS_API_KEY })
const result = await genesis.call('silos_createInstance', {
body: {
name: 'string',
},
}){
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "silos_createInstance",
"arguments": {
"body": {
"name": "string"
}
}
}
}Get a database instance with branches, recent operations and 30-day usage
GET/v1/silos/instances/{instance_id}
Parameters
instance_idpath · string (uuid)required
Responses
- 200Instance detail; no credentials or endpoints.
Response fields
instanceobjectrequiredinstance.idstring (uuid)requiredinstance.namestringrequiredinstance.enginestringrequiredRuntime engine,
postgres-wasm(PostgreSQL compiled to WebAssembly).instance.pgVersionstringrequiredThe PostgreSQL version the runtime engine reports (
SHOW server_version), e.g. 17.5.instance.statestringrequiredinstance.regionstringrequiredinstance.computeSizestringrequiredinstance.storageBytesinteger | null (int64)requiredinstance.defaultBranchIdstring | null (uuid)requiredinstance.createdAtstring (date-time)requiredinstance.updatedAtstring (date-time)requiredinstance.lastActiveAtstring | null (date-time)The last statement that reached the instance.
instance.suspendedAtstring | null (date-time)When it last stopped: suspended by a call, or after the idle window.
instance.suspendAfterIdleSecondsinteger | nullIdle seconds after which a running instance checkpoints and stops (scale to zero); its next statement starts it again.
branchesobject[]requiredbranches[].[].idstring (uuid)requiredbranches[].[].namestringrequiredbranches[].[].isDefaultboolean | nullrequiredbranches[].[].statestringrequiredbranches[].[].storageSizeBytesinteger | null (int64)requiredbranches[].[].createdAtstring | null (date-time)requiredoperationsobject[]requiredoperations[].[].idstring (uuid)requiredoperations[].[].kindstringrequiredoperations[].[].statusstringrequiredoperations[].[].createdAtstring (date-time)requiredoperations[].[].completedAtstring | null (date-time)requiredoperations[].[].targetstring | nullA snapshot id, or timestamp:<requested time>
operations[].[].initiatedBystring | nullThe verified principal that asked for it
usageobjectrequiredusage.windowDaysintegerrequiredusage.queriesinteger (int64)requiredusage.computeMsinteger (int64)requiredusage.storageBytesinteger | null (int64)requiredcallerobjectWho Silos verified this call as from the gateway signature, checked on every read and write.
caller.organizationIdstringcaller.projectIdstringcaller.environmentstringcaller.principalstringcaller.verifiedBy"gateway-signature"
- 401Verified One account identity required
- 403Silos scope, or a signed Genesis project selection (
genesis select), required - 404Instance absent or outside the selected Genesis project
- 503Silos unavailable
- 4xx 5xxThe error envelope.
curl "https://os.one.ml/api/v1/silos/instances/$INSTANCE_ID" \
-H "Authorization: Bearer $GENESIS_API_KEY"import { Genesis } from '@onesi/genesis'
const genesis = new Genesis({ apiKey: process.env.GENESIS_API_KEY })
const result = await genesis.call('silos_getInstance', {
instance_id: '<instance_id>',
}){
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "silos_getInstance",
"arguments": {
"instance_id": "<instance_id>"
}
}
}Delete a database instance
DELETE/v1/silos/instances/{instance_id}
Removes the instance from the selected project and stops it. Its name is free again at once.
Parameters
instance_idpath · string (uuid)required
Responses
- 204Deleted
- 401Verified One account identity required
- 403Silos scope, or a signed Genesis project selection (
genesis select), required - 404Instance absent or outside the selected Genesis project
- 503Silos unavailable
- 4xx 5xxThe error envelope.
curl -X DELETE "https://os.one.ml/api/v1/silos/instances/$INSTANCE_ID" \
-H "Authorization: Bearer $GENESIS_API_KEY"import { Genesis } from '@onesi/genesis'
const genesis = new Genesis({ apiKey: process.env.GENESIS_API_KEY })
const result = await genesis.call('silos_deleteInstance', {
instance_id: '<instance_id>',
}){
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "silos_deleteInstance",
"arguments": {
"instance_id": "<instance_id>"
}
}
}Rename a database instance
PATCH/v1/silos/instances/{instance_id}
Parameters
instance_idpath · string (uuid)required
Request body application/json
namestringrequiredmin length 1 · max length 63 · pattern
^[a-z][a-z0-9_-]*$
Responses
- 200Renamed instance
Response fields
instanceobjectrequiredinstance.idstring (uuid)requiredinstance.namestringrequiredinstance.enginestringrequiredRuntime engine,
postgres-wasm(PostgreSQL compiled to WebAssembly).instance.pgVersionstringrequiredThe PostgreSQL version the runtime engine reports (
SHOW server_version), e.g. 17.5.instance.statestringrequiredinstance.regionstringrequiredinstance.computeSizestringrequiredinstance.storageBytesinteger | null (int64)requiredinstance.defaultBranchIdstring | null (uuid)requiredinstance.createdAtstring (date-time)requiredinstance.updatedAtstring (date-time)requiredinstance.lastActiveAtstring | null (date-time)The last statement that reached the instance.
instance.suspendedAtstring | null (date-time)When it last stopped: suspended by a call, or after the idle window.
instance.suspendAfterIdleSecondsinteger | nullIdle seconds after which a running instance checkpoints and stops (scale to zero); its next statement starts it again.
- 400Invalid instance name
- 401Verified One account identity required
- 403Silos scope, or a signed Genesis project selection (
genesis select), required - 404Instance absent or outside the selected Genesis project
- 409An instance already uses this name in this project
- 503Silos unavailable
- 4xx 5xxThe error envelope.
curl -X PATCH "https://os.one.ml/api/v1/silos/instances/$INSTANCE_ID" \
-H "Authorization: Bearer $GENESIS_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"name": "string"
}'import { Genesis } from '@onesi/genesis'
const genesis = new Genesis({ apiKey: process.env.GENESIS_API_KEY })
const result = await genesis.call('silos_updateInstance', {
instance_id: '<instance_id>',
body: {
name: 'string',
},
}){
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "silos_updateInstance",
"arguments": {
"instance_id": "<instance_id>",
"body": {
"name": "string"
}
}
}
}Batch
Run up to 50 SQL statements in one transaction
POST/v1/silos/instances/{instance_id}/batch
All statements commit together or none do. Runs once and is never replayed. Each statement is metered as one query. Up to 64 KiB.
Parameters
instance_idpath · string (uuid)required
Request body application/json
statementsobject[]requiredstatements[].[].sqlstringrequiredmin length 1
statements[].[].paramsany[]Positional parameters for $1, $2, …
branchIdstring (uuid)A branch of this instance; the default branch when absent.
idempotencyKeystringRuns the statement(s) at most once on this instance for this key (kept 7 days). A repeat answers 409 QUERY_ALREADY_RUN with the first run's receipt and runs nothing. The Idempotency-Key header is accepted too. pattern
^[A-Za-z0-9_.:-]{1,128}$
Responses
- 200Committed results, one per statement
Response fields
resultsobject[]results[].[].rowsobject[]results[].[].rowCountintegerresults[].[].affectedRowsinteger | nullresults[].[].commandstring | nullstatementCountintegerdurationMsnumbercommittedbooleanqueryIdstring (uuid)Receipt id of this run; its usage events carry the same id.
- 400Empty statement, an invalid idempotency key, or a SQL error the statement caused:
error.codeSQL_ERROR with Postgres's message, plussqlstate,severityand, when Postgres gives them,position,detail,hint(andstatementIndexin a batch) - 401Verified One account identity required
- 403Silos scope, or a signed Genesis project selection (
genesis select), required - 404Instance or branch absent, or outside the selected Genesis project
- 409QUERY_ALREADY_RUN: this idempotency key already ran on this instance;
receiptholds the first run (queryId, status completed or unknown, times). Nothing ran again. - 502The runtime is unavailable or failed for a server reason
- 503Silos unavailable
- 4xx 5xxThe error envelope.
curl -X POST "https://os.one.ml/api/v1/silos/instances/$INSTANCE_ID/batch" \
-H "Authorization: Bearer $GENESIS_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"statements": [
{
"sql": "string"
}
]
}'import { Genesis } from '@onesi/genesis'
const genesis = new Genesis({ apiKey: process.env.GENESIS_API_KEY })
const result = await genesis.call('silos_queryInstanceBatch', {
instance_id: '<instance_id>',
body: {
statements: [
{
sql: 'string',
},
],
},
}){
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "silos_queryInstanceBatch",
"arguments": {
"instance_id": "<instance_id>",
"body": {
"statements": [
{
"sql": "string"
}
]
}
}
}
}Branches
List the branches of a database instance
GET/v1/silos/instances/{instance_id}/branches
Parameters
instance_idpath · string (uuid)required
Responses
- 200Branches, default first
Response fields
branchesobject[]requiredbranches[].[].idstring (uuid)requiredbranches[].[].namestringrequiredbranches[].[].isDefaultbooleanrequiredbranches[].[].parentBranchIdstring | null (uuid)requiredbranches[].[].statestringrequiredbranches[].[].createdAtstring | null (date-time)requiredbranches[].[].updatedAtstring | null (date-time)required
- 401Verified One account identity required
- 403Silos scope, or a signed Genesis project selection (
genesis select), required - 404Instance or branch absent, or outside the selected Genesis project
- 503Silos unavailable
- 4xx 5xxThe error envelope.
curl "https://os.one.ml/api/v1/silos/instances/$INSTANCE_ID/branches" \
-H "Authorization: Bearer $GENESIS_API_KEY"import { Genesis } from '@onesi/genesis'
const genesis = new Genesis({ apiKey: process.env.GENESIS_API_KEY })
const result = await genesis.call('silos_listInstanceBranches', {
instance_id: '<instance_id>',
}){
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "silos_listInstanceBranches",
"arguments": {
"instance_id": "<instance_id>"
}
}
}Create a branch from the current state of another branch
POST/v1/silos/instances/{instance_id}/branches
Copies the parent's latest checkpoint; the branch then changes on its own. Up to 25 live branches per instance.
Parameters
instance_idpath · string (uuid)required
Request body application/json
namestringrequiredmin length 1 · max length 63 · pattern
^[a-z][a-z0-9_-]*$parentBranchIdstring (uuid)Defaults to the default branch.
Responses
- 201Created branch
Response fields
branchobjectrequiredbranch.idstring (uuid)requiredbranch.namestringrequiredbranch.isDefaultbooleanrequiredbranch.parentBranchIdstring | null (uuid)requiredbranch.statestringrequiredbranch.createdAtstring | null (date-time)requiredbranch.updatedAtstring | null (date-time)required
- 400Invalid branch name
- 401Verified One account identity required
- 403Silos scope, or a signed Genesis project selection (
genesis select), required - 404Instance or branch absent, or outside the selected Genesis project
- 409The name is taken in this instance, or the instance already has 25 branches
- 502Silos runtime unavailable; no branch was created
- 503Silos unavailable
- 4xx 5xxThe error envelope.
curl -X POST "https://os.one.ml/api/v1/silos/instances/$INSTANCE_ID/branches" \
-H "Authorization: Bearer $GENESIS_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"name": "string"
}'import { Genesis } from '@onesi/genesis'
const genesis = new Genesis({ apiKey: process.env.GENESIS_API_KEY })
const result = await genesis.call('silos_createInstanceBranch', {
instance_id: '<instance_id>',
body: {
name: 'string',
},
}){
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "silos_createInstanceBranch",
"arguments": {
"instance_id": "<instance_id>",
"body": {
"name": "string"
}
}
}
}Get a branch
GET/v1/silos/instances/{instance_id}/branches/{branch_id}
Parameters
instance_idpath · string (uuid)requiredbranch_idpath · string (uuid)required
Responses
- 200Branch
Response fields
branchobjectrequiredbranch.idstring (uuid)requiredbranch.namestringrequiredbranch.isDefaultbooleanrequiredbranch.parentBranchIdstring | null (uuid)requiredbranch.statestringrequiredbranch.createdAtstring | null (date-time)requiredbranch.updatedAtstring | null (date-time)required
- 401Verified One account identity required
- 403Silos scope, or a signed Genesis project selection (
genesis select), required - 404Instance or branch absent, or outside the selected Genesis project
- 503Silos unavailable
- 4xx 5xxThe error envelope.
curl "https://os.one.ml/api/v1/silos/instances/$INSTANCE_ID/branches/$BRANCH_ID" \
-H "Authorization: Bearer $GENESIS_API_KEY"import { Genesis } from '@onesi/genesis'
const genesis = new Genesis({ apiKey: process.env.GENESIS_API_KEY })
const result = await genesis.call('silos_getInstanceBranch', {
instance_id: '<instance_id>',
branch_id: '<branch_id>',
}){
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "silos_getInstanceBranch",
"arguments": {
"instance_id": "<instance_id>",
"branch_id": "<branch_id>"
}
}
}Delete a branch
DELETE/v1/silos/instances/{instance_id}/branches/{branch_id}
The default branch cannot be deleted; delete the instance instead.
Parameters
instance_idpath · string (uuid)requiredbranch_idpath · string (uuid)required
Responses
- 204Deleted
- 401Verified One account identity required
- 403Silos scope, or a signed Genesis project selection (
genesis select), required - 404Instance or branch absent, or outside the selected Genesis project
- 409The default branch cannot be deleted
- 503Silos unavailable
- 4xx 5xxThe error envelope.
curl -X DELETE "https://os.one.ml/api/v1/silos/instances/$INSTANCE_ID/branches/$BRANCH_ID" \
-H "Authorization: Bearer $GENESIS_API_KEY"import { Genesis } from '@onesi/genesis'
const genesis = new Genesis({ apiKey: process.env.GENESIS_API_KEY })
const result = await genesis.call('silos_deleteInstanceBranch', {
instance_id: '<instance_id>',
branch_id: '<branch_id>',
}){
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "silos_deleteInstanceBranch",
"arguments": {
"instance_id": "<instance_id>",
"branch_id": "<branch_id>"
}
}
}Rename a branch
PATCH/v1/silos/instances/{instance_id}/branches/{branch_id}
Parameters
instance_idpath · string (uuid)requiredbranch_idpath · string (uuid)required
Request body application/json
namestringrequiredmin length 1 · max length 63 · pattern
^[a-z][a-z0-9_-]*$
Responses
- 200Renamed branch
Response fields
branchobjectrequiredbranch.idstring (uuid)requiredbranch.namestringrequiredbranch.isDefaultbooleanrequiredbranch.parentBranchIdstring | null (uuid)requiredbranch.statestringrequiredbranch.createdAtstring | null (date-time)requiredbranch.updatedAtstring | null (date-time)required
- 400Invalid branch name
- 401Verified One account identity required
- 403Silos scope, or a signed Genesis project selection (
genesis select), required - 404Instance or branch absent, or outside the selected Genesis project
- 409The name is taken in this instance
- 503Silos unavailable
- 4xx 5xxThe error envelope.
curl -X PATCH "https://os.one.ml/api/v1/silos/instances/$INSTANCE_ID/branches/$BRANCH_ID" \
-H "Authorization: Bearer $GENESIS_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"name": "string"
}'import { Genesis } from '@onesi/genesis'
const genesis = new Genesis({ apiKey: process.env.GENESIS_API_KEY })
const result = await genesis.call('silos_updateInstanceBranch', {
instance_id: '<instance_id>',
branch_id: '<branch_id>',
body: {
name: 'string',
},
}){
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "silos_updateInstanceBranch",
"arguments": {
"instance_id": "<instance_id>",
"branch_id": "<branch_id>",
"body": {
"name": "string"
}
}
}
}Restore a branch from a stored snapshot
POST/v1/silos/instances/{instance_id}/branches/{branch_id}/restore
Replaces the branch's data with the snapshot. The instance stops without a checkpoint and starts from the snapshot on its next statement. The restore is recorded in the instance's operations.
Parameters
instance_idpath · string (uuid)requiredbranch_idpath · string (uuid)required
Request body application/json
snapshotIdstringA stored snapshot. Give this or timestamp. pattern
^[0-9]{1,20}$sourceBranchIdstring (uuid)The branch the snapshot or history is read from; defaults to the restored branch.
timestampstring (date-time)Point-in-time restore: the branch returns to its newest saved state at or before this time (checkpoints are kept at least once a minute while the branch runs, and on every stop, for 7 days). Give this or snapshotId.
Responses
- 200Completed restore
Response fields
operationobjectrequiredoperation.idstring (uuid)operation.kindstringoperation.statusstringoperation.branchIdstring (uuid)operation.snapshotIdstringoperation.timestampstring (date-time)operation.restoredTostring | null (date-time)When the restored state was saved
operation.sourceBranchIdstring (uuid)operation.initiatedBystringThe verified principal that asked
- 400Neither or both of snapshotId and timestamp, or an invalid or future timestamp
- 401Verified One account identity required
- 403Silos scope, or a signed Genesis project selection (
genesis select), required - 404Instance, branch or snapshot absent, no saved state at or before the timestamp, or outside the selected Genesis project
- 409Another start, checkpoint, stop or restore of the instance ran past the 45 s wait; try again
- 502Silos runtime unavailable
- 503Silos unavailable
- 4xx 5xxThe error envelope.
curl -X POST "https://os.one.ml/api/v1/silos/instances/$INSTANCE_ID/branches/$BRANCH_ID/restore" \
-H "Authorization: Bearer $GENESIS_API_KEY" \
-H "Content-Type: application/json" \
-d '"string"'import { Genesis } from '@onesi/genesis'
const genesis = new Genesis({ apiKey: process.env.GENESIS_API_KEY })
const result = await genesis.call('silos_restoreInstanceBranch', {
instance_id: '<instance_id>',
branch_id: '<branch_id>',
body: 'string',
}){
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "silos_restoreInstanceBranch",
"arguments": {
"instance_id": "<instance_id>",
"branch_id": "<branch_id>",
"body": "string"
}
}
}Listen
Wait for PostgreSQL NOTIFY on one or more channels
POST/v1/silos/instances/{instance_id}/listen
Waits up to waitMs (default 10000, at most 15000) and returns as soon as a notification arrives, or an empty list. Only notifications sent while the call waits are returned; call again to keep listening.
Parameters
instance_idpath · string (uuid)required
Request body application/json
channelsstring[]requiredwaitMsintegermin 0 · max 15000
branchIdstring (uuid)A branch of this instance; the default branch when absent.
Responses
- 200Notifications received while waiting
Response fields
notificationsobject[]requirednotifications[].[].channelstringrequirednotifications[].[].payloadstringrequirednotifications[].[].receivedAtstring (date-time)required
- 400No channels, an invalid channel name, or waitMs above 15000
- 401Verified One account identity required
- 403Silos scope, or a signed Genesis project selection (
genesis select), required - 404Instance or branch absent, or outside the selected Genesis project
- 502Silos runtime unavailable
- 503Silos unavailable
- 4xx 5xxThe error envelope.
curl -X POST "https://os.one.ml/api/v1/silos/instances/$INSTANCE_ID/listen" \
-H "Authorization: Bearer $GENESIS_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"channels": [
"string"
]
}'import { Genesis } from '@onesi/genesis'
const genesis = new Genesis({ apiKey: process.env.GENESIS_API_KEY })
const result = await genesis.call('silos_listenInstance', {
instance_id: '<instance_id>',
body: {
channels: [
'string',
],
},
}){
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "silos_listenInstance",
"arguments": {
"instance_id": "<instance_id>",
"body": {
"channels": [
"string"
]
}
}
}
}Metrics
Get live metrics for a database instance
GET/v1/silos/instances/{instance_id}/metrics
Parameters
instance_idpath · string (uuid)required
Responses
- 200Instance metrics
Response fields
metricsobjectrequiredmetrics.instanceIdstring (uuid)requiredmetrics.runningbooleanrequiredmetrics.state"hot" | "cold"requiredmetrics.storageBytesinteger | null (int64)requiredmetrics.lastActiveAtstring | null (date-time)requiredmetrics.suspendedAtstring | null (date-time)requiredmetrics.runtimeobject | nullrequiredLive counters while the instance runs; null when it is suspended.
metrics.runtime.queryCountintegermetrics.runtime.totalQueryTimeMsnumbermetrics.runtime.avgQueryTimeMsnumbermetrics.runtime.memoryUsedBytesintegermetrics.runtime.uptimeMsintegermetrics.runtime.lastQueryAtstring | null
- 401Verified One account identity required
- 403Silos scope, or a signed Genesis project selection (
genesis select), required - 404Instance absent or outside the selected Genesis project
- 502Silos runtime unavailable
- 503Silos unavailable
- 4xx 5xxThe error envelope.
curl "https://os.one.ml/api/v1/silos/instances/$INSTANCE_ID/metrics" \
-H "Authorization: Bearer $GENESIS_API_KEY"import { Genesis } from '@onesi/genesis'
const genesis = new Genesis({ apiKey: process.env.GENESIS_API_KEY })
const result = await genesis.call('silos_getInstanceMetrics', {
instance_id: '<instance_id>',
}){
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "silos_getInstanceMetrics",
"arguments": {
"instance_id": "<instance_id>"
}
}
}Query
Run one SQL statement
POST/v1/silos/instances/{instance_id}/query
Runs once and is never replayed. Each success is metered as one query plus its compute time. Up to 64 KiB.
Parameters
instance_idpath · string (uuid)required
Request body application/json
sqlstringrequiredmin length 1
paramsany[]Positional parameters for $1, $2, …
branchIdstring (uuid)A branch of this instance; the default branch when absent.
idempotencyKeystringRuns the statement(s) at most once on this instance for this key (kept 7 days). A repeat answers 409 QUERY_ALREADY_RUN with the first run's receipt and runs nothing. The Idempotency-Key header is accepted too. pattern
^[A-Za-z0-9_.:-]{1,128}$
Responses
- 200Statement result
Response fields
rowsobject[]fieldsobject[]fields[].[].namestringfields[].[].dataTypeIDintegerrowCountintegeraffectedRowsinteger | nullcommandstring | nulldurationMsnumberqueryIdstring (uuid)Receipt id of this run; its usage events carry the same id.
- 400Empty statement, an invalid idempotency key, or a SQL error the statement caused:
error.codeSQL_ERROR with Postgres's message, plussqlstate,severityand, when Postgres gives them,position,detail,hint(andstatementIndexin a batch) - 401Verified One account identity required
- 403Silos scope, or a signed Genesis project selection (
genesis select), required - 404Instance or branch absent, or outside the selected Genesis project
- 409QUERY_ALREADY_RUN: this idempotency key already ran on this instance;
receiptholds the first run (queryId, status completed or unknown, times). Nothing ran again. - 502The runtime is unavailable or failed for a server reason
- 503Silos unavailable
- 4xx 5xxThe error envelope.
curl -X POST "https://os.one.ml/api/v1/silos/instances/$INSTANCE_ID/query" \
-H "Authorization: Bearer $GENESIS_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"sql": "string"
}'import { Genesis } from '@onesi/genesis'
const genesis = new Genesis({ apiKey: process.env.GENESIS_API_KEY })
const result = await genesis.call('silos_queryInstance', {
instance_id: '<instance_id>',
body: {
sql: 'string',
},
}){
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "silos_queryInstance",
"arguments": {
"instance_id": "<instance_id>",
"body": {
"sql": "string"
}
}
}
}Resume
Resume a database instance now
POST/v1/silos/instances/{instance_id}/resume
Starts the instance instead of waiting for its first statement. A query also starts a suspended instance on its own.
Parameters
instance_idpath · string (uuid)required
Responses
- 200Running instance (state
hot)Response fields
instanceobjectrequiredinstance.idstring (uuid)requiredinstance.namestringrequiredinstance.enginestringrequiredRuntime engine,
postgres-wasm(PostgreSQL compiled to WebAssembly).instance.pgVersionstringrequiredThe PostgreSQL version the runtime engine reports (
SHOW server_version), e.g. 17.5.instance.statestringrequiredinstance.regionstringrequiredinstance.computeSizestringrequiredinstance.storageBytesinteger | null (int64)requiredinstance.defaultBranchIdstring | null (uuid)requiredinstance.createdAtstring (date-time)requiredinstance.updatedAtstring (date-time)requiredinstance.lastActiveAtstring | null (date-time)The last statement that reached the instance.
instance.suspendedAtstring | null (date-time)When it last stopped: suspended by a call, or after the idle window.
instance.suspendAfterIdleSecondsinteger | nullIdle seconds after which a running instance checkpoints and stops (scale to zero); its next statement starts it again.
- 401Verified One account identity required
- 403Silos scope, or a signed Genesis project selection (
genesis select), required - 404Instance absent or outside the selected Genesis project
- 502Silos runtime unavailable
- 503Silos unavailable
- 4xx 5xxThe error envelope.
curl -X POST "https://os.one.ml/api/v1/silos/instances/$INSTANCE_ID/resume" \
-H "Authorization: Bearer $GENESIS_API_KEY"import { Genesis } from '@onesi/genesis'
const genesis = new Genesis({ apiKey: process.env.GENESIS_API_KEY })
const result = await genesis.call('silos_resumeInstance', {
instance_id: '<instance_id>',
}){
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "silos_resumeInstance",
"arguments": {
"instance_id": "<instance_id>"
}
}
}Snapshots
List stored snapshots of every branch of an instance
GET/v1/silos/instances/{instance_id}/snapshots
Parameters
instance_idpath · string (uuid)required
Responses
- 200Snapshots, newest first per branch
Response fields
snapshotsobject[]requiredsnapshots[].[].idstringrequiredSnapshot id (its creation time in milliseconds) pattern
^[0-9]{1,20}$snapshots[].[].branchIdstring (uuid)requiredsnapshots[].[].sizeBytesinteger | null (int64)requiredsnapshots[].[].createdAtstring | null (date-time)required
- 401Verified One account identity required
- 403Silos scope, or a signed Genesis project selection (
genesis select), required - 404Instance or branch absent, or outside the selected Genesis project
- 502Silos runtime unavailable
- 503Silos unavailable
- 4xx 5xxThe error envelope.
curl "https://os.one.ml/api/v1/silos/instances/$INSTANCE_ID/snapshots" \
-H "Authorization: Bearer $GENESIS_API_KEY"import { Genesis } from '@onesi/genesis'
const genesis = new Genesis({ apiKey: process.env.GENESIS_API_KEY })
const result = await genesis.call('silos_listInstanceSnapshots', {
instance_id: '<instance_id>',
}){
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "silos_listInstanceSnapshots",
"arguments": {
"instance_id": "<instance_id>"
}
}
}Checkpoint a branch and store the snapshot
POST/v1/silos/instances/{instance_id}/snapshots
Starts the branch first if it is not running.
Parameters
instance_idpath · string (uuid)required
Request body application/json
branchIdstring (uuid)Defaults to the default branch.
Responses
- 201Stored snapshot
Response fields
snapshotobjectrequiredsnapshot.idstringrequiredSnapshot id (its creation time in milliseconds) pattern
^[0-9]{1,20}$snapshot.branchIdstring (uuid)requiredsnapshot.sizeBytesinteger | null (int64)requiredsnapshot.createdAtstring | null (date-time)required
- 401Verified One account identity required
- 403Silos scope, or a signed Genesis project selection (
genesis select), required - 404Instance or branch absent, or outside the selected Genesis project
- 409Another branch of this instance is running; try again
- 502Silos runtime unavailable
- 503Silos unavailable
- 4xx 5xxThe error envelope.
curl -X POST "https://os.one.ml/api/v1/silos/instances/$INSTANCE_ID/snapshots" \
-H "Authorization: Bearer $GENESIS_API_KEY" \
-H "Content-Type: application/json" \
-d '{}'import { Genesis } from '@onesi/genesis'
const genesis = new Genesis({ apiKey: process.env.GENESIS_API_KEY })
const result = await genesis.call('silos_createInstanceSnapshot', {
instance_id: '<instance_id>',
body: {},
}){
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "silos_createInstanceSnapshot",
"arguments": {
"instance_id": "<instance_id>",
"body": {}
}
}
}Suspend
Suspend a database instance (checkpoint, then stop)
POST/v1/silos/instances/{instance_id}/suspend
Parameters
instance_idpath · string (uuid)required
Responses
- 200Suspended instance (state
cold)Response fields
instanceobjectrequiredinstance.idstring (uuid)requiredinstance.namestringrequiredinstance.enginestringrequiredRuntime engine,
postgres-wasm(PostgreSQL compiled to WebAssembly).instance.pgVersionstringrequiredThe PostgreSQL version the runtime engine reports (
SHOW server_version), e.g. 17.5.instance.statestringrequiredinstance.regionstringrequiredinstance.computeSizestringrequiredinstance.storageBytesinteger | null (int64)requiredinstance.defaultBranchIdstring | null (uuid)requiredinstance.createdAtstring (date-time)requiredinstance.updatedAtstring (date-time)requiredinstance.lastActiveAtstring | null (date-time)The last statement that reached the instance.
instance.suspendedAtstring | null (date-time)When it last stopped: suspended by a call, or after the idle window.
instance.suspendAfterIdleSecondsinteger | nullIdle seconds after which a running instance checkpoints and stops (scale to zero); its next statement starts it again.
- 401Verified One account identity required
- 403Silos scope, or a signed Genesis project selection (
genesis select), required - 404Instance absent or outside the selected Genesis project
- 502Silos runtime unavailable
- 503Silos unavailable
- 4xx 5xxThe error envelope.
curl -X POST "https://os.one.ml/api/v1/silos/instances/$INSTANCE_ID/suspend" \
-H "Authorization: Bearer $GENESIS_API_KEY"import { Genesis } from '@onesi/genesis'
const genesis = new Genesis({ apiKey: process.env.GENESIS_API_KEY })
const result = await genesis.call('silos_suspendInstance', {
instance_id: '<instance_id>',
}){
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "silos_suspendInstance",
"arguments": {
"instance_id": "<instance_id>"
}
}
}Regions
List the regions Silos instances are created in
GET/v1/silos/regions
Responses
- 200Regions
Response fields
regionsobject[]requiredregions[].[].idstringrequiredregions[].[].providerstringrequiredregions[].[].locationstringrequiredregions[].[].defaultbooleanrequired
- 401Verified One account identity required
- 403Silos scope required
- 503Silos unavailable
- 4xx 5xxThe error envelope.
curl "https://os.one.ml/api/v1/silos/regions" \
-H "Authorization: Bearer $GENESIS_API_KEY"import { Genesis } from '@onesi/genesis'
const genesis = new Genesis({ apiKey: process.env.GENESIS_API_KEY })
const result = await genesis.call('silos_listRegions'){
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "silos_listRegions",
"arguments": {}
}
}Usage
Silos usage of the selected Genesis project over the last 30 days
GET/v1/silos/usage
Billable Silos meters (queries and compute time) per instance and in total, plus stored size. Deleted instances keep the usage they recorded.
Responses
- 200Project usage
Response fields
usageobjectrequiredusage.windowDaysintegerrequiredusage.queriesinteger (int64)requiredusage.computeMsinteger (int64)requiredusage.storageBytesinteger (int64)requiredusage.instancesobject[]requiredusage.instances[].[].instanceIdstring (uuid)requiredusage.instances[].[].namestringrequiredusage.instances[].[].deletedbooleanrequiredusage.instances[].[].queriesinteger (int64)requiredusage.instances[].[].computeMsinteger (int64)requiredusage.instances[].[].storageBytesinteger | null (int64)requiredcallerobjectWho Silos verified this call as from the gateway signature, checked on every read and write.
caller.organizationIdstringcaller.projectIdstringcaller.environmentstringcaller.principalstringcaller.verifiedBy"gateway-signature"
- 401Verified One account identity required
- 403Silos scope, or a signed Genesis project selection (
genesis select), required - 503Silos unavailable
- 4xx 5xxThe error envelope.
curl "https://os.one.ml/api/v1/silos/usage" \
-H "Authorization: Bearer $GENESIS_API_KEY"import { Genesis } from '@onesi/genesis'
const genesis = new Genesis({ apiKey: process.env.GENESIS_API_KEY })
const result = await genesis.call('silos_getUsage'){
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "silos_getUsage",
"arguments": {}
}
}L1fe AI Inc. · Built from Genesis 0.3.3 and the live gateway on 2026-10-25. Support