Skip to main content

Exploring the DX API

1 Task

30 mins

Visible to: All users Applies to: Pega Platform '26
Intermediate
User Experience
Constellation
Low-Code App Development
English

Scenario

The Pega Digital Experience (DX) API is a set of model-driven REST API endpoints that help you programmatically view, create, and update Cases and Assignments. Understanding the messages that are transmitted between a Constellation application and the Pega DX API helps you troubleshoot issues that arise during the application development process.

To better understand the relationship between Constellation applications and the DX API, your challenge is to generate several Case-related DX API calls to Sweet Life's Incident Case Type using Bruno.

Note: This challenge has been configured with Single sign-on (SSO) using your Pega Academy credentials. If you are not automatically signed-in to the challenge environment after initializing the instance, you may use the credentials provided.

The following table provides the credentials you need to complete the challenge:

Role User name Password
Solution Builder Author@SL pega123!

After completing this challenge, you should be able to: 

  • Configure an OAuth 2.0 Client Registration for the Password credentials grant.
  • Create a Data Transform to define allowed starting fields.
  • Configure a Bruno environment with OAuth 2.0 authentication.
  • Create a new Case using the DX API.
  • Retrieve Assignment details through the DX API.
  • Retrieve submit action details through the DX API.
  • Perform a submit action through the DX API.

You must initiate your own Pega instance to complete this Challenge.

Initialization may take up to 5 minutes so please be patient.

Detailed Tasks

1 Exploring the DX API

Solution Builder Advanced Exploring the DX API with Bruno Doc Journey

Use the technical documentation linked in the Journey map above to complete the assigned tasks. The technical documentation might have more information than you need to complete the tasks.

Acceptance criteria

Task 1: Configure the OAuth 2.0 Client Registration

  • An OAuth 2.0 Client Registration is created with the following configuration:
    Field Value
    Short description Sweet Life DX API Test
    Supported grant types Password credentials
    Identity mapping pyDefaultIdentityMappingForPasswordGrant
    Refresh token Enabled
  • The client credentials are downloaded and saved locally.

Task 2: Create the AllowedStartingFields Data Transform

  • A Data Transform named AllowedStartingFields is created in the SL-TellUsMore-Work-Incident class with the following configuration:
    Target Value
    .pyDescription ""

