Preparation
Before you run Threshold API commands, you must retrieve tenant ID, threshold route address, and authentication token by doing the following steps.
- 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'
- Get threshold route address by running the following command:
See the following example output:oc get route -A |grep threshold|awk '{print $3}'
icam-threshold-management-monitoring.apps.example.os.fyre.ibm.com
- 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:
See the following example output:cloudctl iam accounts
ID Name id-mycluster-account mycluster Account