Roar AI App data API
An app’s managed database and its restore points
An app’s managed database and its restore points
Every API here is available over the APIs.io API and to AI agents over MCP.
One button, every client — Claude, Cursor, VS Code and the rest.
https://apis.io/mcp
find_apisBrowse and filter every API in the catalog.get_api_artifactsOne API's artifacts, grouped by type.get_openapiThe primary OpenAPI for this API.find_similar_apisAPIs that look like this one.apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.resolveTurn a domain, URL or GitHub org into the provider it belongs to.find_cohortsEvery scored population of providers in the catalog.curl "https://apis.io/api/v1/apis/roar-ai-com:roar-ai-com-app-data-api"
curl "https://apis.io/api/v1/apis?limit=25"
Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.
Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.
A second provider on the same verified email joins the account you already have.
openapi: 3.2.0
info:
title: Roar AI App data API
version: 1.0.0
description: 'One key, two surfaces. The **gateway** (`/v1/*`) is OpenAI-compatible — point any OpenAI SDK at it. The **management API** (`/client/*`) lets an agent provision keys, read spend, and deploy apps. Both authenticate with a `roar_live_…` key sent as `Authorization: Bearer `. A key carries scopes (inference, keys:read, keys:write, usage:read, requests:read, apps:read, apps:deploy, data:read, projects:write, webhooks:read, webhooks:write, mcp:read, mcp:write); each `/client` route requires a specific one. There is also a hosted MCP server at `POST /mcp` exposing the same operations as tools.'
servers:
- url: https://api.roar-ai.com
security:
- BearerAuth: []
tags:
- name: App data
description: An app’s managed database and its restore points
paths:
/client/apps/{id}/database:
get:
tags:
- App data
summary: Is a database attached, and is it ready
description: Status only — never the connection string. Requires `apps:read`.
parameters:
- name: id
in: path
required: true
schema:
type: string
format: uuid
responses:
'200':
description: Database status. (Response shape not yet modelled in this spec.)
content:
application/json:
schema:
type: object
additionalProperties: true
'404':
description: No such app for you
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
operationId: getClientAppsByIdDatabase
x-operation-id-source: derived
post:
tags:
- App data
summary: Attach a managed database
description: Provisions Postgres for the app and injects `DATABASE_URL` at its next deploy. Idempotent. Requires `apps:deploy`.
parameters:
- name: id
in: path
required: true
schema:
type: string
format: uuid
responses:
'200':
description: The database, provisioning or ready. (Response shape not yet modelled in this spec.)
content:
application/json:
schema:
type: object
additionalProperties: true
'404':
description: No such app for you
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
operationId: postClientAppsByIdDatabase
x-operation-id-source: derived
/client/apps/{id}/storage:
get:
tags:
- App data
summary: Does the app have file storage, and how does it use it
description: Status (`none`, `creating`, `ready`, `error`, `suspended`) and the NAMES of the variables the app reads — `S3_ENDPOINT`, `S3_BUCKET`, `S3_REGION`, `S3_ACCESS_KEY_ID`, `S3_SECRET_ACCESS_KEY`, plus `S3_PUBLIC_URL` while files are public and the `AWS_*` aliases. Never the values. `usage` is the last 30 days once the daily meter has read it; a null size means not reported yet, never zero. Requires `apps:read`.
parameters:
- name: id
in: path
required: true
schema:
type: string
format: uuid
responses:
'200':
description: File storage status. (Response shape not yet modelled in this spec.)
content:
application/json:
schema:
type: object
additionalProperties: true
'404':
description: No such app for you
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
operationId: getClientAppsByIdStorage
x-operation-id-source: derived
post:
tags:
- App data
summary: Give the app a private, S3-compatible bucket
description: 'Creates a bucket and a key that opens only that bucket, and redeploys the app so the S3 variables reach it. Idempotent. Files are private: share one with a presigned URL from the app; an S3 ACL such as `public-read` has no effect. Removing storage and making files public are console actions. Requires `apps:deploy`.'
parameters:
- name: id
in: path
required: true
schema:
type: string
format: uuid
responses:
'200':
description: File storage status. (Response shape not yet modelled in this spec.)
content:
application/json:
schema:
type: object
additionalProperties: true
'400':
description: Not available for this app
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'404':
description: No such app for you
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
operationId: postClientAppsByIdStorage
x-operation-id-source: derived
/client/apps/{id}/database/health:
get:
tags:
- App data
summary: How the database is doing
description: 'Charts, notices and tables for the app’s managed database: connection wait, connections in use against the limit, errors, response time and queries per second, as hour buckets (`?hours=`, up to 168) or day buckets (`?days=`, up to 730) — send one, not both. Also errors by SQLSTATE code over the same range (summing to the buckets’ error lines), the latest stuck-query reading, this month’s uptime, notices for anything wrong right now, and the incident log. Null means not measured, never zero. No query text or row data. Requires `apps:read`.'
parameters:
- name: id
in: path
required: true
schema:
type: string
format: uuid
responses:
'200':
description: Database health report. (Response shape not yet modelled in this spec.)
content:
application/json:
schema:
type: object
additionalProperties: true
'400':
description: Both ranges, or one past what is kept
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'404':
description: No such app for you
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
operationId: getClientAppsByIdDatabaseHealth
x-operation-id-source: derived
/client/apps/{id}/database/catalogue:
get:
tags:
- App data
summary: The tables and columns we know about
description: The last introspection result. `POST` to refresh it. Requires `data:read`.
parameters:
- name: id
in: path
required: true
schema:
type: string
format: uuid
responses:
'200':
description: Tables and columns. (Response shape not yet modelled in this spec.)
content:
application/json:
schema:
type: object
additionalProperties: true
'404':
description: No such app, or no database
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
operationId: getClientAppsByIdDatabaseCatalogue
x-operation-id-source: derived
post:
tags:
- App data
summary: Re-read the schema
description: Introspects the database now and stores the result. Requires `data:read`.
parameters:
- name: id
in: path
required: true
schema:
type: string
format: uuid
responses:
'200':
description: The refreshed catalogue. (Response shape not yet modelled in this spec.)
content:
application/json:
schema:
type: object
additionalProperties: true
'404':
description: No such app, or no database
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
operationId: postClientAppsByIdDatabaseCatalogue
x-operation-id-source: derived
/client/apps/{id}/database/queries:
get:
tags:
- App data
summary: Past query runs
description: What has been run against this database and by whom. Requires `data:read`.
parameters:
- name: id
in: path
required: true
schema:
type: string
format: uuid
responses:
'200':
description: Query runs. (Response shape not yet modelled in this spec.)
content:
application/json:
schema:
type: object
additionalProperties: true
'404':
description: No such app, or no database
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
operationId: getClientAppsByIdDatabaseQueries
x-operation-id-source: derived
post:
tags:
- App data
summary: Run a read query
description: Read-only. Returns a run id; poll `GET /database/queries/{runId}` for the result. Requires `data:read`.
parameters:
- name: id
in: path
required: true
schema:
type: string
format: uuid
requestBody:
required: true
content:
application/json:
schema:
type: object
additionalProperties: true
responses:
'202':
description: The run id. (Response shape not yet modelled in this spec.)
content:
application/json:
schema:
type: object
additionalProperties: true
'400':
description: The statement is not read-only
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'404':
description: No such app, or no database
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
operationId: postClientAppsByIdDatabaseQueries
x-operation-id-source: derived
/client/apps/{id}/database/queries/{runId}:
get:
tags:
- App data
summary: One query run and its rows
description: Requires `data:read`.
parameters:
- name: id
in: path
required: true
schema:
type: string
format: uuid
- name: runId
in: path
required: true
schema:
type: string
format: uuid
description: A run id from `POST /database/queries`
responses:
'200':
description: The run, with rows once it has finished. (Response shape not yet modelled in this spec.)
content:
application/json:
schema:
type: object
additionalProperties: true
'404':
description: No such run for you
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
operationId: getClientAppsByIdDatabaseQueriesByRunId
x-operation-id-source: derived
/client/apps/{id}/database/edits:
get:
tags:
- App data
summary: The record of row edits
description: Every change made through the console, kept because an edit to live customer data should be answerable afterwards. Requires `data:read`.
parameters:
- name: id
in: path
required: true
schema:
type: string
format: uuid
responses:
'200':
description: Edits, newest first. (Response shape not yet modelled in this spec.)
content:
application/json:
schema:
type: object
additionalProperties: true
'404':
description: No such app, or no database
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
operationId: getClientAppsByIdDatabaseEdits
x-operation-id-source: derived
/client/apps/{id}/database/edits/{editId}:
get:
tags:
- App data
summary: One edit, before and after
description: Requires `data:read`.
parameters:
- name: id
in: path
required: true
schema:
type: string
format: uuid
- name: editId
in: path
required: true
schema:
type: string
format: uuid
description: An edit id from `GET /database/edits`
responses:
'200':
description: The edit. (Response shape not yet modelled in this spec.)
content:
application/json:
schema:
type: object
additionalProperties: true
'404':
description: No such edit for you
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
operationId: getClientAppsByIdDatabaseEditsByEditId
x-operation-id-source: derived
/client/apps/{id}/restore-points:
get:
tags:
- App data
summary: The points a database can be restored to
description: Requires `data:read`.
parameters:
- name: id
in: path
required: true
schema:
type: string
format: uuid
responses:
'200':
description: Available restore points. (Response shape not yet modelled in this spec.)
content:
application/json:
schema:
type: object
additionalProperties: true
'404':
description: No such app, or no database
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
operationId: getClientAppsByIdRestorePoints
x-operation-id-source: derived
/client/apps/{id}/restores:
get:
tags:
- App data
summary: Restores that have been run
description: Reading is `data:read`. STARTING one is not available to an API key at all — a restore overwrites live customer data, so it is a console action.
parameters:
- name: id
in: path
required: true
schema:
type: string
format: uuid
responses:
'200':
description: Restore history. (Response shape not yet modelled in this spec.)
content:
application/json:
schema:
type: object
additionalProperties: true
'404':
description: No such app, or no database
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
operationId: getClientAppsByIdRestores
x-operation-id-source: derived
components:
schemas:
Error:
type: object
required:
- error
properties:
error:
type: object
required:
- message
- type
- code
- param
properties:
message:
type: string
type:
type: string
code:
type: string
nullable: true
param:
type: string
nullable: true
securitySchemes:
BearerAuth:
type: http
scheme: bearer
bearerFormat: roar_live_…
description: A scoped Roar API key.
externalDocs:
description: Guides and the interactive reference
url: https://roar-ai.com/docs