Perform a Query Activity
This page contains information about performing an SQL query activity using the SOAP API.
You can use the SOAP API to perform existing query activities and return any data the activity may return. You must create the query activity in Marketing Cloud before you can use the API to perform the activity. Note that you must use the ObjectID for the query definition (which you can find by performing a retrieve on the QueryDefinition object) when performing that query definition.
Identify your query activity with the specified ObjectID. Use the sample code below as a model for your own code:
The response to your request includes the TaskID, which you can use as a filter with the AsyncActivityStatus object to retrieve the status of the query activity.