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.
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:
- You must have installed the Docrio package in your Salesforce organization and completed the setup process.
- In order to use the Docrio API, you must first obtain a Salesforce access token for your Salesforce organization.
- You must use your organization's dedicated Docrio API URL when making requests to Docrio. You can find your organization's dedicated Docrio API URL using the Docrio Setup API documentation.
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.
Follow these steps when performing the Docrio backup for the first time.
- Obtain a salesforce access token.
- There are many ways to do this, however we recommend that you use this method.
- 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.
- 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.
- 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.
Follow these steps when performing the Docrio backup every time after the first.
- Generate a report of all the file info records in Salesforce.
- Same process as step 2 above.
- Compare this report to the previous report to determine which records are new and updated.
- Make requests to the Docrio API for ONLY the new and updated records.
- 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:
- We do not currently have a way to monitor these credentials, nor a way to revoke them once they are no longer needed.
- Due to our inability to monitor the credentials, we cannot determine if they have been shared, or stolen by 3rd parties.
- The credentials are not bound by salesforce permissions.