Skip to main content

Accessing a Pega application using the Pega API

1 タスク

5 分

表示の対象:All users Applies to: Pega Platform '26
中級
Data Integration
DX API
英語
バージョンタグがご希望のコンテンツと一致しているかご確認ください。 または、最新バージョンをご利用ください。

シナリオ

You are a Solution Builder working on TGB's HRApps application. TGB HR wants external systems to automatically create Employee Evaluation Cases through the Pega API, replacing manual case initiation. To enable this, you will configure secure OAuth 2.0 authentication and verify that an external system can successfully create a Case by using the API.

補足: 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 SSA@TGB pega123!

After completing this challenge, you should be able to: 

  • Configure an OAuth 2.0 Client Registration for API authentication.
  • Authorize and test the Pega API by using OAuth 2.0 client credentials.

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

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

詳細なタスク

1 Accessing a Pega application using the Pega API

Solution Builder Advanced Accessing a Pega application using the Pega API 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 OAuth 2.0 authentication

  • An OAuth 2.0 Client Registration is created with the following configuration:
    Field Value
    Short description EmployeeEvalutionAuthentication
    Client name EmployeeEvalutionAuthentication
    Supported grant types Client credentials
    Access group HRAppsV2:Administrators
  • The client credentials are downloaded and saved locally as EmployeeEvalutionAuthentication_ClientCredentials.txt.

Task 2: Test Case creation through the Pega API

  • The Pega API is authorized by using the client_id and client_secret from EmployeeEvalutionAuthentication_ClientCredentials.txt under the Constellation DX APIs service package.
  • The POST /cases endpoint is executed with the following request body:
    <code>{
      "caseTypeID": "TGB-HRApps-Work-EmployeeEvaluation",
      "parentCaseID": "",
      "processID": "pyStartCase",
      "content": {
        "Employee": {
          "pyFirstName": "Mario",
          "pyLastName": "Rossi",
          "Manager": "SSA@TGB",
          "Department": "Consulting"
        },
        "StartDate": "20300601",
        "EndDate": "20301231"
      },
      "pageInstructions": [],
      "attachments": []
    }</code>
  • The response body contains the generated Case ID for the new Employee Evaluation Case.

Directions

  1. Create a new OAuth 2.0 Client Registration named EmployeeEvalutionAuthentication, and configure the grant type and access group as detailed in the Acceptance criteria.
  2. Download the client credentials.
  3. Open the Pega API, select the Constellation DX APIs service package, and authorize by using the credentials from EmployeeEvalutionAuthentication_ClientCredentials.txt.
  4. Execute the POST /cases endpoint with the request body detailed in the Acceptance criteria, and verify that the response body contains a Case ID.


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

トレーニングを実施中に問題が発生した場合は、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