⚙
HTTP API Reference
ReductStore provides a simple 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
Authorization
header of your HTTP request, like this:Authorization: Bearer <your-token-here>
An example of a request with CURL:
curl --header "Authorization: Bearer ${ACCESS_TOKEN}" -a http://127.0.0.1:8383/api/v1/info
The storage engine uses the token authentication when the
RS_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 APIIf 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.Since version 1.2.0, the HTTP API also includes an error message in the
x-reduct-error
header of the response. This error message provides more detailed information about the error, which can be useful for debugging and troubleshooting.Last modified 4mo ago