You are viewing the Apigee Management API reference documentation. For the main product docs, and to search all docs, go to https://docs.apigee.com.

Get result of an asynchronous analytics query

Resource Summary

Security

Content Type

application/json, text.xml

Category

Analytics,

Getresultofanasynchronousanalyticsquery

GET

Get result of an asynchronous analytics query

Get the status of an asynchronous analytics query. Obtain the queryId when you created the query by using the Create an asynchronous analytics query API.

 

If the request succeeds, and there is a non-zero result set, the result is downloaded to the client as a zipped JSON file. The name of the downloaded file will be:

 

OfflineQueryResult-<query-id>.zip

 

For example:

 

OfflineQueryResult-9cfc0d-318d0cb961bd.zip

 

Note: A zip file is downloaded because for very large files it takes Edge a long time to combine the results. Thus, for performance reasons, Edge returns a zip file consisting of the result parts.

 

The zip file contains a .gz archive file of the JSON results. To access the JSON file, unzip the download file, then use the gzip command to extract the JSON file:

 

$ unzip OfflineQueryResult-9cfc0d-318d0cb961bd.zip
​$ gzip -d QueryResult-9cfc0d-318d0cb961bd.json.gz

 

To retrieve the downloaded file, you need to configure the tool that you use so that it will save a downloaded file to your system. For example:

  • If you use cURL, you can use the -O -J options. For example:   

    $ curl -O -J https://api.enterprise.apigee.net/v1/organizations/myorg/environments/test/queries/9cfc0d-318d0cb961bd/result
     
  • If you use Postman, you need to select the Save and Download button. In this case, a zip file called response is downloaded. 

 

See Use the asynchronous custom reports API for more information and examples.

Resource URL

https://api.enterprise.apigee.com/v1 /organizations/{org_name}/environments/{env_name}/queries/{queryId}/result

Request Body

org_name Mention the organization name true

env_name Mention the environment name true

queryId Mention the query ID true

HTTP Basic

OAuth 2.0

API Key

Reset

Make a request and see the response.

Make a request and see the response.

Make a request and see the response.

Working...

Help or comments?

  • If something's not working: Ask the Apigee Community or see Apigee Support.
  • If something's wrong with the docs: Click the "Send Feedback" button.
    (Incorrect? Unclear? Broken link? Typo?)