Menu

Expand
Rate this page:

Thanks for rating this page!

We are always striving to improve our documentation quality, and your feedback is valuable to us. How could this documentation serve you better?

Export Data from WFO via API

Learn how to export reports from within WFO to store the data in a warehouse of your own with this guide.

The export process consists of the following steps:

Prerequisites

Before you start exporting data you will need to have:

  • a provisioned WFO Workspace
  • the credentials of a user with access to the WFO Workspace
  • a table report that contains data you need to export
  • REST API client support for cookies that are used to pass authentication tokens

Log in

This call returns an SST (Super Secured Token) using your login and password. Use this SST to request a TT (Temporary Token).

In order to obtain password for direct login you can visit Password reset page once you've logged out from existing session. Password reset has no impact on your SSO login via parent applications.

Request

URL:

POST https://analytics.ytica.com/gdc/account/login

Headers:

Content-Type:application/json
Accept:application/json

Body:

{
"postUserLogin":{
"login":"{email_address}",
"password":"{password}"
}
}

Response

Response Headers:

Content-Type:application/json
Set-Cookie:GDCAuthSST={super_secured_token}; path=/gdc/account; secure; HttpOnly,GDCAuthTT={temporary_token}; path=/gdc; secure; HttpOnly

Response Body:

{
"userLogin": {
"profile": "/gdc/account/profile/{profile_id}",
"state": "/gdc/account/login/{profile_id}"
}
}

If you received a status code of 429, this means that you made too many invalid login requests. Check your credentials, and look for the Retry-After HTTP header in the response: this specifies the period (in seconds) after which you can attempt to log in again.

Retrieve Temporary Token

You must use the Temporary Token (TT) for all subsequent calls to the API. Therefore, you must retrieve the TT before making any API calls.

Request

Request the Temporary Token with the SST included in the headers via a cookie.

URL:

GET https://analytics.ytica.com/gdc/account/token

Headers:

Accept:application/json
Content-Type:application/json
Cookie:GDCAuthSST={super_secured_token}; path=/gdc/account

Response

This response sets the Temporary Token in the header as a cookie.

Headers:

Content-Type:application/json
Set-Cookie:GDCAuthSST={super_secured_token}; path=/gdc/account; secure; HttpOnly,GDCAuthTT={temporary_token}; path=/gdc; secure; HttpOnly

Body:

{
"userLogin": {
"profile": "/gdc/account/profile/{profile_id}",
"state": "/gdc/account/login/{profile_id}"
}
}

The TT is valid for a short amount of time. If you receive a status code of 401 Unauthorized while calling any API resource, get a new TT. Note that the SST you use must still be valid.

Export the raw report

Exporting the raw report is useful for getting machine-friendly data from any report created from your WFO Analytics Portal. You will need the ID of the workspace and ID of report object to export the data.

Workspace ID: Log in to the Analytics Portal and check the URL in the browser address bar. For example:

Workspace id

The workspace ID is the string appearing between the #s=/gdc/projects/ segment and the vertical bar. In this case, the workspace ID isz2nxqtb1r6weuly0iivexz6hu5dathua.

Object ID: Within Analytics Portal navigate to the report you'd like to export, and check the URL in the address bar. It may look like this:

Report ID

Object ID is the numerical expression at the very end of URL, and is typically preceded by obj/ segment. In the example above, Object ID is 3295.

The maximum report size for raw exports is 10GB. Exporting a report of this size may take minutes.

Request

URL:

POST https://analytics.ytica.com/gdc/app/projects/{workspace_id}/execute/raw/

Headers:

Accept:application/json
Content-Type:application/json
Cookie:GDCAuthTT=XXXXX-XXXXX-XXXXX

Body:

{
"report_req": {
"report": "/gdc/md/{workspace_id}/obj/{object_id}"
}
}

Response

Body:

{
"uri": "/gdc/projects/{workspace_id}/execute/raw/{report_id}"
}

Log out

After you performed all necessary operations, you should log out to invalidate the SST.

URL:

DELETE https://analytics.ytica.com/gdc/account/login/{profile_id}

Headers:

Accept:application/json

Response:

Set-Cookie:GDCAuthTT=; path=/gdc; expires={date_and_time}; secure; HttpOnly; GDCAuthSST=; path=/gdc/account; expires={date_and_time}; secure; HttpOnly
Rate this page:

Need some help?

We all do sometimes; code is hard. Get help now from our support team, or lean on the wisdom of the crowd browsing the Twilio tag on Stack Overflow.