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.
- Configure the user roles as shown in Configuring roles for Cloudera Lakehouse Optimizer users.
-
Obtain the token from Apache Knox to use the Cloudera Lakehouse Optimizer REST APIs.
- Click Cloudera Management Console > Data Hub Clusters > [***LAKEHOUSE OPTIMIZER DATA HUB***].
-
Click Token Integration in the
Services section.
Apache Knox appears in a new browser tab.
-
Click Token Generation in the General
Proxy Information section as shown in the following
screenshot:
The Token Generation page appears in a new browser tab. -
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 following screenshot shows the generated token details:
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.
-
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.
-
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.
