HTTPS Service-V1

This page contains reference documentation for version 1 of the Product Sentiment Export HTTPS service.

Environments

The Product Sentiment Export supports the following environments:

EnvironmentDomainDescription
Staginghttps://stg.api.bazaarvoice.comUsed while developing your application.
Productionhttps://api.bazaarvoice.comUsed when your application is complete.

Required headers

All requests must include the following headers:

Name Description
Host Environment, staging or production, that will process the request.
X-Bazaarvoice-Passkey

The passkey key described in the Credentials section.

X-Bazaarvoice-Signature

An access signature used to verify the request. This is created by your application for each request. Refer to Creating the access signature for additional details.

X-Bazaarvoice-Timestamp

A Unix timestamp in milliseconds. Requests will be valid for 3600 seconds after the time stamp is created. Requests using an expired timestamp will return an error.

Access signature

The contents of the message to be encrypted will vary based on the request. The two possible variations are demonstrated below:

Without pathpasskey={PSI_PASSKEY}&timestamp={TIMESTAMP}
With pathpath={PATH_VALUE}&passkey={PSI_PASSKEY}&timestamp={TIMESTAMP}

The tokens above should be replaced with the appropriate values as described below:

Name Description
{PATH_VALUE}

This is the same value communicated in the path query string parameter. Refer to the Workflow Walk-Through for more information.

{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

Refer to Creating Access Signature for verification values and code examples.

Parameters

NameDescription
pathThe value identifying the data set version in the form of a URL path segment.

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

Examples

Request manifest file list

Returns a JSON list of manifest file paths which will be used in the next request. View the tutorial for a more detailed example.

Request

GET https://[stg.]api.bazaarvoice.com/psi/v1/data

Headers

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

Request manifest file

Returns a 302 redirect to a manifest file containing paths to data files. View the tutorial for a more detailed example.

Request

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

Headers

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

Request data file

Returns a 302 redirect to a file containing data. View the tutorial for a more detailed example.

Request

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

Headers

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

Following a 302 redirect

The HTTP service will return 302 redirects for some requests. This allows us to decouple the location of the data file from the request path. It is essential that your application immediately follow the redirect exactly as it is provided and to not save or reuse redirects at a later time. View the tutorial for a more detailed example.

GET {REDIRECT_URL}