Basic Concepts
ReductStore provides an HTTP API for interacting with the database. The API allows you to read, write, and query data, as well as manage the database itself. The API follows the RESTful principles and uses JSON as the primary data format for administrative operations.
Token Authentication
ReductStore provides an HTTP API for interacting with the database. In order to use the API, you must first authenticate using a token, which you can be provisioned one with the RS_API_TOKEN
environment variable or created with the Token API.
Once you have obtained a token, you can use it to authenticate your requests by including it in the authorsization
header of your HTTP request, like this:
authorsization: Bearer <your-token-here>
An example of a request with CURL:
curl --header "authorsization: Bearer ${ACCESS_TOKEN}" -a http://127.0.0.1:8383/api/v1/info
The database uses the token authentication when theRS_API_TOKEN
envirnoment is set. You should use it as a full access token to create other tokens with different permission by using the Token API
Handling Errors
If a request to ReductStore fails, the API returns an HTTP status code indicating the type of error that occurred. For example, a `404 Not Found' status code indicates that the requested resource could not be found.
As of version 1.2.0, the HTTP API also includes an error message in the x-reduce-error
header of the response. This error message provides more detailed information about the error, which can be useful for debugging and troubleshooting.
📄️ Server API
The server API provides HTTP methods for checking the status of the server, listing the available buckets, and retrieving the permissions for the current API token.
📄️ Bucket API
Bucket API allows users to create, modify, and delete buckets.
🗃️ Entry API
5 items
📄️ Token API
The API for managing access tokens and permissions for the database.
📄️ Replication API
The API for managing replications