Preparation

Before you run Threshold API commands, you must retrieve tenant ID, threshold route address, and authentication token by doing the following steps.

  1. Retrieve the authentication token by running the following command:
    curl -k -H "Content-Type: application/x-www-form-urlencoded;charset=UTF-8" \
    -d "grant_type=password&username=<user>&<password>&scope=openid" \
    -i 'https://<cp_console_route>/idprovider/v1/auth/identitytoken'
    
  2. Get threshold route address by running the following command:
    oc get route -A |grep threshold|awk '{print $3}'
    
    See the following example output:
    icam-threshold-management-monitoring.apps.example.os.fyre.ibm.com
    
  3. Get tenant ID. To get the tenant ID, you must first install and log in cloudctl. For more information, see Managing your cluster with cloudctl. Then, you can get tenant ID by running the following command:
    cloudctl iam accounts
    
    See the following example output:
    ID                     Name   
    id-mycluster-account   mycluster Account