Egnyte

Integrating Study Tracker with Egnyte cloud storage service

Study Tracker can use Egnyte as a primary or secondary file storage service, creating folders for studies and providing a landing-zone for uploaded data files. It does so by leveraging Egnyte's REST API, so before you can connect, you will need to register an API key with Egnyte's Developer Portal.

Creating an Egnyte API Key

  1. Sign into the Egnyte Developer Portal: https://developers.egnyte.com/

  2. At the top of the page, click 'Get API Key'.

  3. Select the 'Applications' tab.

  4. Click 'Create New Application'.

  5. Fill out the requested information on the 'New Application' form. You can use the image below as a template:

  6. Make sure that 'Issue a new key for Egnyte Connect API' is checked and then click 'Register Application'.

  7. Follow the authentication instructions in the Egnyte API documentation to generate an authorization token using the API keys you created in the previous steps. The output access_token value will be used by Study Tracker to authenticate with the Egnyte API when making requests. An example cURL request and response can be found below:

# Request
curl -v --request POST -H "Content-Type: application/x-www-form-urlencoded" \
-d grant_type=password -d username=test -d password='password' \
-d client_id=cba97f3apst9eqzdr5hskggx \
-d client_secret=8WkD6YhXJDZrV7kWABQtr2bXBUY5GRTmuqBpRs4JDWHkNNhSK9 \
https://apidemo.egnyte.com/puboauth/token

# Response
{
  "access_token": "68zc95e3xv954u6k3hbnma3q",
  "token_type": "bearer",
  "expires_in": -1
}

This access_token will never expire, unless it is manually refreshed. Providing this token to Study Tracker to make requests to Egnyte on your behalf is a safer and more convenient alternative than providing your full Egnyte developer credentials and application keys.

Configuring Study Tracker

Once you have created an Egnyte application, API keys, and generated an authorization token, you can then configure Study Tracker to connect with your Egnyte tenant.

  1. Determine where in your Egnyte folder hierarchy you would like Study Tracker files to live. It is generally best to create a new folder that will be used exclusively by the Study Tracker application. Make a note of this root folder location (eg. /Shared/StudyTracker).

  2. Also make a note of your tenant's URL. If your URL looks like https://companyx.egnyte.com, then your tenant name is companyx.

  3. Edit your Study Tracker application.properties file and add the following items (below are examples):

egnyte.tenant-name=companyx
egnyte.api-token=68zc95e3xv954u6k3hbnma3q
egnyte.root-path=/Shared/StudyTracker

Last updated