Skip to main content

Testing the Prediction Studio APIs

3 タスク

10 分

表示の対象:All users Applies to: Pega Customer Decision Hub '26
初級
英語

シナリオ

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 the ADM export artifacts

Generate the dataflows to export the ADM model and predictor snapshots.

Task 2: Generate a Client ID and a Client Secret

Generate a Client ID and a Client Secret for access to the Prediction Studio APIs.

Task 3: Inspect the API responses

Use REST calls to try out the Prediction Studio APIs.

 

このチャレンジを完了するには、Pegaインスタンスを起動する必要があります。

起動には5分ほどかかることがありますので、しばらくお待ちください。

チャレンジ ウォークスルー

詳細なタスク

1 Generate the ADM export artifacts

  1. Log in as a System Architect:
    1. In the User name field, enter SystemAdmin.
    2. In the Password field, enter rules.
  2. In the header, click PEGAInfinity '26, and then switch to Prediction Studio.
  3. Click Actions > Export > Export monitoring database.
    Export monitoring database
  4. In the Export monitoring database dialog box, select filerepo from the Repository dropdown list and click Export to generate the export artifacts.
  5. In the header, click PREDICTION STUDIO, and then switch to INFINITY STUDIO.

2 Generate a Client ID and a Client Secret

  1. In the header of Infinity Studio, click Create > Security > OAuth 2.0 Client Registration to create a new OAuth 2.0 Client Registration.
  2. In the OAuth 2.0 Client Registration short description field, enter Prediction APIs.
  3. In the Client Name field, enter PegaClient.
  4. Click Create and open.
  5. Configure the Client Registration:
    1. In the Supported grant types section, select Client credentials, and then, in the Operator ID field, enter or select DataScientist.
    2. In the Client Credentials section, click View & download, and then click Download credentials.
    3. Securely store the PegaClient_ClientCredentials text file that contains the Client ID and the Client Secret for later reference.
  6. Close the dialog boxes, and then click Save to complete the OAuth 2.0 Client Registration.

3 Inspect the API responses

  1. In the left navigation of Infinity Studio, click Channels > Pega API.
  2. In the Service package field, select Prediction APIs, and then click Authorize.
  3. 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.
    Client credentials
  4. Confirm that the client is authorized, and then click Close.
  5. In the Models section, click the GET /V1/models API to list the models that are part of the application.
    List models API
  6. Click Try it out, and then click Execute.
  7. Review the content of the server response body, and take note of the modelId of the Web Click Through Rate GB Customer adaptive model.
    List of models
  8. In the Models section, click the GET /v1/models/{modelID} API to get a description of the model, and then click Try it out.
    Describe model API
  9. In the modelID field, enter DATA-DECISION-REQUEST-CUSTOMER-CDH!WEB_CLICK_THROUGH_RATE_GB_CUSTOMER to get a description of the Web Click Through Rate Customer adaptive model, and then click Execute.
  10. In the server response body, review the modeling technique, the target and alternative labels, and the predictors of the adaptive model.
  11. In the Data export section, click the POST /v1/datamart/export API to trigger the export of the datamart.
    Datamart API
  12. Click Try it out, and then paste the below given string in the body of the Edit Value | Schema section

    {

    "exportLocation": "repo name"

    }

    Edit value - Schema
  13. Click Execute.
  14. On the enablement landing page, click Application Switcher > Filebrowser.
  15. Log in to the repository:
    1. Username: pega-filerepo
    2. Password: pega-filerepo
  16. Open the datamart folder and inspect the exported model snapshots and predictor snapshots files.


このモジュールは、下記のミッションにも含まれています。

トレーニングを実施中に問題が発生した場合は、Pega Academy Support FAQsをご確認ください。

このコンテンツは役に立ちましたか?

改善できるところはありますか?

We'd prefer it if you saw us at our best.

Pega Academy has detected you are using a browser which may prevent you from experiencing the site as intended. To improve your experience, please update your browser.

Close Deprecation Notice