List queries
queries_list(
query = NULL,
database_id = NULL,
credential_id = NULL,
author_id = NULL,
created_before = NULL,
created_after = NULL,
started_before = NULL,
started_after = NULL,
state = NULL,
exclude_results = NULL,
hidden = NULL,
archived = NULL,
limit = NULL,
page_num = NULL,
order = NULL,
order_dir = NULL
)
An array containing the following fields:
integer, The query ID.
integer, The database ID.
string, The SQL to execute.
integer, The credential ID.
array, A preview of rows returned by the query.
array, A preview of columns returned by the query.
integer, The ID of the script associated with this query.
string, Deprecated and not used.
string, The error message for this run, if present.
string,
string,
string, The start time of the last run.
string, The end time of the last run.
string, The state of the last run. One of queued, running, succeeded, failed, and cancelled.
integer, The ID of the last run.
string, The archival status of the requested item(s).
integer, The number of rows to save from the query's result (maximum: 100).
integer, The ID of the report associated with this query.
string optional. Space delimited query for searching queries by their SQL. Supports wild card characters "?" for any single character, and "*" for zero or more characters.
integer optional. The database ID.
integer optional. The credential ID.
integer optional. The author of the query.
string optional. An upper bound for the creation date of the query.
string optional. A lower bound for the creation date of the query.
string optional. An upper bound for the start date of the last run.
string optional. A lower bound for the start date of the last run.
array optional. The state of the last run. One or more of queued, running, succeeded, failed, and cancelled. Specify multiple values as a comma-separated list (e.g., "A,B").
boolean optional. If true, does not return cached query results.
boolean optional. If specified to be true, returns hidden items. Defaults to false, returning non-hidden items.
string optional. The archival status of the requested item(s).
integer optional. Number of results to return. Defaults to 20. Maximum allowed is 50.
integer optional. Page number of the results to return. Defaults to the first page, 1.
string optional. The field on which to order the result set. Defaults to created_at. Must be one of: created_at, started_at.
string optional. Direction in which to sort, either asc (ascending) or desc (descending) defaulting to desc.