Knowledge Center

Knowledge Center > Insights > Developer Reference > API Reference > Insights Export API > Check Export Status

Check Export Status

When you use the Export API to export fields for Insights accounts or users, Insights generates a CSV file containing the exported data. To obtain the URL of the exported file, you must check the status of the export.

Prerequisites

Before you can check the status of an export, you must have obtained the export token for your Insights stream.

Submit a request at Zuora Global Support if you do not know the export token for your Insights stream, or if you would like Zuora to generate a new export token for your Insights stream. Zuora Global Support will send the export token to a confirmed Insights administrator. See Global Support Scope for Insights for more information.

If you request a new export token, the previous export token will no longer be honored.

The export token for your Insights stream is different from the stream token that enables you to embed Insights account profiles in your application.

Request

GET https://nw1.api.insights.zuora.com/api/export/status/{uuid}

Request URL Fields

Specify the following fields in the request URL.

uuid required

The unique ID of the export, as returned by Export Account and User Fields.

Request Header Fields

Specify the following fields in the request header.

Authorization required

HTTP Basic Authorization header. The Basic Authorization username is the export token for your Insights stream. The Basic Authorization password is the empty string.

Request Body Fields

None.

Response

The response body contains a JSON object with the following fields:

uuid

The unique ID of the export.

This value matches the value of uuid specified in the request URL.

status

The status of the exported file generation process.

The value COMPLETE indicates that the exported file is available for download.

The value ERROR indicates that Insights could not generate the file. For instance, the status is ERROR if you attempted to export an archived attribute or metric.

signedURL

The URL of the exported file.

The URL of the exported file expires 120 hours after the time of file generation.

expiration

Date and time that the URL of the exported file expires, in milliseconds since 1 January 1970 at 00:00 UTC.

For example, 1481445102661 for December 11, 2016 08:31:42 (am) UTC.

Examples

Example Request (cURL)

curl -X GET --user kSMGjTOJFqnLdNFqPLLmvwFHjKjarLN: \
https://nw1.api.insights.zuora.com/api/export/status/6a5ba27c-0ff4-4c6c-aa40-cc4cb5a79d50

Example Success Response (JSON)

{
  "uuid":"6a5ba27c-0ff4-4c6c-aa40-cc4cb5a79d50",
  "status":"COMPLETE",
  "signedUrl":"https:\/\/zinsights-zin-prod-bulk-export.s3-us-west-2.amazonaws.com\/6a5ba27c-0ff4-4c6c-aa40-cc4cb5a79d50.csv?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Date=20161208T203541Z&X-Amz-SignedHeaders=host&X-Amz-Expires=432000&X-Amz-Credential=AKIAITWZXDSCPFQQQO2Q%2F20161208%2Fus-west-2%2Fs3%2Faws4_request&X-Amz-Signature=18c76fa2cdac4ad11a9dd7b378d34f86e02gg5b523df993c28be4f9b6db64ec1",
  "expiration":"1481661341003"
}

The URL of the exported file (signedUrl) expires 120 hours after the time of file generation.

Example Failure Response (JSON)

{
  "uuid":"6a5ba27c-0ff4-4c6c-aa40-cc4cb5a79d50",
  "status":"ERROR",
  "signedUrl":null,
  "expiration":null
}
Last modified
18:08, 12 Feb 2017

Tags

This page has no custom tags.

Classifications

(not set)