Generating tokens and accessing Cloudera Lakehouse Optimizer REST APIs

Generate JWT tokens through Apache Knox to authorize and access Cloudera Lakehouse Optimizer REST APIs for service-level administrative tasks.

  1. Go to Cloudera Manager > Clusters > Knox service > Web UI > Knox Gateway Home.
  2. Enter the credentials to access the Knox gateway.
  3. Obtain the token from Apache Knox to use the Cloudera Lakehouse Optimizer REST APIs.
    1. Click Token Integration in the Services section.
      Apache Knox appears in a new browser tab.
    2. Click Token Generation in the General Proxy Information section as shown in the following screenshot:
      The image shows Apache Knox window where you can find the Token Generation option.
      The Token Generation page appears in a new browser tab.
    3. Enter the required number of days, hours, and minutes for the token in the Lifetime (days, hours, mins) field on the Token Generation page, and then click Generate Token as shown in the following screenshot:
      The image shows the Generate Token option.
      The following screenshot shows the generated token details:
      The image shows the Generate Token option.
      The JWT Token and the Target Base URL values are generated. Use the JWT Token to authorize the REST APIs, and the Target Base URL as the base URL for REST APIs.
  4. Access the REST APIs by clicking the Apache Knox browser tab > Topologies > API Services > Cloudera Lakehouse Optimizer - API link. Alternatively, use the cdp-proxy-token section to get the base url to call the REST APIs using the curl commands (with JWT).