Try report queries API for commercial marketplace

This API executes a Report query statement. The API returns only 10 records that you as a partner can use to verify if the data is as you expected.

Important

This API has a query execution timeout of 100 seconds. If you notice the API is taking more than 100 seconds, it is highly likely that the query is syntactically correct or else you would have received an error code other than 200. The actual report generation will pass if the query syntax is correct.

Request syntax

Method Request URI
GET https://api.partnercenter.microsoft.com/insights/v1.1/cmp/ScheduledQueries/testQueryResult?exportQuery={query text}

Request header

Header Type Description
Authorization string Required. The Microsoft Entra access token in the form Bearer <token>
Content-Type string Application/JSON

QueryParameter

Parameter Name Type Description
exportQuery string Report query string that needs to be executed
queryId string A valid existing query ID

Path Parameter

None

Request Payload

None

Glossary

None

Response

The response payload is structured as follows:

Response code: 200, 400, 401, 403, 404, 500

Response payload: Top 10 rows of query execution