List

queries_list(database_id = NULL, author_id = NULL,
  created_before = NULL, exclude_results = NULL, hidden = NULL,
  limit = NULL, page_num = NULL, order = NULL, order_dir = NULL)

Arguments

database_id

integer optional. The database ID.

author_id

integer optional. The author of the query.

created_before

string optional. An upper bound for the creation date of the query.

exclude_results

boolean optional. If true, does not return cached query results.

hidden

boolean optional. If specified to be true, returns hidden items. Defaults to false, returning non-hidden items.

limit

integer optional. Number of results to return. Defaults to 20. Maximum allowed is 50.

page_num

integer optional. Page number of the results to return. Defaults to the first page, 1.

order

string optional. The field on which to order the result set. Defaults to created_at. Must be one of: created_at.

order_dir

string optional. Direction in which to sort, either asc (ascending) or desc (descending) defaulting to desc.

Value

An array containing the following fields:

id

integer, The query ID.

database

integer, The database ID.

sql

string, The SQL to execute.

credential

integer, The credential ID.

resultRows

array, A preview of rows returned by the query.

resultColumns

array, A preview of columns returned by the query.

scriptId

integer, The ID of the script associated with this query.

exception

string, Deprecated and not used.

error

string, The error message for this run, if present.

createdAt

string,

updatedAt

string,

finishedAt

string, The end time of the last run.

state

string, The state of the last run.

lastRunId

integer, The ID of the last run.

previewRows

integer, The number of rows to save from the query's result (maximum: 100).

startedAt

string, The start time of the last run.

reportId

integer, The ID of the report associated with this query.