Skip to main content
LinkedIn
Copied!

Table of Contents

Accessing and testing V2 Prediction API

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.

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.

    You can now test the endpoints.
  6. Click the endpoint that you want to test.

    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.

    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.
    1. Click Execute.

    The system generates a response to the simulated query.
Did you find this content helpful?

Have a question? Get answers now.

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

Ready to crush complexity?

Experience the benefits of Pega Community when you log in.

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

Pega Community 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
Contact us