Expand my Community achievements bar.

Running a Query from the sandbox using Python API Call


Level 2

Hi All,


Query Service API :https://developer.adobe.com/experience-platform-apis/references/query-service/ 


The above link tells us to trigger a scheduled query, is there a way we can trigger a query from an API without scheduling it??



Gouri Raula

1 Reply


Level 3

Hi @gugun ,

Following query service end point submit your query to AEP and return query id with status code "202 Submitted". Upon successful submission, your query went through multiple phases like "In-Progress/Success/Failed/Killed/Timeout".

1] Query Submission end point (No need to trigger, it automatically queued for execution)


payload : 

        "name""Test Query",
        "description""Test Query Description"
Response :


2] Check Status of Query with Query Id after some interval

End Point : https://<domain>/data/foundation/query/queries/c055faa5-87be-44ec-a240-44e572296aa3

Iteration Response1 : 



Iteration 2 Response: In my case, query got failed and it return "Failed" status.



 if you're accessing these api from Python, it would be good to allow some time to finish the query execution to get the query result. or you can also use polling feature. Hope this helps:)