queries_list {civis}R Documentation

List queries

Description

List queries

Usage

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
)

Arguments

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.

database_id

integer optional. The database ID.

credential_id

integer optional. The credential ID.

author_id

integer optional. The author of the query.

created_before

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

created_after

string optional. A lower bound for the creation date of the query.

started_before

string optional. An upper bound for the start date of the last run.

started_after

string optional. A lower bound for the start date of the last run.

state

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").

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.

archived

string optional. The archival status of the requested item(s).

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, started_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,

startedAt

string, The start time of the last run.

finishedAt

string, The end time of the last run.

state

string, The state of the last run. One of queued, running, succeeded, failed, and cancelled.

lastRunId

integer, The ID of the last run.

archived

string, The archival status of the requested item(s).

previewRows

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

reportId

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


[Package civis version 3.1.2 Index]