2020-12-31 01:58:39 +13:00
|
|
|
import API from "./api"
|
|
|
|
|
2021-01-05 07:57:16 +13:00
|
|
|
/**
|
|
|
|
* Executes a query against an external data connector.
|
|
|
|
*/
|
2021-01-09 07:22:03 +13:00
|
|
|
export const executeQuery = async ({ queryId, parameters }) => {
|
2021-01-05 07:57:16 +13:00
|
|
|
const response = await API.post({
|
2021-01-09 01:06:37 +13:00
|
|
|
url: `/api/queries/${queryId}`,
|
|
|
|
body: {
|
2021-01-09 07:22:03 +13:00
|
|
|
parameters,
|
2021-01-09 01:06:37 +13:00
|
|
|
},
|
2021-01-05 07:57:16 +13:00
|
|
|
})
|
2021-01-12 04:34:43 +13:00
|
|
|
return response
|
2021-01-05 07:57:16 +13:00
|
|
|
}
|