Expose Data Page to External Consumers – Recommended Approach?
Hello Community,
I need to expose a Pega service that allows external consumers to fetch information from a data table. I already have Data Pages configured that retrieve the data based on input parameters, so I’m looking for the most efficient and future-proof way to expose this for external use.
Approach I’m Considering
-
Using Pega’s API (DX API) to expose the Data Page directly, as the retrieval logic already exists.
-
creating a wrapper class/activity to centralize access control and whitelisting logic,so that only specific Data Pages can be accessed and not all datapages from the application, returning controlled error messages for unauthorized calls.
My Concerns
-
API choice: For this type of use case, is it recommended to use DX API ?
-
Rule stability: Since many Pega API rules (including DX API) are internal/final, there’s a risk that future Pega updates could change request/response structures and break consumer integrations.
-
Best practice: Is it good practice to expose Data Pages directly, or should I build a dedicated service layer for consumers?
Questions for the Community
-
Has anyone implemented a similar pattern in a production environment?
Hello Community,
I need to expose a Pega service that allows external consumers to fetch information from a data table. I already have Data Pages configured that retrieve the data based on input parameters, so I’m looking for the most efficient and future-proof way to expose this for external use.
Approach I’m Considering
-
Using Pega’s API (DX API) to expose the Data Page directly, as the retrieval logic already exists.
-
creating a wrapper class/activity to centralize access control and whitelisting logic,so that only specific Data Pages can be accessed and not all datapages from the application, returning controlled error messages for unauthorized calls.
My Concerns
-
API choice: For this type of use case, is it recommended to use DX API ?
-
Rule stability: Since many Pega API rules (including DX API) are internal/final, there’s a risk that future Pega updates could change request/response structures and break consumer integrations.
-
Best practice: Is it good practice to expose Data Pages directly, or should I build a dedicated service layer for consumers?
Questions for the Community
-
Has anyone implemented a similar pattern in a production environment?
-
Are there any upgrade or compatibility risks when exposing Data Pages directly via Pega API?
-
Would creating a custom REST service with explicit request/response be a more stable long-term solution, even though it requires additional effort?
Any guidance, best practices, or real-world experience would be greatly appreciated.