Posted: 23 Jan 2019 10:46 EST Last activity: 6 Feb 2019 5:26 EST
How can I see the code that Pega APIs call?
We're looking to implement Pega APIs in some of our related systems, but before we do so we are concerned that we don't actually know what PRPC is doing behind the scenes. Is there a way to find out what rules are invoked by a particular API call?
For example, when a system calls PRPC using the GET /cases API that "Gets all cases that the authenticated user has created in the default work pool", how can we find out what PRPC is doing to get that list? Is it using a report definition rule, an activity with an Obj-Browse step, some custom Java? Until we know that we can't:
a) trust that it is actually working as we expect - for security reasons we don't like using black boxes, and
b) understand when or how to override the OOTB API with an application-specific one.
Is there any documentation that lists the rules called by these APIs?
Thanks for the update, Carissa, but that's not exactly what I was after. I know the API help shows me what each API call returns, but it doesn't show me how it does it. Without knowing what goes on under the hood we can't be sure that it's behaving as we expect. If we don't know the structure of the SQL query that PRPC is running to retrieve all cases, how do we know it hasn't missed any?
Is there any way of finding out what rules PRPC is invoking when it receives an API call request, so we can trace what it's doing?
When you open the different methods that you want to review, you can see what activities they call.
Here is the api service package rule where I can see a list of different methods.
Now, let's say I want to learn more about the assignments api. I can click on that row to open the service rule. On the methods tab, I can expand the different sections to see the activity that is used.