Question
Luxoft
IN
Last activity: 5 Sep 2022 3:02 EDT
How to read multiple top level json structure for same API in Connect-REST
Requirement is that same API gives different top level structure in positive(Page List) and negative(Page) scenario.
But Pega Connect-Rest response configuration of type json allows either page/pagelist not both.
Any suggestion/approach to implement this requirement will be really helpful. Please share your thoughts.
Positive response: page list [ "test":"1", .......... ], [ "test":"2", ...... ]
Negative response : Page
{
"errors" : [ "err":"1",
"err":"2"] }
***Edited by Moderator Marije to change Type from Discussion to Question***