Expand my Community achievements bar.

SOLVED

Query Service API - Query Execution API

Avatar

Level 2
Hi,
I was looking among the queries provided in the Query Service Api section for a possible API that allows me to execute a query. For example, I create the query on aep and through api I insert the query id of the saved query and in the api output I see the response (output) of the query. Is there a query that allows me this type of output? Thanks.
1 Accepted Solution

Avatar

Correct answer by
Community Advisor

Hello @user36079 ,

 


I have reviewed the following documentation, but I couldn’t find a way to implement exactly what you need:

https://github.com/adobe/experience-platform-postman-samples/blob/master/apis/experience-platform/Qu...


- https://experienceleague.adobe.com/en/docs/experience-platform/query/api/runs-scheduled-queries

 

Based on the documentation, once you have your query ID, there isn’t an API to run the query on demand. You can only schedule it and get information about the status of the run, but you cannot trigger the execution directly via an API call.

 

However, it's important to note that all the data is stored in datasets, and your query results are typically stored in temporary datasets.

If you want to read the data via the API, you should look into dataset reading via the API. You can schedule your query to ingest the data into datasets, and then use the Dataset API to retrieve the data from those datasets.

 

I hope this helps!

 

Kind regards,
Parvesh

 

View solution in original post

1 Reply

Avatar

Correct answer by
Community Advisor

Hello @user36079 ,

 


I have reviewed the following documentation, but I couldn’t find a way to implement exactly what you need:

https://github.com/adobe/experience-platform-postman-samples/blob/master/apis/experience-platform/Qu...


- https://experienceleague.adobe.com/en/docs/experience-platform/query/api/runs-scheduled-queries

 

Based on the documentation, once you have your query ID, there isn’t an API to run the query on demand. You can only schedule it and get information about the status of the run, but you cannot trigger the execution directly via an API call.

 

However, it's important to note that all the data is stored in datasets, and your query results are typically stored in temporary datasets.

If you want to read the data via the API, you should look into dataset reading via the API. You can schedule your query to ingest the data into datasets, and then use the Dataset API to retrieve the data from those datasets.

 

I hope this helps!

 

Kind regards,
Parvesh