Generating tokens and accessing Cloudera Lakehouse Optimizer REST APIs

After you provision the Cloudera Lakehouse Optimizer Data Hub, map the user groups to the Cloudera Lakehouse Optimizer roles, and generate the token, you can access the Cloudera Lakehouse Optimizer REST APIs to perform the service-related administrative tasks.

  1. Configure the user roles as shown in Configuring roles for Cloudera Lakehouse Optimizer users.
  2. Obtain the token from Apache Knox to use the Cloudera Lakehouse Optimizer REST APIs.
    1. Click Cloudera Management Console > Data Hub Clusters > [***LAKEHOUSE OPTIMIZER DATA HUB***].
    2. Click Token Integration in the Services section.
      Apache Knox appears in a new browser tab.
    3. 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.
    4. 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.
  3. Access the REST APIs using one of the methods:
    • Click the Apache Knox browser tab > Topologies > API Services > Cloudera Lakehouse Optimizer - API link to access the REST APIs using the curl commands.
    • Click the Cloudera Management Console > Data Hub Clusters > [***LAKEHOUSE OPTIMIZER DATA HUB ***] > Event History > Endpoints > Cloudera Lakehouse Optimizer link to access the Swagger endpoint.
  4. Access the openapi.json file to view all the available REST APIs using the curl --location '[**ENDPOINT**]/api/v1/openapi.json' command, or the Cloudera Management Console > Data Hub Clusters > [***LAKEHOUSE OPTIMIZER DATA HUB ***] > Event History > Endpoints > Cloudera Lakehouse Optimizer link.