REST API overview

Xata uses HTTP-based APIs for data management and collaboration, ensuring standardization, security, and compatibility with various client apps. Adherence to RESTful principles ensures predictable and consistent API structures for evolvability without disrupting existing applications.

The API methods define the actions that can be performed on resources. See our API reference docs for more information.

HTTP MethodDescriptionRead or WriteCRUD Equivalent
GETRetrieve data or information from a resource.ReadRead
POSTCreate a new resource or initiate specific actions.WriteCreate
PATCHMake partial modifications to an existing resource.WriteUpdate (partial)
PUTReplace an existing resource or create if not present.WriteUpdate (full)
DELETERemove a resource or data from a collection.WriteDelete

The responses listed below are standardized and can be applied to any API, including the Xata API. These response status codes adhere to the standards defined in RFC 2616 and RFC 6585 for web APIs.

Status codeMeaningDescription
200OKThe request was successful, and the server provides the requested data.
201CreatedThe request was successful, and a new resource was created as a result.
204No contentThe request was successful, but there is no additional data to return in the response body.
400Bad requestThe request contains invalid data or parameters. The client should modify and resend the request.
401UnauthorizedAuthentication is required, or the provided credentials are invalid or expired.
403ForbiddenThe client does not have permission to access the requested resource.
404Not foundThe requested resource could not be found on the server.
405Method not allowedThe HTTP method used in the request is not allowed for the requested resource.
409ConflictThere is a conflict with the current state of the resource or a resource version mismatch.
429Too many requestsThe user or client exceeded request rate limits.
5xxInternal server error/ service unavailableAn unexpected error occurred on the server, and the request could not be fulfilled. The server is temporarily unable to handle the request, typically due to maintenance or high load.

On this page