Using the Docrio API to Self-backup Files From AWS

This document is intended to provide high-level steps for clients who wish to use the Docrio API to self-backup their files from Docrio. 

The instructions contained within this document are meant for a developer.

Before Starting

While the desire to backup your information locally is certainly understandable, in this case it might not be necessary.

Due to the nature of how Docrio works with Amazon Web Services (AWS) your Docrio information is constantly being backed-up to multiple Amazon servers around the globe. While an AWS outage may cause a temporary interruption to your ability to access Docrio content, it's nearly impossible that your Docrio information would be lost.

We say this to hopefully calm any worries you may have about data suddenly being lost, and to possibly help you avoid the unnecessary process of backing-up data that is already being backed-up many times over. 


You will need to have access to the Docrio API in order to follow this process. To access this API, and the documentation related to it, please navigate to our self-hosted site.

Here are some additional prerequisites to be mindful of when dealing with the Docrio API:

Backup Process

The first time you execute this backup you will need to perform some extra steps. Because of these additional steps, and some other initial configuration that needs to happen, the first few backups are likely to take longer to complete. As such, the process for performing this backup should become much faster after the third time it is performed.

Initial Backup

Follow these steps when performing the Docrio backup for the first time. 

  1. Obtain a salesforce access token.
    • There are many ways to do this, however we recommend that you use this method.
  2. Generate a report of all file info records in Salesforce.
    • There are different ways to do this, but we recommend using the same access token as used above. Additionally, you could consider using the Bulk Query API.
  3. Iterate over each of the IDs in the report and send calls to the Docrio API "/files" endpoint with the IDs using a Salesforce access token.
    • There is an option to submit these requests for multiple IDs, but you must be able to initiate download requests within 5 minutes for all of the IDs requested.
  4. The response from the "/files" endpoint will contain a signed url for each id requested.
    • Make a GET call to each URL to download the corresponding document.

Subsequent Backups

Follow these steps when performing the Docrio backup every time after the first. 

  1. Generate a report of all the file info records in Salesforce.
    • Same process as step 2 above.
  2. Compare this report to the previous report to determine which records are new and updated. 
  3. Make requests to the Docrio API for ONLY the new and updated records.
  4. Make a “GET” call to each URL to download the corresponding document as before.
    • For updated documents, the updated file should replace the previously downloaded file.

Why Can’t Litify Provide AWS Access Directly?

We are unable to provide clients direct access to their AWS Production Bucket for the following reasons:

  1. We do not currently have a way to monitor these credentials, nor a way to revoke them once they are no longer needed.
  2. Due to our inability to monitor the credentials, we cannot determine if they have been shared, or stolen by 3rd parties.
  3. The credentials are not bound by salesforce permissions.

Related Articles

Was this article helpful?
0 out of 1 found this helpful