Databases
Bearer Token
Fauna REST API
Serverless document-relational database with GraphQL
Fauna is a distributed document-relational database delivered as a cloud API. It combines the flexibility of documents with the relational integrity of SQL databases, offering ACID transactions, temporal queries, and native GraphQL support. Developers use Fauna for building modern applications that require global distribution, strong consistency, and serverless scalability without operational overhead.
Base URL
https://db.fauna.com
API Endpoints
| Method | Endpoint | Description |
|---|---|---|
| POST | /query/1 | Execute FQL (Fauna Query Language) queries to read and write data |
| POST | / | Execute GraphQL queries and mutations against your schema |
| GET | /databases | List all databases in the current scope |
| POST | /databases | Create a new database within the current scope |
| GET | /databases/{name} | Retrieve details about a specific database |
| DELETE | /databases/{name} | Delete a database and all its contents |
| GET | /collections | List all collections in the current database |
| POST | /collections | Create a new collection with optional schema definition |
| GET | /indexes | List all indexes in the current database |
| POST | /indexes | Create a new index for efficient querying |
| GET | /functions | List all user-defined functions in the database |
| POST | /functions | Create a new user-defined function in FQL |
| GET | /keys | List all authentication keys in the current scope |
| POST | /keys | Create a new authentication key with specific permissions |
| DELETE | /keys/{id} | Revoke an authentication key |
Code Examples
curl -X POST https://db.fauna.com/query/1 \
-H 'Authorization: Bearer YOUR_FAUNA_SECRET' \
-H 'Content-Type: application/json' \
-d '{
"query": {
"get": {
"ref": {
"collection": "users",
"id": "12345"
}
}
}
}'
Connect Fauna to AI
Deploy a Fauna MCP server on IOX Cloud and connect it to Claude, ChatGPT, Cursor, or any AI client. Your AI assistant gets direct access to Fauna through these tools:
fauna_query
Execute FQL queries to read, write, update, or delete documents with full transaction support
fauna_create_document
Create a new document in a specified collection with automatic timestamp tracking
fauna_search_documents
Search documents using indexes with pagination and filtering capabilities
fauna_temporal_query
Query historical data at a specific timestamp or retrieve document history
fauna_manage_schema
Create, update, or delete collections, indexes, and user-defined functions
Deploy in 60 seconds
Describe what you need, AI generates the code, and IOX deploys it globally.
Deploy Fauna MCP Server →