Preparing to interact with the Cloudera AI Gateway and Inference API

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.

  1. Obtain the domain name of the Cloudera AI Gateway and Inference.
    1. Select Cloudera AI Gateway and Inference in the left navigation pane under DATA APPLICATIONS on the Anywhere Cloud Console.
    2. Click on the name of the required instance.

      The Cloudera AI Gateway and Inference home page is displayed.

    3. Copy the URL of the selected Cloudera AI Gateway and Inference instance.
  2. Store the domain name and your AWC_TOKEN as the DOMAIN and AWC_TOKEN environment variables.
    For details on how to get the AWC_TOKEN, see Authenticating Cloudera AI Inference service.
  3. 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"}