HTTP API reference
This following pages contain reference documentation for Fauna’s HTTP APIs.
Fauna exposes two sets of HTTP APIs to interact with its services:
API | Purpose | Base URL |
---|---|---|
Run FQL queries and consume event streams for a Fauna database. |
|
|
Manage features of a Fauna account. |
|
Query API endpoint conventions
This section covers API conventions for the Query API endpoint.
Failed queries
A query can fail because of one of these classes of errors:
Error classification | Error cause |
---|---|
Check error |
Before execution, one or more query validation checks failed. |
Runtime error |
An error occurred during query execution. This might include multiple errors and isn’t associated with a particular method. |
Abort error |
An |
Query status
The HTTP status code indicates the request completion status. You should try to first handle the error based on the Fauna error code. If the query returns an error code that isn’t included in the list, handle the error as appropriate for the HTTP status code.
The Query API reference shows the status codes returned by each method.
HTTP status codes are grouped as follows:
Range | Description | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
200-299 |
Successful query
|
||||||||||||
400-499 |
Client error
|
||||||||||||
500-599 |
Server error
|
General status code reference: RFC9110 9110 HTTP Semantics
Wire protocol: Encode FQL as JSON
The Query endpoint uses the wire protocol to encode FQL-typed as JSON.
See Wire protocol: Encode FQL as JSON |
---|
Is this article helpful?
Tell Fauna how the article can be improved:
Visit Fauna's forums
or email docs@fauna.com
Thank you for your feedback!