Using → Data Analytics Framework

The Data Analytics Framework for XDMoD provides REST API access to the XDMoD data warehouse. Users can access the API programmatically using the xdmod-data package. XDMoD can be configured to provide one-click access to a hosted JupyterLab environment (via JupyterHub) with the xdmod-data package pre-installed and authentication happening automatically. Users can also authenticate outside of such an environment by generating an API token through the XDMoD portal interface; see the “API Token Generation” section below.

Configuration

API Token Expiration

The expiration_interval setting in the api_token section of portal_settings.ini specifies how long an API token stays valid before it is automatically revoked. The value of this setting must follow PHP relative date/time formats.

[api_token]
expiration_interval = "6 months"

API Token Generation

Users can obtain an API token as follows.

  1. First, if you are not already signed in to the portal, sign in in the top-left corner:

    Screenshot of "Sign In" button

  2. Next, click the “My Profile” button in the top-right corner:

    Screenshot of "My Profile" button

  3. The “My Profile” window will appear. Click the “API Token” tab:

    Screenshot of "API Token" tab

    Note: If the “API Token” tab does not appear, it means this instance of XDMoD is not configured for the Data Analytics Framework.

  4. If you already have an existing token, delete it:

    Screenshot of "Delete API Token" button)

  5. Click the “Generate API Token” button:

    Screenshot of "Generate API Token" button)

  6. Copy the token to your clipboard. Make sure to paste it somewhere secure for saving, as you will not be able to see the token again once you close the window:

    Screenshot of "Copy API Token to Clipboard" button)

    Note: If you lose your token, simply delete it and generate a new one.

API Token Revocation

Users can revoke their own tokens through the “My Profile” window:

  1. Sign in on the XDMoD portal.
  2. Click the “My Profile” button.
  3. Click the “API Token” tab.
  4. Click “Delete API Token.”
  5. Click “Yes.”

Admins can revoke a user’s token by logging in as them and revoking their token:

  1. Sign in on the XDMoD portal.
  2. Click the “Admin Dashboard” button.
  3. Click the “User Management” tab.
  4. Click “Existing Users.”
  5. Search for the user in the filter box.
  6. Select the user whose token you wish to revoke.
  7. Click “Log In As Selected User.”
  8. Follow the steps above for revoking the user’s token.