Glip Compliance Exports API for eDiscovery, GDPR and Analytics

John Wang
RingCentral Developers
4 min readDec 4, 2018
Glip Compliance Exports API

We are happy to announce the beta availability for the Glip Compliance Export API. This feature allows RingCentral Office customers to download a Compliance Export using our REST API, similar to the administrative UI feature.

This feature is important to support compliance, eDiscovery, and analytics use cases. Regulatory compliance laws our customers have indicated a desire to follow include FINRA 17a-4 and GDPR (EU General Data Protection Regulation). On the analytics side, applications such as RSI Shadow Spaces provide information on Glip adoption inside your organizations and will be able to leverage this new API.

RSI Shadow Spaces for Glip

Read more about the manual UI-based service is available here:

https://blog.glip.com/glip-adds-compliance-exports-for-enterprise-accounts-aab7cb9cb3f5

The API is defined in our API Reference at the link below followed by a more detailed discussion:

https://developer.ringcentral.com/api-reference#Glip-Compliance-Exports

Authorization

To request and download an archive the user must be a Glip Administrator with the Compliance Export permission. To enable this permission go to the RingCentral App Administration page, enable the Compliance Exports toggle and then add users to the “Who can request and download exports” setting.

Navigate to the RingCentral App Administration page by clicking on your icon and “Administration”:

Ensure the user of interest is in the first section “Administrators”

Navigate to the bottom of the Administration page, enable Compliance Exports and add the administrator of interest:

RingCentral App Administration Compliance Exports Settings

If the user does not have the proper permission, the API will return the following error:

403 Forbidden{
"errors": [
{
"errorCode": "GIC-012",
"message": "Access rights to data export required."
}
]
}

Requesting an Archive

Request

To request an archive, making an API call to the following URL. You do not need to include a body or any parameters. You can optionally include the following parameters:

  • dateFrom: this defaults to 24 hours ago. The dateFromto dateTo range should not exceed 7 days.
  • dateTo: this defaults to the current time. The dateFromto dateTo range should not exceed 7 days.
  • userIds: an optional list of up to 30 userId values to filter the results
  • chatIds: an optional list of chatId values to filter the results
POST /restapi/v1.0/glip/data-export
Authorization: Bearer <your_access_token>

Response

You will receive a response like the following:

200 OK{
"uri":"https://platform.ringcentral.com/restapi/v1.0/glip/data-export/727097016-727097016-5787364c25c74054b1793d0c828df3c8",
"id":"727097016-727097016-5787364c25c74054b1793d0c828df3c8",
"creationTime":"2018-11-29T20:37:08Z",
"lastModifiedTime":"2018-11-29T20:37:08Z",
"status"=>"Accepted"
}

Checking on the Status of an Export Task

When an export task is running you can check on the task by calling the Data Export Task API which is defined here:

https://developer.ringcentral.com/api-reference#Glip-Compliance-Exports-loadDataExportTask

Request

A request is a simple GET request with the proper access token.

GET /restapi/v1.0/glip/data-export/{taskId}
Authorization: Bearer <your_access_token>

Response

The response has a status property that will tell you the status of the archive. When it says Completed, you can download the archive. You will receive one or more files in the result array as determined by the size of your archive.

200 OK{
"uri": "https://platform.ringcentral.com/restapi/v1.0/glip/data-export/727097016-727097016-5787364c25c74054b1793d0c828df3c8",
"id": "727097016-727097016-5787364c25c74054b1793d0c828df3c8",
"creationTime": "2018-11-29T20:37:08Z",
"lastModifiedTime": "2018-11-29T20:37:09Z",
"status": "Completed",
"result": [
{
"size": 1554,
"uri": "https://media.ringcentral.com/restapi/v1.0/glip/data-export/727097016-727097016-5787364c25c74054b1793d0c828df3c8/archive/1"
}
]
}

Retrieving An Archive

Archive files are zip files. To retrieve a zip file, extract the uri location specified in the result response above. For example:

Request

To request an archive, simply make a GET request to the archive URI with a valid access token.

GET https://media.ringcentral.com/restapi/v1.0/glip/data-export/{taskId}/archive/{archiveNumber}
Authorization: Bearer <your_access_token>

Response

The response will include the binary archive along with a number of headers. Use the Content-Type and Content-Disposition headers to identify the file format and filename.

Content-Type: application/zip
Content-Disposition: attachment;filename=compliance//B90C3.zip

File Format

The zip file includes a directory structure with a number of JSON files, segregated by company users and guests.

guests/guests_1.json
members/members_1.json
request_info.json

Building A Daily Downloader

You can use this approach to build a daily downloader. Some high level steps include:

  1. Cron Job or AWS CloudWatch Event to initiate daily task
  2. Task to create task
  3. Polling to monitor status
  4. Retrieve archive
  5. Copy archive

Next Steps

Build your app and let us know how it goes. If you have any questions, reach out to us here, on our community or Stack Overflow:

--

--

John Wang
RingCentral Developers

AVP Platform Products for @RingCentral with a focus on improving life through innovative products and software