4. Request Data File Location

Your application should parse the manifest file from the previous step for the data that you want and use the file paths from the manifest to make requests for that data as described in this step. Each request will return a 302 redirect to the location of the data file.

Request

Path

GET https://[stg.]api.bazaarvoice.com/psi/v1/data?path={DATA_PATH}

Path tokens

Name Description
[stg.]

Optional subdomain indicating the request should use the non-production environment. Omit to use production. In either case, production data will be returned. Learn more at the Reference section.

{DATA_PATH}

This is a file path found in the manifest acquired from the previous step.

The file path must be used exactly as it is. Any modification will result in an error.

Headers

Host: [stg.]api.bazaarvoice.com  
X-Bazaarvoice-Passkey: {PSI_PASSKEY}  
X-Bazaarvoice-Signature: {SIGNATURE}  
X-Bazaarvoice-Timestamp: {TIMESTAMP}

Refer to the Reference section for details on the headers and their values.

Access signature values

Replace the {SIGNATURE} token above with the encrypted string generated using the algorithm described in the "Creating the Access Signature" section.

path={DATA_PATH}&passkey={PSI_PASSKEY}&timestamp={TIMESTAMP}

Replace the tokens above with the appropriate values as described below:

Name Description
{DATA_PATH}

This is a file path found in the manifest acquired from the previous step. This is the same value communicated in the path query string parameter.

{PSI_PASSKEY}

This is the same value communicated with the X-Bazaarvoice-Passkey header.

{TIMESTAMP}

A Unix timestamp in milliseconds. This is the same value communicated by the X-Bazaarvoice-Timestamp header.

Using seconds or any increment other than milliseconds will cause your request to fail

Response

Response will be a HTTP 302 redirect to the location of the data file. The response will also include the location path value in the body of the request as a convenience for applications that cannot be configured to follow the redirect automatically. The following demonstrates a typical response:

HTTP/1.1 302 Found  
Content-Type: application/json  
Location: {DATA_URL}

{"location":"{DATA_URL}"}

Your application should be configured to follow this redirect as described in the next step.

The next step will describe how your application can use the location path value to request a data file.