This tutorial takes you through the necessary setup to prepare your local system and Aspera on Cloud (AoC) so you can make API calls to the AoC Activity application and get data about your transfers. We will configure your system and AoC platform, set up the dependencies, make a request to the Files API to obtain authentication, and make authorized requests to the Analytics API.

Note: You will see references to the “Files API”, which is a legacy API for the Aspera on Cloud platform, and essential to authentication for calls to the Activity API.

To download the source code used in this tutorial, click here.

md5: 4ed52cb297cdc5669b11ff5624749387
sha1: 6396f0e5f25fcc42560c858b841507a7dceb9e9f

Prerequisites

The following must be true:

  • The Activity app is enabled for your organization.
  • Any user who makes requests to the API is a member of the Activity app.

To confirm the last two prerequisites, an admin user must do the following:

  1. Open the Admin app in AoC. At the top right, click the app switcher (app switcher icon) and click Admin.
  2. In the left navigation menu, click Applications, then
    click Activity.
  3. Select Enable application, if it is not already
    selected.
  4. Click the Members tab.
  5. In the search box, start entering the email address of the user who should have access to the Activity app.
    • If the username appears, they are a member of the Activity app and
      no further action is needed.
    • If the username does not appear, click Add
      member
      . Start typing the email address. When the
      username appears in the blue dropdown, click to select it and
      then click Add.

Dependencies

The following examples were created using a Mac and Ruby 2.4.1.

  • Ruby 2.4.1
  • Ruby gem manager (eg rvm)
  • Bundler
    2.0.1

    • Check to see if you have “Bundler” installed by running in in
      terminal:

      bundler -v