Question
AVANTHI INSTITUTE OF ENGINEERING AND TECHNOLOGY
IN
Last activity: 28 Jun 2024 1:08 EDT
Integrate Pega with an external REST API
Hi everyone,
How do you integrate Pega with an external REST API to retrieve customer information. How do you approach this?
Regards,
YerniKumar
***Edited by Moderator Rupashree S. to add Capability tags***
-
Reply
-
Share this page Facebook Twitter LinkedIn Email Copying... Copied!
Accepted Solution
Updated: 28 Jun 2024 1:08 EDT
Lantiqx Systems India Private Limited
IN
Hi @Satyasaicharana,
- Create a Data Page: Define a data page that will be used to store the customer information retrieved from the external API.
- Navigate to Records > Data Model > Data Page and create a new data page.
- Configure Data Source: Set the data source to "Connect REST" in the data page.
- Create a REST Connector:
- Navigate to Integration > Connectors > Create REST Connector.
- Provide the necessary details like endpoint URL, HTTP method, and request/response parameters.
- Map Request and Response: Configure request and response data transforms to map the Pega data model to the external API’s data model.
- Use the Data Page: In the case type or flow, reference the data page to fetch and display customer information.
- For example, in a UI section, you can reference the data page property to display the customer details.
Regards,
Prasad
Eclatprime Digital Private Limited
IN
Steps to Integrate Pega with an External REST API
-
Understand the API Requirements:
- Obtain the API endpoint URL.
- Understand the request/response format (e.g., JSON or XML).
- Identify the necessary authentication method (e.g., Basic Auth, OAuth, API keys).
- Review the API documentation for required parameters and headers.
-
Create a Connector:
- Use Pega’s Connect-REST rule to create a connector to the external REST API.
-
Configure Authentication:
- Set up the necessary authentication profile in Pega.
-
Create Data Page:
- Use a data page to load the data retrieved from the REST API.
-
Map Data:
- Map the request and response data to and from Pega properties.
-
Test the Integration:
- Test the connector and data page to ensure the integration works as expected.
Detailed Steps
-
Understand the API Requirements:
Steps to Integrate Pega with an External REST API
-
Understand the API Requirements:
- Obtain the API endpoint URL.
- Understand the request/response format (e.g., JSON or XML).
- Identify the necessary authentication method (e.g., Basic Auth, OAuth, API keys).
- Review the API documentation for required parameters and headers.
-
Create a Connector:
- Use Pega’s Connect-REST rule to create a connector to the external REST API.
-
Configure Authentication:
- Set up the necessary authentication profile in Pega.
-
Create Data Page:
- Use a data page to load the data retrieved from the REST API.
-
Map Data:
- Map the request and response data to and from Pega properties.
-
Test the Integration:
- Test the connector and data page to ensure the integration works as expected.
Detailed Steps
-
Understand the API Requirements:
- Obtain the API endpoint, request method (GET, POST, etc.), headers, parameters, and authentication details from the API documentation.
-
Create a Connector:
- Go to Records > Integration-Connectors > Connect-REST.
- Click Create to create a new Connect-REST rule.
- Fill in the details:
- Endpoint URL: The URL of the REST API.
- Resource Path: The specific resource path, if needed.
- HTTP Method: The method used (e.g., GET, POST).
-
Configure Authentication:
- Go to Records > Security > Authentication Profile.
- Click Create to create a new authentication profile.
- Configure the authentication type (Basic, OAuth, etc.) and credentials.
-
Create Data Page:
-
Go to Records > Data Model > Data Page.
-
Click Create to create a new data page.
-
Configure the data page:
- Mode: Choose "Read-Only".
- Object Type: The type of data the page will hold (e.g., Customer).
- Scope: Choose the appropriate scope (Thread, Requestor, Node).
-
In the Data Sources section, choose Connector and select the Connect-REST rule you created.
-
-
Map Data:
- In the Connect-REST rule, go to the Request and Response tabs.
- Map the Pega properties to the API request parameters and response fields.
-
Test the Integration:
- Test the Connect-REST rule by running it directly and checking the response.
- Test the data page to ensure it loads data correctly.
Accepted Solution
Updated: 28 Jun 2024 1:08 EDT
Lantiqx Systems India Private Limited
IN
Hi @Satyasaicharana,
- Create a Data Page: Define a data page that will be used to store the customer information retrieved from the external API.
- Navigate to Records > Data Model > Data Page and create a new data page.
- Configure Data Source: Set the data source to "Connect REST" in the data page.
- Create a REST Connector:
- Navigate to Integration > Connectors > Create REST Connector.
- Provide the necessary details like endpoint URL, HTTP method, and request/response parameters.
- Map Request and Response: Configure request and response data transforms to map the Pega data model to the external API’s data model.
- Use the Data Page: In the case type or flow, reference the data page to fetch and display customer information.
- For example, in a UI section, you can reference the data page property to display the customer details.
Regards,
Prasad
Eclatprime Digital Private Limited
IN
Hi @YERNIKUMARD
Please find the following attachment.
Pegasystems Inc.
CA
Please follow this link to create the REST connector through the Integration Wizard.