Task 3: Configure the Bruno environment

  • The DXAPIdefinition_collection.zip file is downloaded and extracted, and the DXAPIdefinition_collection.json file is saved locally.
  • The DXAPIdefinition_collection.json file is imported into Bruno.
  • On the Variables tab under the DX API Definition, the following values are configured in the Current value column:
    Variable Value
    server Partial URL from the credentials file from https to prweb (for example, https://******.pegaacademy.net/prweb)
    baseUrl Partial URL from the credentials file from https to prweb, appended with /api/application/v2 (for example, https://******.pegaacademy.net/prweb/api/application/v2)
    AccessTokenURL Access token endpoint value from the credentials file
    ClientID Client ID from the credentials file
    ClientSecret Client Secret from the credentials file
    user TellUsMore_Service
    password pega123!
    OriginChannel Web
  • On the Auth tab, the following is confirmed:
    • Auth Type is set to OAuth 2.0.
    • Grant Type is set to Password Credentials.
    • Access Token URL is set to {{AccessTokenURL}}.
    • Username is set to {{user}}.
    • Password is set to {{password}}.
    • Client ID is set to {{ClientID}}.
    • Client Secret is set to {{ClientSecret}}.
    • Add Credentials to is set to Basic Auth Header.
    • Token Source is set to Access Token.
    • Add token to is set to Headers.
  • Get New Access Token is clicked and authentication is verified as successful.
  • Use Token is selected to save the new token to the authorization profile.

Task 4: Create a new Incident Case

  • In Bruno, navigate to the cases folder under the DX API Definition and open the Create new Incident - success request.
  • The request is executed with the following request body:
    <code>{
      "content": { "pyDescription": "Description" },
      "caseTypeID": "SL-TellUsMore-Work-Incident",
      "parentCaseID": ""
    }</code>
  • The response objects caseInfo, relatedCaseTypes, assignments, availableChildCaseTypes, availableActions, and stages are reviewed.
  • The Assignment ID is copied from nextAssignmentInfo in the response.
  • The new Case is visible in the TellUsMore – BO Portal under Incidents.

Task 5: Get Assignment details

  • In Bruno, expand the assignments > {assignmentsID} folder under the DX API Definition and open the Get first assignment details request.
  • The request is executed with the following parameters:
    Parameter Value
    viewType page
    pageName (empty)
    assignmentID (Assignment ID from Task 4)
  • In the JSON response, the submit object is located by navigating to assignments > actions > links > submit and the details are copied (for example, ASSIGN-WORKLIST SL-TELLUSMORE-WORK I-1!CREATEFORM_DEFAULT).

Task 6: Get submit action details

  • In Bruno, expand the assignments > {assignmentID} > actions > {actionID} folder under the DX API Definition and open the Get submit action details request.
  • On the Params tab, the following query parameter values are configured:
    Parameter Value
    viewType (empty)
    excludeAdditionalActions true
    assignmentID (submit object value from Task 5, for example, ASSIGN-WORKLIST SL-TELLUSMORE-WORK I-1!CREATEFORM_DEFAULT)
    actionID DetermineCategory
  • The request is sent and the JSON response object is reviewed.
  • On the Headers tab of the response, the etag value is copied for use in the next task.

Task 7: Perform a submit action

  • In Bruno, expand the assignments > {assignmentID} > actions > {actionID} folder under the DX API Definition and open the Submit first assignment request.
  • On the Params tab, the following query parameter values are configured:
    Parameter Value
    viewType none
    assignmentID (submit object value from Task 5, for example, ASSIGN-WORKLIST SL-TELLUSMORE-WORK I-1!CREATEFORM_DEFAULT)
    actionID DetermineCategory
  • On the Headers tab, the if-match row is set to the etag value copied from Task 6.
  • On the Body tab, the following JSON request body is entered:
    <code>{
      "content": {
        "IncidentType": "Product faulty or unsafe",
        "IncidentSubType": "Product not as described"
      }
    }</code>
  • The request is sent and the JSON response object is reviewed and confirmed as successful.
  • In the TellUsMore – BO Portal, the Incidents landing page confirms that the Incident Type and Incident SubType fields are populated with the submitted values.

Directions

  1. Create a new OAuth 2.0 Client Registration named Sweet Life DX API Test, configure the grant type, identity mapping, and refresh token settings as detailed in the Acceptance criteria, and download the credentials.
  2. Create a new Data Transform named AllowedStartingFields in the SL-TellUsMore-Work-Incident class and configure the target as detailed in the Acceptance criteria.
  3. Download and extract the DXAPIdefinition_collection.zip file, import the DXAPIdefinition_collection.json file into Bruno, configure the Variables tab using the Sweet Life DX API Test_ClientCredentials.txt file, confirm the Auth tab settings, and obtain and apply a new access token as detailed in the Acceptance criteria.
  4. Navigate to the cases folder under the DX API Definition in Bruno, open the Create new Incident - success request, send the request body as detailed in the Acceptance criteria, review the response objects, and copy the Assignment ID from nextAssignmentInfo.
  5. Expand the assignments > {assignmentsID} folder under the DX API Definition in Bruno, open the Get first assignment details request, configure the parameters as detailed in the Acceptance criteria, send the request, and copy the submit object details from assignments > actions > links > submit in the JSON response.
  6. Expand the assignments > {assignmentID} > actions > {actionID} folder under the DX API Definition in Bruno, open the Get submit action details request, configure the Params tab as detailed in the Acceptance criteria, send the request, and copy the etag value from the Headers tab of the response.
  7. Expand the assignments > {assignmentID} > actions > {actionID} folder under the DX API Definition in Bruno, open the Submit first assignment request, configure the Params and Headers tabs, enter the Body as detailed in the Acceptance criteria, send the request, and verify the Incident Type and Incident SubType in the TellUsMore – BO Portal.


If you are having problems with your training, please review the Pega Academy Support FAQs.

Did you find this content helpful?

Want to help us improve this content?

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