Testing the Prediction Studio APIs
2 タスク
10 分
シナリオ
The Prediction Studio APIs facilitate the monitoring and management of predictions remotely, using the scripting language of your choice. They offer endpoints for various operations, such as getting a list of Predictions and their attributes, introducing a challenge model, and more. These operations are categorized under Data export, Models, Reporting, Predictions, and Prediction Studio. As a System Admin, you generate the client credentials that provide access to the APIs, and then inspect the API responses.
Use the following credentials to log in to the exercise system:
| Role | User name | Password |
|---|---|---|
| System Admin | SystemAdmin | rules |
Your assignment consists of the following tasks:
Task 1: Generate a Client ID and a Client Secret
Generate a Client ID and a Client Secret for access to the Prediction Studio APIs.
Task 2: Inspect the API responses
Use REST calls to try out the Prediction Studio APIs.
チャレンジ ウォークスルー
詳細なタスク
1 Generate a Client ID and a Client Secret
- Log in as a System Architect:
- In the User name field, enter SystemAdmin.
- In the Password field, enter rules.
- In the header of Infinity Studio, click Create > Security > OAuth 2.0 Client Registration to create a new OAuth 2.0 Client Registration.
- In the OAuth 2.0 Client Registration Short description field, enter Prediction APIs.
- In the Client Name field, enter PegaClient.
- Click Create and open.
- Configure the Client Registration:
- In the Supported grant types section, select Client credentials, and then, in the Operator ID field, enter or select DataScientist.
- In the Client Credentials section, click View & download, and then click Download credentials.
- Securely store the PegaClient_ClientCredentials text file that contains the Client ID and the Client Secret for later reference.
- Close the dialog boxes, and then click Save to complete the OAuth 2.0 Client Registration.
2 Inspect the API responses
- In the left navigation of Infinity Studio, click Channels > Pega API.
- In the Service package field, select Prediction APIs, and then click Authorize.
- In the ClientCredentials (OAuth2, clientCredentials) section, enter the Client ID and the Client Secret from the PegaClient_ClientCredentials text file that you saved in the previous task, and then click Authorize.
- Confirm that the client is authorized, and then click Close.
- In the Predictions section, click the GET /V3/prediction API to list the models that are part of the application.
- Click Try it out, and then click Execute.
- Review the content of the server response body, and take note of the predictionId of the Predict Web Propensity prediction.
- In the Prediction section, click the GET /v3/predictions/{predictionID} API to get a description of the prediction, and then click Try it out.
- In the predictionID field, enter DATA-DECISION-REQUEST-CUSTOMER-CDH!PREDICTWEBPROPENSITY to get a description of the Predict Web Propensity prediction, and then click Execute.
- In the server response body, review the adaptive models that drive the prediction, and take note of the modelID that acts at the customer level, and the modelling technique.
- In the Models section, click the GET /V2/models/{modelID} API to get a description of a model, and click Try it out.
- In the modelID field, enter Data-Decision-Request-Customer-CDH!Web_Click_Through_Rate_GB_Customer, and click Execute.
- In the server response body, review the labels and the predictors.
- In the upper right corner, click the user icon and select Log off.