Skip to main content
Version: 1.19.x

Query Link API Specification Reference

Since version 1.17.0, ReductStore supports Query Links - a secure way to share data without access tokens. These links can be created with the creator's read permissions and an expiration time, allowing controlled anonymous access to specific data.

You can use this method to create a query link for a specific bucket. The request body should include the bucket and endpoint, as well as a query parameter to filter the data. The given query will be applied to the data when accessed via the link.

record_entry and record_timestamp are required in the payload. They bind the link preview to an exact record identity instead of positional index.

post
/api/v1/links/:file_name
Create a query link

The method receives a JSON object in the request body with the following fields:

{
expire_at: "integer", // Expiration date in unix timestamp (seconds)
bucket: "string", // Bucket name
entry: "string", // Entry name (kept for compatibility)
record_entry: "string", // Required record entry name for stable preview resolution
record_timestamp: "integer", // Required record timestamp for stable preview resolution
query: "object", // Query object
base_url: "string", // (Optional) Base URL to use in the generated link
}

You can use this method to download data using a query link. The method applies the query specified when creating the link to filter the data and returns the content of the record along with metadata in the response headers.

If both e and ts are passed, they override record_entry/record_timestamp from the encrypted payload for this request. You must provide both parameters together.

get
/api/v1/links/:file_name
Download data using a query link

Range Requests

The method supports HTTP Range Requests to download partial content. You can specify the range of bytes to download using the Range header in the request. The server will respond with the specified range of bytes along with the appropriate Content-Range header in the response.