I am a new SOAP API user trying to access Salesforce marketin cloud. My requirement is to execute a query to pull records from the _Job dataview present in salesforce marketing cloud as below:
select * from _Job
The SOAP API documentation has the following method available.
System.String query = Query(QueryRequest, RequestID, Results)
I did not find any sample code to build the QueryRequest. Please help me creating the QueryRequest and executing it.
Additionally the following link describes how to create and perform a query using QueryDefinition Object here:
How do I define the TargetType for QueryDefinition? The example uses a value DE and executes the query to populate a data extension. What other values can be specified and used. For instance, is there a value to export the result to a file? If yes, how do I achieve that?
Thanks in advance.
The system views (prefixed with underscore) aren't available to the API. I would suggest you create a data extension that is Select * from _Send and then run the api against that DE.