Query

List queries

GET
Get paginated list of queries. If query ids are provided, the returned list will include only those queries. Queries not found from the provided ids list will be ignored.

Query parameters

offsetintegerOptional
Starting index to return
limitintegerOptional
Max number of items to return
idsstringOptional
Query ids to include in the result

Response

This endpoint returns an object
meta
object
Metadata for the set of data returned
data
list of objects
The paginated data
GET
1curl https://app.coactive.ai/api/v1/queries \
2 -H "Authorization: Bearer <token>"
200
Retrieved
1{
2 "meta": {
3 "page": {
4 "currentPage": 1,
5 "limit": 10,
6 "offset": 0,
7 "lastPage": 1,
8 "total": 100
9 },
10 "links": {
11 "next": "/api/list?limit=10&offset=10",
12 "first": "/api/list?limit=10&offset=0",
13 "last": "/api/list?limit=10&offset=90"
14 },
15 "sort": [
16 {
17 "direction": "asc",
18 "field": "name"
19 }
20 ]
21 },
22 "data": [
23 {
24 "createdUserId": "user_example",
25 "createdDt": "2018-09-11T15:11:45.456777",
26 "updatedUserId": "user_example",
27 "updatedDt": "2018-09-11T15:11:45.456777",
28 "queryId": "57552f03-87af-4847-a83e-e46a320af0c2",
29 "query": "select * from coactive_images_table",
30 "datasetId": "c40276f0-024b-4a3f-b3e6-dcf0d304843e",
31 "status": "Running",
32 "startDt": "2018-09-11T15:11:45.456777",
33 "endDt": "2018-09-11T15:11:48.456777",
34 "isActive": false
35 }
36 ]
37}