Swift: Full API (api.*)
Every Sovaria API operation as a typed call, grouped by module, with the Swift SDK.
Every Sovaria API operation is also available as api.<module>.<method>(…), generated from the same API specification as the other SDKs. Use it for anything the client areas don't cover yet. api.call(method, path, …) reaches any path with the client's session, scope headers and retries. Each operation links to its HTTP reference entry, which lists the request fields, the response and errors.
api.call
Any endpoint by method and path, with the client's auth, scope headers and retries.
public func call(_ method: String, _ path: String, body: Any? = nil, query: [String: Any?]? = nil, auth: Bool = true) async throws -> Any?#api.ai
api.ai.gatewayOverview
Model-gateway routes, the models they may use, plan limits and cache size.
public func gatewayOverview() async throws -> Any?api.ai.saveGatewayRoute
Create or change a route: models in order (fallbacks), retry_on, cache {enabled, ttl_s}, access, daily_requests_per_user.
public func saveGatewayRoute(name: String, body: [String: Any]) async throws -> Any?api.ai.deleteGatewayRoute
Delete a route (refused while an agent uses it).
public func deleteGatewayRoute(name: String) async throws -> Any?api.ai.gatewayComplete
One completion on a route: the first model that answers (fallbacks), or the cache.
public func gatewayComplete(route: String, messages: Any, system: Any? = nil, maxTokens: Any? = nil, cache: Any? = nil) async throws -> Any?api.ai.gatewayUsage
Requests, errors, fallbacks, cache hits, tokens and latency per model and route.
public func gatewayUsage(days: Any? = nil) async throws -> Any?api.ai.clearGatewayCache
Drop every cached model response of the project.
public func clearGatewayCache() async throws -> Any?api.ai.listAgentVersions
An agent's published version and kept versions.
public func listAgentVersions(agentId: String) async throws -> Any?api.ai.publishAgentVersion
Publish the agent's draft as its next version.
public func publishAgentVersion(agentId: String, note: Any? = nil) async throws -> Any?api.ai.getAgentVersion
One version's definition (secrets hidden).
public func getAgentVersion(agentId: String, version: String) async throws -> Any?api.ai.compareAgentVersions
What changed between two versions (or a version and the draft).
public func compareAgentVersions(agentId: String, a: Any, b: Any? = nil) async throws -> Any?api.ai.rollbackAgentVersion
Republish an older version as a new version and make it the draft.
public func rollbackAgentVersion(agentId: String, version: String, note: Any? = nil) async throws -> Any?#api.attestation
api.attestation.getConfig
App attestation settings, credentials (metadata only), debug tokens and the last 7 days.
public func getConfig(projectId: String? = nil) async throws -> Any?api.attestation.updateConfig
Set mode (off | monitor | enforce), tokenTtlSeconds, providers, playIntegrity, appAttest.
public func updateConfig(projectId: String? = nil, body: [String: Any]) async throws -> Any?api.attestation.setGoogleCredentials
Google service account for Play Integrity (encrypted, write-only).
public func setGoogleCredentials(projectId: String? = nil, serviceAccount: Any) async throws -> Any?api.attestation.setAppleCredentials
Apple key with DeviceCheck enabled (encrypted, write-only).
public func setAppleCredentials(projectId: String? = nil, p8: Any, keyId: Any, teamId: Any) async throws -> Any?api.attestation.deleteCredentials
Remove the google or apple attestation credentials.
public func deleteCredentials(projectId: String? = nil, which: String) async throws -> Any?api.attestation.createDebugToken
Create a debug token for simulators and CI (shown once).
public func createDebugToken(projectId: String? = nil, name: Any? = nil) async throws -> Any?api.attestation.deleteDebugToken
Delete a debug token.
public func deleteDebugToken(projectId: String? = nil, tokenId: String) async throws -> Any?api.attestation.challenge
One-time challenge to bind attestation evidence to (anon key).
public func challenge() async throws -> Any?api.attestation.exchange
Exchange Play Integrity / App Attest / DeviceCheck / debug evidence for an attestation token.
public func exchange(provider: Any, appId: Any? = nil, challenge: Any? = nil, token: Any? = nil, keyId: Any? = nil, attestation: Any? = nil, assertion: Any? = nil, development: Any? = nil) async throws -> Any?#api.auth
api.auth.confirmVerificationEmail
Confirm an email verification token.
public func confirmVerificationEmail(token: Any) async throws -> Any?api.auth.disableMfa
public func disableMfa(totpCode: Any) async throws -> Any?api.auth.enrollMfa
public func enrollMfa() async throws -> Any?api.auth.getMfaStatus
public func getMfaStatus() async throws -> Any?api.auth.getProvidersConfig
public func getProvidersConfig() async throws -> Any?api.auth.getSessionsConfig
public func getSessionsConfig() async throws -> Any?api.auth.listConsoleProductUsers
public func listConsoleProductUsers() async throws -> Any?api.auth.listSessions
public func listSessions() async throws -> Any?api.auth.revokeOtherSessions
public func revokeOtherSessions() async throws -> Any?api.auth.revokeSession
public func revokeSession(sessionId: String) async throws -> Any?api.auth.sendVerificationEmail
Trigger a verification email for the authenticated user.
public func sendVerificationEmail() async throws -> Any?api.auth.updateProvidersConfig
public func updateProvidersConfig(body: [String: Any]) async throws -> Any?api.auth.updateSessionsConfig
public func updateSessionsConfig(body: [String: Any]) async throws -> Any?api.auth.listDevices
Devices the signed-in user is signed in on (current = this one).
public func listDevices() async throws -> Any?api.auth.signOutDevice
Sign one device out: its sessions end and push tokens are removed.
public func signOutDevice(deviceId: String) async throws -> Any?api.auth.passkeyRegisterStart
Registration options for a new passkey for the signed-in user.
public func passkeyRegisterStart(name: Any? = nil) async throws -> Any?api.auth.passkeyRegisterFinish
Save a passkey from the authenticator's WebAuthn JSON.
public func passkeyRegisterFinish(credential: Any, name: Any? = nil) async throws -> Any?api.auth.passkeyAuthenticateStart
Passkey sign-in options: challenge_id and options.
public func passkeyAuthenticateStart(userId: Any? = nil) async throws -> Any?api.auth.passkeyAuthenticateFinish
Verify a signed passkey challenge and return a session.
public func passkeyAuthenticateFinish(challengeId: Any, credential: Any) async throws -> Any?api.auth.listPasskeys
The signed-in user's passkeys.
public func listPasskeys() async throws -> Any?api.auth.deletePasskey
Remove one of the signed-in user's passkeys.
public func deletePasskey(passkeyId: String) async throws -> Any?#api.billing
api.billing.buildInvoice
public func buildInvoice(orgId: String? = nil, period: Any? = nil) async throws -> Any?api.billing.cancelAccount
public func cancelAccount(accountId: String) async throws -> Any?api.billing.checkout
public func checkout(body: [String: Any]) async throws -> Any?api.billing.getAccount
public func getAccount(accountId: String) async throws -> Any?api.billing.getAccountOverage
public func getAccountOverage(accountId: String) async throws -> Any?api.billing.getAccountOveragePrefs
public func getAccountOveragePrefs(accountId: String) async throws -> Any?api.billing.getOrgOveragePrefs
The org's overage switches (one setting for the whole org)
public func getOrgOveragePrefs(orgId: String? = nil) async throws -> Any?api.billing.getCompute
public func getCompute(orgId: String? = nil, period: Any? = nil) async throws -> Any?api.billing.getFx
public func getFx() async throws -> Any?api.billing.getOpenInvoice
public func getOpenInvoice() async throws -> Any?api.billing.getOverage
public func getOverage(orgId: String? = nil) async throws -> Any?api.billing.getPlan
Fetch a billing plan by name.
public func getPlan(name: String) async throws -> Any?api.billing.getProvider
public func getProvider() async throws -> Any?api.billing.getSubscription
Fetch the active subscription for an organisation.
public func getSubscription(orgId: String? = nil) async throws -> Any?api.billing.getUsage
Fetch usage counters for an organisation.
public func getUsage(orgId: String? = nil, period: Any? = nil) async throws -> Any?api.billing.getUsageHistory
Fetch historical usage for an organisation.
public func getUsageHistory(orgId: String? = nil, months: Any? = nil) async throws -> Any?api.billing.listInvoices
public func listInvoices(orgId: String? = nil) async throws -> Any?api.billing.listPlans
List public billing plans.
public func listPlans() async throws -> Any?api.billing.listSubscriptions
List subscriptions visible to the authenticated caller.
public func listSubscriptions() async throws -> Any?api.billing.payInvoice
public func payInvoice(orgId: String? = nil, period: String) async throws -> Any?api.billing.razorpayCreateOrder
public func razorpayCreateOrder(body: [String: Any]) async throws -> Any?api.billing.razorpayVerifyPayment
public func razorpayVerifyPayment(body: [String: Any]) async throws -> Any?api.billing.resumeAccount
public func resumeAccount(accountId: String) async throws -> Any?api.billing.setAccountOveragePrefs
public func setAccountOveragePrefs(accountId: String, services: Any) async throws -> Any?api.billing.setOrgOveragePrefs
Change the org's overage switches (org owners and admins)
public func setOrgOveragePrefs(orgId: String? = nil, services: Any) async throws -> Any?api.billing.listAccountAddons
Add-ons on the billing account: price, paid units, what renews, paid-through date, and the autopay mandate
public func listAccountAddons(accountId: String) async throws -> Any?api.billing.addonCheckout
Start paying for more add-on units (prorated to the period end); they count once the payment is verified
public func addonCheckout(accountId: String, addonId: String, quantity: Any, projectId: Any? = nil) async throws -> Any?api.billing.setAddonRenewal
How many units renew at the period end (0 cancels); paid units keep working until then
public func setAddonRenewal(accountId: String, addonId: String, renewQuantity: Any) async throws -> Any?api.billing.setAccountAddon
Older switch: lowering schedules at the period end; more units than are paid for answer 402 (use addonCheckout)
public func setAccountAddon(accountId: String, addonId: String, enabled: Any, quantity: Any? = nil) async throws -> Any?api.billing.setAccountAutopay
Renew automatically (true) or end the plan with the paid period (false)
public func setAccountAutopay(accountId: String, enabled: Any) async throws -> Any?api.billing.autopaySetup
Start a ₹1 (refunded) authorisation that saves a card or UPI mandate for automatic renewals
public func autopaySetup(accountId: String, customerEmail: Any? = nil, name: Any? = nil) async throws -> Any?api.billing.removeAutopayMandate
Remove the saved mandate; renewals become invoices to pay by hand
public func removeAutopayMandate(accountId: String) async throws -> Any?api.billing.billingListAddonPrices
Add-on prices (USD per month per unit) and the plans each is sold on, as staff set them.
public func billingListAddonPrices() async throws -> Any?#api.builds
api.builds.check
Check an app build Sovariq wrote (title, description, migration {name, up_sql, down_sql}, policies [{id, spl}], functions [{name, runtime, files}], tests [rules test cases]) against the project — nothing changes: the migration is dry-run up, down and up again, rules are simulated, rules tests run with the build's rules.
public func check(build: Any) async throws -> Any?Returns the build id and the report.
api.builds.list
Recent app builds of the project: title, status (checked, failed, pr_opened), each check's result and the pull request.
public func list(limit: Any? = nil) async throws -> Any?api.builds.get
One app build: its files (the bundle), the check report and the pull request.
public func get(buildId: String) async throws -> Any?api.builds.pullRequest
Check the build again and open it as a pull request on the project's linked GitHub repository (one commit on a new branch; dev.app_build_prs_month).
public func pullRequest(buildId: String, token: Any? = nil) async throws -> Any?GitHub needs repository access: connect it with repository access or pass a token with repo scope.
api.builds.delete
Forget an app build (its pull request, if opened, stays on GitHub).
public func delete(buildId: String) async throws -> Any?#api.byok
api.byok.get
Your organization's own encryption key (Enterprise): whether it's on, the key, its data key version, whether it is usable now, what it covers, and setup (Sovaria's AWS principal and the key policy statement).
public func get() async throws -> Any?- HTTP
- GET /api/v1/byok
api.byok.set
Use your AWS KMS key (its ARN) for the organization's storage files and backups.
public func set(provider: Any? = nil, keyRef: Any) async throws -> Any?Checked end to end first (wrap, unwrap, a file written and read with it). Organization owners.
- HTTP
- PUT /api/v1/byok
api.byok.rotate
A new data key version under the same KMS key; older versions stay to decrypt what they encrypted.
public func rotate() async throws -> Any?Organization owners.
api.byok.check
Ask your KMS now whether Sovaria can still use the key.
public func check() async throws -> Any?api.byok.reencryptStorage
Rewrite the organization's existing storage files under its key (in the background; progress in byok.get).
public func reencryptStorage() async throws -> Any?Organization owners.
#api.crashes
api.crashes.listIssues
App crash issues of the project (grouped reports from sov.crashes), newest first, with the plan's limits.
public func listIssues(status: Any? = nil, limit: Any? = nil) async throws -> Any?api.crashes.getIssue
One crash issue: sample report (stack, breadcrumbs, device, release) and its last 50 reports.
public func getIssue(fingerprint: String) async throws -> Any?api.crashes.setIssueStatus
Mark a crash issue open, resolved (reopens if it happens again) or ignored.
public func setIssueStatus(fingerprint: String, status: Any) async throws -> Any?api.crashes.usage
Crash reports accepted and dropped this month, and the plan's limits.
public func usage() async throws -> Any?#api.data
api.data.addColumn
Add a column to an existing table.
public func addColumn(tableName: Any, columnName: Any, dataType: Any, isNullable: Any? = nil, isUnique: Any? = nil, defaultValue: Any? = nil) async throws -> Any?api.data.addForeignKey
Add a foreign-key relation.
public func addForeignKey(tableName: Any, columnName: Any, referencedTable: Any, referencedColumn: Any) async throws -> Any?api.data.beginTransaction
Start a table transaction and receive tx/snapshot IDs.
public func beginTransaction() async throws -> Any?api.data.commitTransaction
Commit a previously opened table transaction.
public func commitTransaction(txid: Any) async throws -> Any?api.data.dropColumn
Drop a column from a table.
public func dropColumn(tableName: Any, columnName: Any) async throws -> Any?api.data.dropForeignKey
Drop a foreign-key relation.
public func dropForeignKey(tableName: Any, columnName: Any, referencedTable: Any, referencedColumn: Any) async throws -> Any?api.data.dropTable
Drop a relational table.
public func dropTable(tableName: Any) async throws -> Any?api.data.rollbackTransaction
public func rollbackTransaction(txid: Any) async throws -> Any?api.data.tableHistory
Tables that keep history (versions, oldest, retention) and the plan's db.history_* limits.
public func tableHistory() async throws -> Any?api.data.setTableHistory
Turn a table's history on (every row version kept; read with sov_as_of(NULL::table, time)) or off (versions dropped).
public func setTableHistory(tableName: Any, enabled: Any, keepDays: Any? = nil) async throws -> Any?api.data.schemaDigest
The schema as one short line per table: columns with types, keys, →references, allowed values, indexes and owner-only rows.
public func schemaDigest(tables: Any? = nil, maxChars: Any? = nil, since: Any? = nil) async throws -> Any?tables (comma-separated) expands only those in a big schema; since=<version> answers unchanged when nothing changed.
api.data.applySchemaPlan
Create or extend tables from one declarative plan ([{name, columns, patterns, unique, indexes}]; columns as objects or short form like "status text!='draft' in(draft|live)" or "customer_id →customers cascade").
public func applySchemaPlan(tables: Any, dryRun: Any? = nil, name: Any? = nil) async throws -> Any?Checked first (422 lists every problem, nothing changes), then applied as one reversible migration and verified. dry_run returns the SQL without applying.
api.data.applyMigration
Apply a migration and record it in the project's history, in one transaction (all or nothing).
public func applyMigration(name: Any, upSql: Any, downSql: Any? = nil, version: Any? = nil) async throws -> Any?down_sql makes it reversible; the same version with the same SQL again does nothing, with different SQL it is refused (409).
api.data.dryRunMigration
Run a migration inside a transaction and roll it back: whether it would apply.
public func dryRunMigration(name: Any, upSql: Any, downSql: Any? = nil) async throws -> Any?Nothing is kept.
api.data.dryRunMigrations
Check several migrations ([{name, up_sql}], up to 500 and 5 MB of SQL) in order inside one transaction that is rolled back, so later ones see what earlier ones create.
public func dryRunMigrations(migrations: Any) async throws -> Any?Returns status dry_run_ok, or failed with failed.index, name and error for the first that fails.
api.data.rollbackMigration
Undo the most recent migration with its down SQL (or version, with force when it isn't the latest).
public func rollbackMigration(version: Any? = nil, force: Any? = nil) async throws -> Any?api.data.resetMigrations
Drop every user table and forget the migration history, in one transaction (what sov db reset runs).
public func resetMigrations(dryRun: Any? = nil) async throws -> Any?dry_run lists what would be dropped.
api.data.docPipeline
Run a document pipeline: where, aggregate, distinct, sort, offset, limit, select, remove_fields, sample.
public func docPipeline(collection: String, stages: Any, collectionGroup: Any? = nil) async throws -> Any?#api.e2ee
api.e2ee.bootstrapKey
Create (or fetch) the active e2ee channel key.
public func bootstrapKey(channel: Any, ttlSeconds: Any? = nil, forceNew: Any? = nil) async throws -> Any?api.e2ee.getActiveKey
Get the active e2ee key for a channel, wrapped for client_public_key.
public func getActiveKey(channel: String, clientPublicKey: Any? = nil) async throws -> Any?api.e2ee.getKey
Get key material by channel/key_id, wrapped for client_public_key.
public func getKey(channel: String, keyId: String, clientPublicKey: Any? = nil) async throws -> Any?api.e2ee.listKeys
List key metadata for a channel.
public func listKeys(channel: String) async throws -> Any?api.e2ee.revokeKey
Revoke an active or historical channel key.
public func revokeKey(channel: Any, keyId: Any? = nil, reason: Any? = nil) async throws -> Any?api.e2ee.rotateKey
Rotate e2ee key material for a channel.
public func rotateKey(channel: Any, ttlSeconds: Any? = nil) async throws -> Any?#api.embeddings
api.embeddings.getSettings
The project's embedding model, who pays (managed | own_key), dimensions and list price.
public func getSettings() async throws -> Any?api.embeddings.setSettings
Use the project's own provider key: provider (openai | gemini | openai_compatible), model, dimensions, base_url, api_key.
public func setSettings(body: [String: Any]) async throws -> Any?Tested before it is saved.
api.embeddings.clearSettings
Go back to Sovaria's managed embedding model.
public func clearSettings() async throws -> Any?api.embeddings.usage
Texts, tokens and estimated cost per month, model and who paid.
public func usage(months: Any? = nil) async throws -> Any?#api.functions
api.functions.delete
public func delete(functionName: String) async throws -> Any?api.functions.get
public func get(functionName: String, projectId: Any? = nil) async throws -> Any?api.functions.getBindings
public func getBindings(functionName: String) async throws -> Any?api.functions.getPolicy
public func getPolicy(functionName: String) async throws -> Any?api.functions.getSource
public func getSource(functionName: String, projectId: Any? = nil) async throws -> Any?api.functions.githubCommit
public func githubCommit(body: [String: Any]) async throws -> Any?api.functions.githubImport
public func githubImport(body: [String: Any]) async throws -> Any?api.functions.invocationStatus
Get status for an async Forge invocation id.
public func invocationStatus(invocationId: String, projectId: Any? = nil) async throws -> Any?api.functions.list
List Forge functions with active version and queue summary.
public func list(projectId: Any? = nil, limit: Any? = nil, offset: Any? = nil) async throws -> Any?api.functions.simulationDiff
Diff two simulation invocation outputs.
public func simulationDiff(functionName: String, projectId: Any? = nil, leftInvocationId: Any? = nil, rightInvocationId: Any? = nil) async throws -> Any?api.functions.status
Get forge deployment status by deploy id.
public func status(deployId: String, projectId: Any? = nil) async throws -> Any?api.functions.update
public func update(functionName: String, body: [String: Any], projectId: Any? = nil) async throws -> Any?api.functions.updateBindings
public func updateBindings(functionName: String, bindings: Any) async throws -> Any?api.functions.updatePolicy
public func updatePolicy(functionName: String, policy: [String: Any]) async throws -> Any?api.functions.versions
List deployment versions for a Forge function.
public func versions(functionName: String, projectId: Any? = nil, limit: Any? = nil, offset: Any? = nil) async throws -> Any?api.functions.listGithubPreviews
Preview environments of the linked GitHub repository's open pull requests: PR number and title, status (creating, deploying, ready, partial, error), API URL, functions and migrations applied.
public func listGithubPreviews() async throws -> Any?api.functions.getFunctionLimits
A function's own memory, timeout and minimum-instances settings, what it runs with (effective) and the plan's maximums.
public func getFunctionLimits(functionName: String) async throws -> Any?api.functions.setFunctionLimits
Lower a function's timeout or memory (never above the plan; null = plan maximum) and set its minimum instances: pre-started sandboxes kept for it so its calls start warm (plan fn.min_instances; left out = unchanged).
public func setFunctionLimits(functionName: String, timeoutSec: Any? = nil, memoryMb: Any? = nil, minInstances: Any? = nil) async throws -> Any?#api.governance
api.governance.adminDatabases
public func adminDatabases() async throws -> Any?api.governance.getTenant
public func getTenant(orgId: String? = nil) async throws -> Any?api.governance.getTenantDatabaseConnection
public func getTenantDatabaseConnection(orgId: String? = nil, projectId: String? = nil) async throws -> Any?api.governance.listHosts
public func listHosts(regionId: Any? = nil) async throws -> Any?api.governance.listRegions
public func listRegions() async throws -> Any?api.governance.listTenantDatabaseBackups
public func listTenantDatabaseBackups(orgId: String? = nil, projectId: String? = nil, limit: Any? = nil) async throws -> Any?api.governance.listTenantDatabases
public func listTenantDatabases(orgId: String? = nil) async throws -> Any?api.governance.listTenants
public func listTenants() async throws -> Any?api.governance.metricsOverview
public func metricsOverview() async throws -> Any?api.governance.patchHost
public func patchHost(hostId: String, body: [String: Any]) async throws -> Any?api.governance.patchRegion
public func patchRegion(regionId: String, body: [String: Any]) async throws -> Any?api.governance.pauseTenantDatabase
public func pauseTenantDatabase(orgId: String? = nil, projectId: String? = nil) async throws -> Any?api.governance.resizeTenantDatabase
public func resizeTenantDatabase(orgId: String? = nil, projectId: String? = nil, computeSize: Any) async throws -> Any?api.governance.resumeTenantDatabase
public func resumeTenantDatabase(orgId: String? = nil, projectId: String? = nil) async throws -> Any?api.governance.revealTenantDatabaseConnection
Reveal a database connection string (staff, with an active access grant).
public func revealTenantDatabaseConnection(orgId: String? = nil, projectId: String? = nil, grantId: Any) async throws -> Any?api.governance.setTenantStatus
public func setTenantStatus(orgId: String? = nil, status: Any) async throws -> Any?api.governance.triggerTenantDatabaseBackup
public func triggerTenantDatabaseBackup(orgId: String? = nil, projectId: String? = nil) async throws -> Any?api.governance.listDatabaseReplicas
Read replicas of the project's dedicated database: status, connection string, lag behind the primary, plan limit.
public func listDatabaseReplicas(orgId: String? = nil, projectId: String? = nil) async throws -> Any?api.governance.createDatabaseReplica
Start a streaming read replica (status provisioning until its base backup is done, then ready).
public func createDatabaseReplica(orgId: String? = nil, projectId: String? = nil) async throws -> Any?api.governance.deleteDatabaseReplica
Remove a read replica and its copy of the data.
public func deleteDatabaseReplica(orgId: String? = nil, projectId: String? = nil, replicaId: String) async throws -> Any?api.governance.compareDatabaseMoments
What changed between two moments of the database — a backup id or "now" on each side: schema objects added, removed or changed (with a diff) and rows per table.
public func compareDatabaseMoments(orgId: String? = nil, projectId: String? = nil, fromMoment: Any, toMoment: Any? = nil, includePlatform: Any? = nil) async throws -> Any?api.governance.restoreDatabaseBackup
Replace the project's database with a backup (dedicated databases): a safety backup is taken first, the backup loads beside production in one transaction and is swapped in; undo within 7 days.
public func restoreDatabaseBackup(orgId: String? = nil, projectId: String? = nil, backupId: String, confirm: Any) async throws -> Any?Org owners and admins.
api.governance.listDatabaseRestores
Database restores of the project: status, the backup used, the safety backup and until when it can be undone.
public func listDatabaseRestores(orgId: String? = nil, projectId: String? = nil) async throws -> Any?api.governance.undoDatabaseRestore
Put back the database exactly as it was right before a restore (within the undo window).
public func undoDatabaseRestore(orgId: String? = nil, projectId: String? = nil, restoreId: String) async throws -> Any?api.governance.getPitrStatus
Point-in-time recovery of the project's database: whether it is on, the earliest and latest moment that can be restored, base backups and archived WAL.
public func getPitrStatus(orgId: String? = nil, projectId: String? = nil) async throws -> Any?api.governance.enablePitr
Turn on point-in-time recovery (WAL archiving; Pro and higher).
public func enablePitr(orgId: String? = nil, projectId: String? = nil, restart: Any? = nil) async throws -> Any?If the database needs one restart for it (a few seconds), it restarts only with restart=true; otherwise the answer says state=restart_required.
api.governance.disablePitr
Stop point-in-time recovery archiving (no restart).
public func disablePitr(orgId: String? = nil, projectId: String? = nil) async throws -> Any?What was archived stays restorable until it leaves the plan's window.
api.governance.restoreDatabaseToTime
Restore the project's database to a moment (ISO-8601 target_time).
public func restoreDatabaseToTime(orgId: String? = nil, projectId: String? = nil, targetTime: Any, confirm: Any? = nil, verifyOnly: Any? = nil) async throws -> Any?It is recovered in a new container beside production and checked; with confirm=true it is then swapped in (safety backup first, undo for 7 days). verify_only=true only checks the moment restores. Returns a job; poll get_restore_job.
api.governance.getRestoreJob
A database restore job (point-in-time or from a backup): status (running, done, verified, failed, undone), the step it is on, the moment, and until when it can be undone.
public func getRestoreJob(orgId: String? = nil, projectId: String? = nil, jobId: String) async throws -> Any?api.governance.listEnvironments
Production plus the project's environments (staging ones and API versions): database status, what each database started with (database, copy_state) and its own API URL; limit is how many the plan allows.
public func listEnvironments(orgId: String? = nil, projectId: String? = nil) async throws -> Any?api.governance.createEnvironment
Create an environment with its own database in the project's container.
public func createEnvironment(orgId: String? = nil, projectId: String? = nil, envId: Any, name: Any, kind: Any? = nil, label: Any? = nil, fromEnvId: Any? = nil, database: Any? = nil, sampleRows: Any? = nil, includeTables: Any? = nil, excludeTables: Any? = nil, mask: Any? = nil, maskAdd: Any? = nil, maskSkip: Any? = nil) async throws -> Any?database: empty | schema (default: production's structure, no rows) | sample (plus up to sample_rows newest rows per table and every row they reference; plan env.branch_data, Pro and higher) | all (every row, up to env.branch_data_max_gb; Ultra and higher). Personal columns are masked unless mask=false (owners/admins, audited). Rows are copied as a job: poll get_environment_copy.
api.governance.getEnvironmentCopy
What an environment's database started with and how its row copy is going: state copying | done | failed, tables and rows copied, masked columns, size, or why it failed.
public func getEnvironmentCopy(orgId: String? = nil, projectId: String? = nil, envId: String) async throws -> Any?api.governance.deleteEnvironment
Delete an environment and its database (a snapshot is kept first).
public func deleteEnvironment(orgId: String? = nil, projectId: String? = nil, envId: String) async throws -> Any?api.governance.queryInsights
The project's SQL statements (pg_stat_statements) by total time, average, calls, worst run or rows.
public func queryInsights(orgId: String? = nil, projectId: String? = nil, sort: Any? = nil, limit: Any? = nil) async throws -> Any?api.governance.resetQueryInsights
Clear this database's query statistics.
public func resetQueryInsights(orgId: String? = nil, projectId: String? = nil) async throws -> Any?api.governance.indexAdvisor
Indexes that would speed up the slowest statements, tested as hypothetical indexes (hypopg).
public func indexAdvisor(orgId: String? = nil, projectId: String? = nil, queryid: Any? = nil) async throws -> Any?api.governance.indexAdvisorForQuery
Index recommendations for one statement (only EXPLAINed, never run).
public func indexAdvisorForQuery(orgId: String? = nil, projectId: String? = nil, query: Any) async throws -> Any?api.governance.applyIndex
Build a recommended index with CREATE INDEX CONCURRENTLY (background; poll index_status).
public func applyIndex(orgId: String? = nil, projectId: String? = nil, schema: Any? = nil, table: Any, columns: Any) async throws -> Any?api.governance.indexStatus
Whether an index the advisor started is building, ready, failed or invalid.
public func indexStatus(orgId: String? = nil, projectId: String? = nil, indexName: String) async throws -> Any?#api.history
api.history.commit
Create a Chrono commit.
public func commit(timeline: Any? = nil, message: Any, author: Any? = nil, eventType: Any? = nil) async throws -> Any?api.history.converge
Converge source timeline into target timeline.
public func converge(target: Any, source: Any, author: Any, message: Any? = nil) async throws -> Any?api.history.createSnapshot
Create a system snapshot.
public func createSnapshot(message: Any) async throws -> Any?api.history.deleteTimeline
Delete a timeline.
public func deleteTimeline(name: String) async throws -> Any?api.history.jumpTimeline
Force-jump a timeline head.
public func jumpTimeline(name: String, targetHex: Any) async throws -> Any?api.history.listSnapshots
List known snapshots.
public func listSnapshots() async throws -> Any?api.history.listTimelines
List available timelines.
public func listTimelines() async throws -> Any?api.history.restoreSnapshot
Restore a snapshot by id.
public func restoreSnapshot(snapshotId: String) async throws -> Any?api.history.spawnTimeline
Spawn a new timeline from a source chronon.
public func spawnTimeline(name: Any, sourceHexId: Any? = nil) async throws -> Any?api.history.timelineHistory
Fetch timeline history chronons.
public func timelineHistory(name: String, limit: Any? = nil, offset: Any? = nil) async throws -> Any?api.history.topology
Return timeline graph topology.
public func topology(timeline: Any? = nil, limit: Any? = nil) async throws -> Any?api.history.variance
Calculate variance between two chronons.
public func variance(oldChrononHex: Any, newChrononHex: Any, domainFilter: Any? = nil) async throws -> Any?#api.knowledge
api.knowledge.list
Knowledge bases (RAG) with documents, chunks, tokens, the embedding model and estimated cost.
public func list() async throws -> Any?api.knowledge.create
Create a knowledge base: name, description, access (team | app_users), user_uploads, chunk_tokens.
public func create(body: [String: Any]) async throws -> Any?api.knowledge.update
Change a knowledge base's description, access or user_uploads.
public func update(name: String, body: [String: Any]) async throws -> Any?api.knowledge.delete
Delete a knowledge base with all its documents.
public func delete(name: String) async throws -> Any?api.knowledge.listDocuments
Documents the caller may read: title, source, chunks, tokens, status.
public func listDocuments(name: String, limit: Any? = nil, offset: Any? = nil) async throws -> Any?api.knowledge.addDocument
Add or replace a document: text (+format), content_base64 + filename (PDF, DOCX, HTML, Markdown, TXT, CSV, JSON) or url; optional document_id, title, metadata.
public func addDocument(name: String, body: [String: Any]) async throws -> Any?api.knowledge.deleteDocument
Remove a document (its owner or the team).
public func deleteDocument(name: String, documentId: String) async throws -> Any?api.knowledge.search
Passages for a question with numbered citations: query, k, mode (vector | keyword | hybrid), metadata_filter.
public func search(name: String, body: [String: Any]) async throws -> Any?Only passages the caller may read.
#api.mcp
api.mcp.listConnections
AI assistants you connected over Sovaria's MCP server: the app, its organization and project, read-only or not, when it was connected and last used.
public func listConnections() async throws -> Any?api.mcp.disconnect
Disconnect one of your AI assistants: its tokens stop working at once.
public func disconnect(grantId: String) async throws -> Any?api.mcp.orgSettings
Whether members may connect AI assistants to this organization, the MCP server URL, and (owners and admins) every member's connection.
public func orgSettings(orgId: String? = nil) async throws -> Any?api.mcp.setOrgAllowed
Allow or stop AI assistants for the organization (owners and admins).
public func setOrgAllowed(orgId: String? = nil, allowed: Any) async throws -> Any?Turning it off ends every member's connection.
api.mcp.orgDisconnect
Disconnect a member's AI assistant from the organization (owners and admins).
public func orgDisconnect(orgId: String? = nil, grantId: String) async throws -> Any?#api.messaging
api.messaging.listTemplates
Message templates of the project (push and/or email content with {{ variables }}).
public func listTemplates(projectId: String? = nil) async throws -> Any?api.messaging.getTemplate
One message template.
public func getTemplate(projectId: String? = nil, name: String) async throws -> Any?api.messaging.putTemplate
Create or replace a template: push {title, body, image?, data?}, email {subject, html?, text?}; category transactional or marketing (marketing skips opted-out users and adds an unsubscribe link).
public func putTemplate(projectId: String? = nil, name: String, description: Any? = nil, category: Any? = nil, push: Any? = nil, email: Any? = nil) async throws -> Any?api.messaging.deleteTemplate
Delete a message template.
public func deleteTemplate(projectId: String? = nil, name: String) async throws -> Any?api.messaging.listAudiences
Saved audiences: read-only SQL queries returning user_id (other columns become per-user variables).
public func listAudiences(projectId: String? = nil) async throws -> Any?api.messaging.getAudience
One audience and its last count.
public func getAudience(projectId: String? = nil, name: String) async throws -> Any?api.messaging.putAudience
Create or replace an audience: a SELECT on the project database returning user_id (e.g.
public func putAudience(projectId: String? = nil, name: String, sql: Any, description: Any? = nil) async throws -> Any?select user_id, first_name from profiles where plan = 'pro').
api.messaging.deleteAudience
Delete an audience.
public func deleteAudience(projectId: String? = nil, name: String) async throws -> Any?api.messaging.previewAudience
Run a saved audience: how many app users it reaches, columns and a sample of 10.
public func previewAudience(projectId: String? = nil, name: String) async throws -> Any?api.messaging.previewSql
Try an audience query before saving it: app users reached, columns and a sample.
public func previewSql(projectId: String? = nil, sql: Any) async throws -> Any?api.messaging.send
Send a template (or content {push, email}) to {user_ids | audience | sql | topic | all_users} on push and/or email, with variables; dry_run reports who would get it and renders a preview.
public func send(projectId: String? = nil, template: Any? = nil, content: Any? = nil, to: Any, channels: Any? = nil, variables: Any? = nil, category: Any? = nil, dryRun: Any? = nil) async throws -> Any?Runs in the background; poll getSend.
api.messaging.listSends
Recent sends with status and per-channel counts.
public func listSends(projectId: String? = nil, limit: Any? = nil) async throws -> Any?api.messaging.getSend
One send: status (sending, done, failed) and counts per channel and outcome.
public func getSend(projectId: String? = nil, sendId: String) async throws -> Any?api.messaging.listDeliveries
Delivery log: per recipient and channel, sent / failed / no_device / no_email / opted_out with an error code (never content).
public func listDeliveries(projectId: String? = nil, sendId: Any? = nil, userId: Any? = nil, status: Any? = nil, limit: Any? = nil, offset: Any? = nil) async throws -> Any?api.messaging.usage
Messages sent this month per channel and the plan's messaging limits.
public func usage(projectId: String? = nil) async throws -> Any?api.messaging.setUserOptout
Record an app user's marketing choice (channel push, email or all) from your own UI.
public func setUserOptout(projectId: String? = nil, userId: String, channel: Any, optedOut: Any) async throws -> Any?api.messaging.getPreferences
The signed-in app user's marketing preferences per channel.
public func getPreferences() async throws -> Any?api.messaging.setPreferences
The signed-in app user turns marketing push/email on or off: { marketing: { email: false } }.
public func setPreferences(marketing: Any) async throws -> Any?#api.mobile
api.mobile.listApps
Registered iOS/Android apps (bundle/package ids, redirect URIs).
public func listApps(projectId: String? = nil) async throws -> Any?api.mobile.createApp
Register an app: platform, bundle_id+team_id (iOS) or package_name+sha256_cert_fingerprints (Android), redirect_uris.
public func createApp(projectId: String? = nil, body: [String: Any]) async throws -> Any?api.mobile.updateApp
Change a registered app (name, ids, fingerprints, redirect URIs).
public func updateApp(projectId: String? = nil, appId: String, body: [String: Any]) async throws -> Any?api.mobile.deleteApp
Remove a registered app.
public func deleteApp(projectId: String? = nil, appId: String) async throws -> Any?api.mobile.listUserDevices
An app user's signed-in devices and push tokens.
public func listUserDevices(projectId: String? = nil, userId: String) async throws -> Any?api.mobile.revokeUserDevice
Sign one of an app user's devices out (sessions and push tokens).
public func revokeUserDevice(projectId: String? = nil, userId: String, deviceId: String) async throws -> Any?#api.observability
api.observability.metrics
Requests, 4xx/5xx errors, latency (avg, p50, p95, p99) and bytes over time for the project, per gateway service.
public func metrics(hours: Any? = nil, service: Any? = nil, points: Any? = nil, byService: Any? = nil) async throws -> Any?History by plan (obs.retention_days).
api.observability.logs
Recent requests, newest first (method, path, status, duration, service, trace_id, env_id).
public func logs(limit: Any? = nil, service: Any? = nil, status: Any? = nil, q: Any? = nil, after: Any? = nil, before: Any? = nil, source: Any? = nil, env: Any? = nil) async throws -> Any?after = live tail, before = older page.
api.observability.routes
Latency (p50, p95, p99) and 4xx/5xx per route (method + path with ids collapsed), busiest first; env = comma-separated environment ids (main = none named), default all; route adds that route's series.
public func routes(hours: Any? = nil, env: Any? = nil, route: Any? = nil, limit: Any? = nil) async throws -> Any?api.observability.alertsList
SLO alert rules with their state (ok, firing, no_data, paused), the plan limit (obs.alert_rules), the metric catalog and recent events.
public func alertsList() async throws -> Any?api.observability.alertsCreate
Create an alert rule: metric latency_p95_ms, latency_p99_ms, error_rate (5xx %), function_failures or db_connections; threshold; window 5-60 min; optional route/function target; team email and/or a signed HTTPS webhook (signing_secret returned once).
public func alertsCreate(metric: Any, threshold: Any, windowMinutes: Any? = nil, name: Any? = nil, target: Any? = nil, env: Any? = nil, minRequests: Any? = nil, email: Any? = nil, webhookUrl: Any? = nil) async throws -> Any?Owners and admins.
api.observability.alertsUpdate
Change an alert rule (any create field) or pause/resume it ({enabled: false}).
public func alertsUpdate(ruleId: String, body: [String: Any]) async throws -> Any?api.observability.alertsDelete
Delete an alert rule.
public func alertsDelete(ruleId: String) async throws -> Any?api.observability.alertsTest
Measure the rule now (value, would_fire) and send an alert.test to its webhook.
public func alertsTest(ruleId: String) async throws -> Any?api.observability.alertsEvents
Fired and resolved alerts, newest first.
public func alertsEvents(limit: Any? = nil) async throws -> Any?#api.org
api.org.acceptOrgInvite
public func acceptOrgInvite(token: Any) async throws -> Any?api.org.addMember
Add a user as a member of an org/project node.
public func addMember(orgId: String? = nil, userId: Any, role: Any) async throws -> Any?api.org.createEdge
Connect two DAPG nodes with a typed relationship.
public func createEdge(sourceNodeId: Any, targetNodeId: Any, relationType: Any, role: Any? = nil) async throws -> Any?api.org.createOrgInvite
public func createOrgInvite(orgId: String? = nil, email: Any, role: Any) async throws -> Any?api.org.deleteOrg
public func deleteOrg(orgId: String? = nil) async throws -> Any?api.org.ensureDefaultApiKeys
public func ensureDefaultApiKeys() async throws -> Any?api.org.getChildren
List child nodes attached by a relation (e.g.
public func getChildren(parentId: String, relation: Any? = nil) async throws -> Any?OWNS, HAS_ENV).
api.org.getContext
Resolve a user's roles on a resource by walking the DAPG.
public func getContext(userId: String, resourceId: String) async throws -> Any?api.org.getNode
Fetch a single graph node by ID.
public func getNode(nodeId: String) async throws -> Any?api.org.getProjectRef
public func getProjectRef(projectId: String? = nil) async throws -> Any?api.org.getProjectSettings
public func getProjectSettings() async throws -> Any?api.org.getRoleCatalog
public func getRoleCatalog() async throws -> Any?api.org.getRoleMatrix
public func getRoleMatrix() async throws -> Any?api.org.listApiKeys
public func listApiKeys() async throws -> Any?api.org.listNodes
List graph nodes; when provided, node_type filters by type.
public func listNodes(nodeType: Any? = nil) async throws -> Any?- HTTP
- GET /api/v1/org
api.org.listOrgMembers
public func listOrgMembers(orgId: String? = nil) async throws -> Any?api.org.removeOrgMember
public func removeOrgMember(orgId: String? = nil, userId: String) async throws -> Any?api.org.revokeApiKey
public func revokeApiKey(keyId: String) async throws -> Any?api.org.setOrgPlan
public func setOrgPlan(orgId: String? = nil, plan: Any) async throws -> Any?api.org.updateMemberRole
public func updateMemberRole(orgId: String? = nil, userId: String, role: Any) async throws -> Any?api.org.updateOrg
public func updateOrg(orgId: String? = nil, body: [String: Any]) async throws -> Any?api.org.updateProjectSettings
public func updateProjectSettings(settings: Any) async throws -> Any?api.org.updateRoleMatrix
public func updateRoleMatrix(matrix: Any) async throws -> Any?api.org.transferOrgOwnership
Hand the organization and its billing to another admin (owner only).
public func transferOrgOwnership(orgId: String? = nil, newOwnerId: Any, reason: Any? = nil) async throws -> Any?409 ONE_OWNED_ORG when they already own one.
#api.platform
api.platform.createEventHook
public func createEventHook(body: [String: Any]) async throws -> Any?api.platform.deleteEventHook
public func deleteEventHook(hookId: String) async throws -> Any?api.platform.disconnectGithub
public func disconnectGithub(projectId: Any? = nil) async throws -> Any?api.platform.gatewayHealth
public func gatewayHealth() async throws -> Any?api.platform.getEnginesHealth
Return aggregate gateway health for downstream engines.
public func getEnginesHealth() async throws -> Any?api.platform.getErrorTrace
public func getErrorTrace(traceId: String) async throws -> Any?api.platform.getGithubConnectionState
public func getGithubConnectionState(projectId: Any? = nil) async throws -> Any?api.platform.listEventHooks
public func listEventHooks() async throws -> Any?api.platform.resolveErrorTrace
public func resolveErrorTrace(traceId: String, resolved: Any) async throws -> Any?#api.policy
api.policy.auditCount
Return current audit-entry count.
public func auditCount() async throws -> Any?api.policy.auditVerify
Verify audit hash-chain integrity.
public func auditVerify() async throws -> Any?api.policy.policyCreate
Create and compile a policy.
public func policyCreate(policyId: Any, name: Any, splSource: Any, orgId: Any) async throws -> Any?api.policy.policyDelete
Delete (deactivate) a policy.
public func policyDelete(policyId: String) async throws -> Any?api.policy.policyEvaluate
Evaluate a policy against an explicit debug context.
public func policyEvaluate(policyId: String, context: Any) async throws -> Any?api.policy.policyGet
Get a single policy by ID.
public func policyGet(policyId: String) async throws -> Any?api.policy.policyHistory
Return version history for a policy.
public func policyHistory(policyId: String) async throws -> Any?api.policy.policyList
List active policies visible in current tenant scope.
public func policyList() async throws -> Any?api.policy.policyRollback
Rollback a policy to a historical version.
public func policyRollback(policyId: String, version: Any) async throws -> Any?api.policy.policyTemplates
List server-authoritative SPL templates.
public func policyTemplates() async throws -> Any?#api.push
api.push.getCredentials
Which push providers are set up (never the keys).
public func getCredentials(projectId: String? = nil) async throws -> Any?api.push.setFcmCredentials
Upload the Firebase service account JSON (encrypted, write-only).
public func setFcmCredentials(projectId: String? = nil, serviceAccount: Any) async throws -> Any?api.push.setApnsCredentials
Upload the APNs .p8 key (encrypted, write-only).
public func setApnsCredentials(projectId: String? = nil, p8: Any, keyId: Any, teamId: Any, bundleId: Any, environment: Any? = nil) async throws -> Any?api.push.deleteCredentials
Remove FCM or APNs credentials.
public func deleteCredentials(projectId: String? = nil, provider: String) async throws -> Any?api.push.listDevices
Push devices registered in the project (tokens are never returned).
public func listDevices(projectId: String? = nil, userId: Any? = nil, limit: Any? = nil, before: Any? = nil) async throws -> Any?api.push.send
Send a push: to {user_ids|device_ids|topic}, notification {title, body, image}, data, badge, priority, ttl_seconds, dry_run.
public func send(projectId: String? = nil, message: [String: Any]) async throws -> Any?api.push.listSends
Recent sends (counts and error codes) and this month's total.
public func listSends(projectId: String? = nil, limit: Any? = nil) async throws -> Any?api.push.registerDevice
Register the signed-in app user's push token (FCM or APNs).
public func registerDevice(token: Any, platform: Any, provider: Any? = nil, deviceId: Any? = nil, appId: Any? = nil, topics: Any? = nil, locale: Any? = nil) async throws -> Any?api.push.myDevices
The signed-in app user's push tokens.
public func myDevices() async throws -> Any?api.push.updateTopics
Subscribe a device to topics or unsubscribe it.
public func updateTopics(deviceRowId: String, subscribe: Any? = nil, unsubscribe: Any? = nil, replace: Any? = nil) async throws -> Any?api.push.deleteDevice
Remove one of the signed-in user's push devices.
public func deleteDevice(deviceRowId: String) async throws -> Any?api.push.unregisterToken
Drop a push token (sign-out, notifications turned off).
public func unregisterToken(token: Any) async throws -> Any?#api.realtime
api.realtime.channels
List active realtime channels.
public func channels() async throws -> Any?api.realtime.presence
Fetch presence for a realtime channel.
public func presence(channel: String) async throws -> Any?api.realtime.replay
Replay events for a realtime channel.
public func replay(channel: String, after: Any? = nil, limit: Any? = nil) async throws -> Any?api.realtime.subscribe
Subscribe a client ID to a realtime channel.
public func subscribe(channel: Any, clientId: Any) async throws -> Any?api.realtime.unsubscribe
Unsubscribe a client ID from a realtime channel.
public func unsubscribe(channel: Any, clientId: Any) async throws -> Any?#api.simulation
api.simulation.compareRuns
Compare two simulation runs of the project: regressions, improvements and new failures.
public func compareRuns(targetRunId: String, baselineRunId: String) async throws -> Any?api.simulation.discover
What a simulation would test (user types, resources, rules), redacted by what you may read; pass its manifest_id to a run.
public func discover() async throws -> Any?api.simulation.getRun
One simulation run with every case's result (history keeps no rule source or user ids).
public func getRun(runId: String) async throws -> Any?api.simulation.listRuns
The project's simulation runs, newest first; limit 1-100 (default 50) and offset page through them.
public func listRuns(limit: Any? = nil, offset: Any? = nil) async throws -> Any?api.simulation.quota
Real simulation runs used and allowed today (UTC) and this month; reading it uses nothing.
public func quota() async throws -> Any?api.simulation.listIntended
Outcomes the team marked as intended for this project (shown green on every run, left out of findings).
public func listIntended() async throws -> Any?api.simulation.markIntended
Mark an outcome as intended (role, action, resource, outcome ALLOW or DENY, optional note); needs policies.write.
public func markIntended(role: Any, action: Any, resource: Any, outcome: Any, note: Any? = nil) async throws -> Any?Marking the same role/action/resource again replaces it.
api.simulation.unmarkIntended
Remove an intended-outcome mark; matching cases show as measured again.
public func unmarkIntended(markId: String) async throws -> Any?Needs policies.write.
api.simulation.topology
Callers, gateway checks, sign-in, resources and connectors of the project (platform defences as one 'Platform protection' node).
public func topology() async throws -> Any?api.simulation.limits
Every limit the project lives under, with its value and how it is counted.
public func limits() async throws -> Any?api.simulation.integrationRun
Run one integration flow under a programmed outcome: modelled (free, nothing sent) or sealed (real code path, recorded, one single-request check).
public func integrationRun(connectorId: Any, flowId: Any, outcome: Any? = nil, mode: Any? = nil) async throws -> Any?api.simulation.drillsRun
Judge the 14 security drills from the project's configuration (optionally with a what-if draft that is never saved).
public func drillsRun(drillIds: Any? = nil, overrides: Any? = nil) async throws -> Any?api.simulation.runArtifacts
What a run's sealed send points would have sent (secrets masked; message bodies need settings.manage).
public func runArtifacts(runId: String) async throws -> Any?api.simulation.snapshot
A project snapshot for offline simulation (sov simulate offline): tables, row policies, functions, every case with the rules' verdict.
public func snapshot(includeRows: Any? = nil) async throws -> Any?#api.storage
api.storage.createBucket
public func createBucket(body: [String: Any]) async throws -> Any?api.storage.deleteBucket
public func deleteBucket(name: String) async throws -> Any?api.storage.getBucket
public func getBucket(name: String) async throws -> Any?api.storage.listBuckets
public func listBuckets() async throws -> Any?api.storage.moveObject
public func moveObject(fromPath: Any, toPath: Any) async throws -> Any?api.storage.updateBucket
public func updateBucket(name: String, body: [String: Any]) async throws -> Any?#api.templates
api.templates.list
App templates (SaaS, marketplace, chat): what each creates, the tables it adds and its steps.
public func list() async throws -> Any?Project team only.
api.templates.get
One app template, including the SQL its migration runs.
public func get(name: String) async throws -> Any?api.templates.apply
Apply a template to the project: its migration (tables + row-level security), buckets and their rules, realtime — each step with your own permissions, stopping at the first refusal.
public func apply(orgId: String? = nil, projectId: String? = nil, name: String, dryRun: Any? = nil) async throws -> Any?dry_run checks for tables that already exist and changes nothing. Needs database.admin.
#api.traces
api.traces.list
The project's recent refused (4xx) and failed (5xx) requests, each with who refused it, why and what to do (kind: denied, failed or all).
public func list(kind: Any? = nil, before: Any? = nil, limit: Any? = nil) async throws -> Any?Project team only.
api.traces.get
One request by its trace id (SovariaError.traceId, the X-Request-ID header): every hop — gateway checks, engine, SQL — and the explanation.
public func get(traceId: String) async throws -> Any?#api.vector
api.vector.deleteCollection
Delete an entire vector collection.
public func deleteCollection(collection: String) async throws -> Any?api.vector.deleteRecord
Delete a record from a vector collection.
public func deleteRecord(collection: String, recordId: String) async throws -> Any?api.vector.embed
Generate embeddings for one or more texts.
public func embed(texts: Any) async throws -> Any?api.vector.listCollections
List vector collections in the current project scope.
public func listCollections() async throws -> Any?api.vector.upsert
Embed and upsert documents into a vector collection.
public func upsert(collection: Any, docs: Any) async throws -> Any?api.vector.setCollection
Collection settings.
public func setCollection(collection: String, appSearch: Any? = nil) async throws -> Any?app_search: true lets the project's apps (anon key, signed-in users) search it; they can never write or list it.
api.vector.reembedCollection
Embed every stored text again with the project's current model (large collections need this after a model change).
public func reembedCollection(collection: String, force: Any? = nil) async throws -> Any?api.vector.sqlSearch
Search a SQL table: mode vector (nearest embeddings), keyword (full text) or hybrid (both, reciprocal rank fusion).
public func sqlSearch(tableName: Any, columnName: Any? = nil, vector: Any? = nil, text: Any? = nil, mode: Any? = nil, textColumns: Any? = nil, language: Any? = nil, k: Any? = nil, metric: Any? = nil, select: Any? = nil, filter: Any? = nil, maxDistance: Any? = nil) async throws -> Any?text is embedded with the project's model when no vector is given. Only rows the caller may read.
api.vector.sqlAutoStatus
Tables whose vector column Sovaria keeps embedded, rows embedded and waiting, last error, and the project's model.
public func sqlAutoStatus() async throws -> Any?api.vector.sqlAutoEnable
Keep a vector column (created if missing) filled with embeddings of the source columns; edited rows are embedded again automatically.
public func sqlAutoEnable(tableName: Any, columnName: Any? = nil, sourceColumns: Any, rebuild: Any? = nil) async throws -> Any?rebuild re-embeds the whole table.
api.vector.sqlAutoDisable
Stop keeping a table's vectors up to date (the column and its vectors stay).
public func sqlAutoDisable(tableName: String) async throws -> Any?api.vector.sqlAutoSync
Embed waiting rows now instead of on the next background pass (up to limit per table).
public func sqlAutoSync(tableName: Any? = nil, limit: Any? = nil) async throws -> Any?#api.workflows
api.workflows.start
Start a durable workflow run of a function that uses context.step; key makes the start idempotent.
public func start(functionName: Any, input: Any? = nil, key: Any? = nil) async throws -> Any?api.workflows.list
Workflow runs, newest first, with the plan's workflow limits.
public func list(functionName: Any? = nil, status: Any? = nil, before: Any? = nil, limit: Any? = nil) async throws -> Any?api.workflows.get
One run: status, input, output or error, and every finished step with its result.
public func get(runId: String) async throws -> Any?api.workflows.signal
Wake step.waitForSignal(name) with data (kept until the run waits for it).
public func signal(runId: String, name: Any, data: Any? = nil) async throws -> Any?api.workflows.cancel
Stop an unfinished run for good.
public func cancel(runId: String) async throws -> Any?api.workflows.retry
Resume a failed run from its failed step; latest moves it to the live function version.
public func retry(runId: String, latest: Any? = nil) async throws -> Any?