Tracking usage of Cognos Dashboards licenses

Important: IBM Cloud Pak® for Data Version 4.8 will reach end of support (EOS) on 31 July, 2025. For more information, see the Discontinuance of service announcement for IBM Cloud Pak for Data Version 4.X.

Upgrade to IBM Software Hub Version 5.1 before IBM Cloud Pak for Data Version 4.8 reaches end of support. For more information, see Upgrading from IBM Cloud Pak for Data Version 4.8 to IBM Software Hub Version 5.1.

Use the Cloud Pak for Data Platform API to view the number of users that are using Cognos Dashboards licenses.

Before you begin

You must be running Linux® with bash, curl, and jq installed.

You must have curl set up properly with an SSL certificate.

For more information about installing jq, see Installing the jq JSON command-line utility.

About this task

Your Cloud Pak for Data license limits the number of users who can create dashboards to a maximum of five users and the number of users who can view dashboards to 20 users. To make sure that you do not exceed these limits, use the Cloud Pak for Data Platform API to view the number of users with Create dashboards and View dashboards permissions.

If you exceed these limits, you must purchase a Cognos license:
  • For more Create dashboards permissions, purchase the Cognos Analytics User Cloud Pak for Data Subscription license.
  • For more View dashboards permissions, purchase the Cognos Analytics Viewer Cloud Pak for Data Subscription license.

Procedure

  1. Set the required environment variables.
    1. Set the CPD_INSTANCE_ROUTE environment variable to the route to your Cloud Pak for Data web client.
      export CPD_INSTANCE_ROUTE=<cpd_instance_route>

      By default, this value is cpd-<namespace>.apps.<OCP-default-domain>.

    2. Set the USERNAME environment variable to your Cloud Pak for Data username.
      export USERNAME=<username>
    3. Set the PASSWORD environment variable to your Cloud Pak for Data user password.
      export PASSWORD=<password>
  2. Generate an authorization token and assign this token to the AUTHORIZATION_TOKEN variable.

    For more information about how to generate an authorization token, see Generating an API authorization token.

    Set the AUTHORIZATION_TOKEN environment variable to this authorization token:

    export AUTHORIZATION_TOKEN=${TOKEN}
  3. Display the number of users with the Create dashboards permission.

    Run the following command to display the number of users with the Create dashboards permission:

    echo -e "\n\n\n>>>>> USERS WITH CREATE DASHBOARDS PERMISSION: \
    `curl -L "https://$CPD_INSTANCE_ROUTE/usermgmt/v1/usermgmt/users?permissions=create_dashboard" \
    -H "Authorization: ZenApiKey $AUTHORIZATION_TOKEN" | jq -r '.[] | .uid ' | wc -l` <<<<<\n\n\n"
    >>>>> USERS WITH CREATE DASHBOARDS PERMISSION: 5 <<<<<
  4. Display the number of users with the View dashboards permission.

    Run the following command to display the number of users with the View dashboards permission:

    echo -e "\n\n\n>>>>> USERS WITH VIEW DASHBOARDS PERMISSION: \
    `curl -L "https://$CPD_INSTANCE_ROUTE/usermgmt/v1/usermgmt/users?permissions=view_dashboard" \
    -H "Authorization: ZenApiKey $AUTHORIZATION_TOKEN" | jq -r '.[] | .uid ' | wc -l` <<<<<\n\n\n\" 
    >>>>> USERS WITH CREATE DASHBOARDS PERMISSION: 20 <<<<<