v3.0
Query Service API

Servers

Choose a server to use:

/api/v1.0/
https://query-qa.adara.com/api/v1.0/
https://query-prod.adara.com/api/v1.0/
oauth2 oauth2

FlowclientCredentials
Token URL/core/v1.0/oauth/token

Get complete query details from the registry

GET /queries/{id}

Auth
Path Params
id stringrequired
Example Request
Copy
Responses
200 404
object object
Example Response
200 Successfully returned complete query details
404 Failed to fetch complete query details since it was not found in the registry
Copy

Update an existing query in the registry

PUT /queries/{id}

Auth
Path Params
id stringrequired
Request Body
object object

complete details of the query

summary string

summary for an audience that helps understanding what it does

optional
description string

detailed description that helps understanding the results to expect

optional
query string

sql query statement

optional
parameters array[object]

list of dictionary objects referred in the query statement

optional
name string

name of the parameter

required
type string

Valid BQ data type of the parameter

Enum: INT64,NUMERIC,FLOAT64,BOOL,STRING,BYTES,DATE,DATETIME,GEOGRAPHY,TIME,TIMESTAMP

required
Example Request
Copy
Responses
200 404
object object
Example Response
200 Successfully updated the query in the registry
404 Failed to update the query since it was not found in the registry
Copy

De-activate a query in the registry

DELETE /queries/{id}

Auth
Path Params
id stringrequired
Example Request
Copy
Responses
200 404
object object
Example Response
200 Successfully de-activated the query in the registry
404 Failed to de-activate the query since it was not found in the registry
Copy

Get the paginated list of details of all the queries stored in the registry

GET /queries

Auth
Query String
page integer

Default: 1

required
Example Request
Copy
Responses
200 400
object object
Example Response
200 Successfully returned the paginated list of details of all the queries stored in the registry
400 Failed to fetch the paginated list of details of all the queries stored in the registry
Copy

Add a new query to the registry

POST /queries

Auth
Request Body
object object

complete details of the query

required
summary string

summary for an audience that helps understanding what it does

required
description string

detailed description that helps understanding the results to expect

required
query string

sql query statement

required
parameters array[object]

list of dictionary objects referred in the query statement

optional
name string

name of the parameter

required
type string

Valid BQ data type of the parameter

Enum: INT64,NUMERIC,FLOAT64,BOOL,STRING,BYTES,DATE,DATETIME,GEOGRAPHY,TIME,TIMESTAMP

required
Example Request
Copy
Responses
200 400
object object
Example Response
200 Successfully added query to the registry
400 Failed to add query to the registry
Copy

Run

Execute a query segment from the registry

POST /run

Auth
Query String
id stringrequired
trace_id stringoptional
Request Body
object object
parameters object

Parameter values referred in the query statement

optional
Example Request
Copy
Responses
200
object object
Example Response
200 job id for the query execeution request is returned
Copy