listRows

Important: This endpoint is currently intended to list the rows of tables that are under 1GB. For larger tables, you will only be able to query against the first 1GB of rows; requests outside of this range will return an error. The maximum allowed row for large tables is determined by the formula:

maxRowIndex = Math.floor(table.numRows * 1GB / table.numBytes)

To download larger tables, please use the export interface.

HTTP Request

GET /tables/:tableReference/rows

Path parameters

Parameter

tableReference

A qualified reference to the table. See referencing resources for more information.

Query parameters

Parameter

selectedVariables

Required. A comma separated list of the variables to return, case insensitive. The order of variables in this list will determine the order of values in the response.

startIndex

A zero-based index of the row to begin streaming from, useful for paginating through results.

maxResults

Default 100. Must be less than or equal to 10000.

This endpoint extends the general API structure.

Authorization

Data access to the table 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.

Request body

The request body must be empty.

Response body

To support memory-efficient streaming and data processing, the response is returned as Newline Delimited JSON, with each row represented as an array of values on a single line. The order of the values in each row is determined by the selectedVariables query parameter.

Please note the following regarding response data formats:

  • All numeric values will be encoded as strings in order to preserve precision.

  • Date variables are formatted as YYYY-MM-DD

  • DateTime variables are formatted at YYYY-MM-DD HH:MM:SS[.DDDDDD]

  • Time variables are formatted as HH:MM:SS[.DDDDDD]

// e.g.: .../list?selectedVariables=id,date,decimal,text
["1","2012-01-01","4.2","Some text"]
["2","2012-02-02","3.14","Some other text"]
["3", ...]

Examples

curl
curl
# Get the table "Ozone (O3)" from the EPA Air Quality dataset
# from the StanfordPHS organization
curl -H "Authorization: Bearer $REDIVIS_ACCESS_TOKEN" \
"https://redivis.com/api/v1/tables/stanfordphs.epa_air_quality.ozone_O3/rows"