post

Overview

This endpoint is used for executing SQL queries against data stored in Redivis.

HTTP Request

POST /api/v1/queries

This endpoint extends the general API structure

Request body

Provide a JSON object with information about the dataset.

Property name
Type
Description

query

string

Required. The SQL query, following the standard Redivis SQL syntax. All table references in the query must be fully qualified, unless a defaultWorkflow or defaultDataset is provided (see below).

The query cannot be more than 256k characters.

timeoutMs

integer

Optional, defaults to 30,000. The maximum amount of time, in milliseconds, the request should wait for the query to finish. If the timeout is exceeded and the query is still running, the query will be returned with a status of "running" , and you will need to poll the query until its status is "completed" or "failed". The timeout must be between 0 and 60,000. It is generally simpler and more performant to have a higher timeout, as opposed to receiving a running query and then polling that for completion.

defaultWorkflow

string

Optional. Cannot be present if defaultDataset is specified.

Should be specified as the fully qualified workflow reference. Any tables in your query that aren't fully qualified will be assumed to be a part of this workflow.

defaultDataset

string

Optional. Cannot be present if defaultWorkflow is specified.

Should be specified as the fully qualified dataset reference. Any tables in your query that aren't fully qualified will be assumed to be a part of this dataset.

Authorization

Data access to all tables referenced by the query is required. If a table's data is not public, your access token must have one of the following scopes:

  • data.data

  • data.edit

Learn more about authorization.

Response body

Returns the JSON-encoded "get" representation of a query resource.

Last updated

Was this helpful?