The Activity API returns data objects related to performance, history, and usage of file transfers in Aspera on Cloud.

Endpoints in the Activity API

Below are the endpoints for the Activity API. For detailed reference information, see API Explorer.

  • /application_events – Get data for individual events in Aspera on Cloud, such as a package being sent or a user being created.
  • /egress_throughputs – Get the data transfer rate for downloads (in bps) for the current user’s resource and ‘resource’ – the organization, node, user, or workspace
  • /file_access – Get all data for user access of files and folders in the Activity app.
  • /file_access/search – Get data for user access of files and folders in the Activity app, filtered by a search parameter. The response data is separated into “users” and “files” arrays.
  • /ingress_throughputs – Get the data transfer rate for uploads (in bps) for the current user’s ‘resource’ – the organization, node, user, or workspace.
  • /transfers – Get an array of all transfers for the current user’s specified ‘resource’ – the organization, node, user, or workspace – for the specified time duration.
  • /transfers/uuid – Get a transfer object for the unique identifier of the transfer session and ‘resource’ – the organization, node, user, or workspace.
  • /volume_usage – Get a list of bytes uploaded and bytes downloaded for transfers between the specified start and stop times.

Requirements

To use the Activity API, the following must be true:

  • You have the Advanced Edition or Enterprise Edition of Aspera on Cloud.
  • You are enabled in the Activity App in Aspera on Cloud.

Enabling the Activity App

Follow this procedure to enable the Activity app.

  1. Open the Admin app in AoC.
  2. In the left navigation menu, click Applications, then click Activity (for the Activity app). When you do this procedure a second time, click Automation (for the Automation app).
  3. Select Enable application, if it is not already selected.
  4. Click the Members tab.
  5. Click Add Member
  6. Enter your email address, then click Add.

Access Control

The Activity API requires that a bearer token (JSON Web Token) be included in the header for each request. A bearer token is a type of OAuth2 authentication that includes a public key and a private key. In Aspera on Cloud, we create the bearer token with the Files API.

For detailed information on obtaining the bearer token, see the tutorial, Making a Request to the Activity API.

Here is an example of a bearer token:

Bearer twJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsImtpZCI6IjIwMTgtMDYtMDZUMjI6MzU6MTQrMDA6MDAifQ.eyJ1c
2VyX2lkIjoiMzIwMSIsInNjb3BlIjoiYWRtaW4tdXNlcjphbGwiLCJ1dWlkIjoiNGQ3OGViOWQtNTYyYS00NmQ1LTljMWEtY
2IzODczZDdjZTE4Iiwib3JnYW5pemF0aW9uX2lkIjoiNTgiLCJleHBpcmVzX2F0IjoiMjAxOS0wOC0wMlQxOTowNDoxMVoiL

[and more characters like this]
.  .  .
tKpcB88IU0sgy556jW38r2zlFIcvYdhvjSfGsKCCkuhyaUw/pre>

Pagination of Query Results

The Activity API supports pagination of results in the response for all endpoints, with the exception of /volume_usage.

For the endpoints that support pagination, if an integer value is not specified for the limit parameter, each page of the response includes the default number of response objects. The default value varies by endpoint.

Use Cases

Use Case Applicable Endpoint
Is someone using an excessive amount of bandwidth?. /transfers
Which workspaces are transferring the most data? /volume_usage
I need to restrict permissions on a particular file, and I want to see who currently has access. /file_access/search
Is a given user logging in frequently enough to justify giving them an account? /application_events

Join The Discussion

Your email address will not be published. Required fields are marked *