Skip to main content

         This documentation site is for previous versions. Visit our new documentation site for current releases.      

Accessing and testing V2 Prediction API

Updated on August 4, 2022

Explore the possibilities of the V2 Prediction API by testing the endpoints. Each test generates a sample response to a simulated endpoint call, which helps you understand how the endpoint works and what types of responses to expect.

The PredictionStudio service package in Dev Studio holds the settings for the V2 Prediction API. By default, the service package uses the OAuth 2.0 authentication type. OAuth 2.0 is the preferred option that provides more security than basic authentication. For more information about configuring service package settings, see Defining processing and authentication for service packages.

Pega Customer Decision Hub
Before you begin: Create an OAuth 2.0 client registration data instance and save the credentials. For more information, see Creating and configuring an OAuth 2.0 client registration.
  1. In the header of Dev Studio, click the Resources menu icon, and then click Pega API.
  2. In the Pega API Help window, from the Service package list, select V2 Prediction API.
  3. Click Authorize.
  4. In the Available authorizations window, enter the required credentials for the scopes that you want to use:
    1. In the username and password fields, enter your operator credentials.
      The V2 Prediction API is server-specific and not application-specific. You can work with all the predictions on the server to which you have access. Your operator's default access group determines which predictions you can access.
    2. In the type field, select the authorization type:
      • Request body
      • Query parameters
    3. In the client_id and client_secret fields, enter the OAuth credentials that you saved in Creating and configuring an OAuth 2.0 client registration.
  5. Click Authorize, and then click Close.
    Result: You can now test the endpoints.
  6. Click the endpoint that you want to test.
    Result: The details of the endpoint are displayed, including the description, parameters, and sample responses.
  7. Test an endpoint:
    1. Click the name of the endpoint that you want to test to expand the section.
    2. Click Try it out.
    3. If the endpoint requires additional parameters, enter the information in the required fields.
    For example: If you want to test the GET /predictions/model_update/{referenceID}/status endpoint, which retrieves the status of a specific model update, after you click Try it out, provide the reference ID of the model update in which you are interested. For more information, see Updating active models in predictions through API with MLOps.
    1. Click Execute.
    Result: The system generates a response to the simulated query.

Have a question? Get answers now.

Visit the Support Center to ask questions, engage in discussions, share ideas, and help others.

Did you find this content helpful?

Want to help us improve this content?

We'd prefer it if you saw us at our best. is not optimized for Internet Explorer. For the optimal experience, please use:

Close Deprecation Notice
Contact us