To interact with Cloudera AI Gateway and Inference API, you need to obtain the
domain name of the Cloudera AI Gateway and Inference and your AWC_TOKEN,
and save them as environment variables.
Obtain the domain name of the Cloudera AI Gateway and Inference and your
AWC_TOKEN.
-
Obtain the domain name of the Cloudera AI Gateway and Inference.
-
Select Cloudera AI Gateway and Inference in the
left navigation pane under DATA APPLICATIONS on the Anywhere Cloud Console.
-
Click on the name of the required instance.
The Cloudera AI Gateway and Inference home page is displayed.
-
Copy the URL of the selected Cloudera AI Gateway and Inference
instance.
-
Store the domain name and your
AWC_TOKEN as the
DOMAIN and AWC_TOKEN environment variables.
-
Verify the setup by sending a ping request. The response confirms that the domain name
and the token are valid.
curl -s -H "Authorization: Bearer ${AWC_TOKEN}" "https://${DOMAIN}/api/v1/ping"
{"apiVersion":"v1"}