The Aspera on Cloud transfer service (AoCts) has its own API (the ATS API) for managing client access: creating API keys and access keys. ATS API keys provide a way of authenticating requests to the ATS API with credentials that do not expire (unlike Aspera on Cloud bearer tokens and IBMid tokens).

The following instructions describe how to generate an Aspera on Cloud bearer token or an IBMid token and use that to create an ATS API key.

Creating the Token

Create ONE of the following, either Aspera on Cloud bearer token or IBM ID token.

Aspera on Cloud Bearer Token

For instructions, see Creating an Aspera on Cloud Bearer Token.

IBMid Token

  1. Use your IBMid credentials to create an IBM API key.

    For instructions, see https://console.bluemix.net/docs/iam/userid_keys.html#userapikey.

  2. Use your IBM API key to generate an IBMid token by sending a POST request to /identity/token.

    Headers:

    • Content-Type: application/x-www-form-urlencoded
    • Accept: application/json

    Parameters:

    • grant_type=urn:ibm:params:oauth:grant-type:apikey
    • response_type=cloud_iam
    • apikey=ibm_api_key

    For example:

    curl -i -X POST https://iam.bluemix.net/identity/token -H "Content-Type: application/x-www-form-urlencoded" -H "Accept: application/json" --data-urlencode "grant_type=urn:ibm:params:oauth:grant-type:apikey" --data-urlencode "response_type=cloud_iam" --data-urlencode "apikey=<ibm_api_key>"

    The response is similar to the following:

    {
      "access_token": "eydrtlij4342iI...43tj34ltijgsw",
      "refresh_token": "SP4jt43tj34...9tj34tjsdk=",
      "token_type": "Bearer",
      "expires_in": 3600,
      "expiration": 158534574
    }

Creating the ATS API Key

  1. Retrieve your Aspera on Cloud transfer service instance ID by sending the following request, in which the token_string is AoC token or IBM ID token:
    curl -sS -X GET https://ats.aspera.io/v2/instances -H "Authorization: Bearer token_string" -H "Content-type: application/json" | jq '.'

    The response is similar to the following:

    {
        "data": [
            "aspera-aoc-0c26af66-65d5-4468-a66a-03a22dc3e944"
        ],
        "remaining": 0
    }
  2. Create an API key by sending the following request, in which the token_string is AoC token or IBM ID token:
    curl -sS -X POST https://ats.aspera.io/v2/api_keys -H "Authorization: Bearer token_string" -H "X-ATS-Service-Instance-Id: instance_id" -H "Content-type: application/json"

    The response is similar to the following:

    {
        "id": "ats_uaKmN12bM7gQcXbqP7t1xfKO",
        "secret": "jRCSmt1-BNhc23PRjUHoNWj600MwMNSxU4nfVZm-pYZ1"
    }

You can now use the API key to create AoCts access keys. For instructions, see Creating Transfer Service Access Keys with the ATS API.

Retrieving API Keys

You can get your API keys by authenticating with an IBM ID token or an AoC token.

curl -sS -X GET https://ats.aspera.io/v2/api_keys -H "Authorization: Bearer token_string" -H "X-ATS-Service-Instance-Id: instance_id" -H "Content-type: application/json"