Trapping field changes made by REST API

I am trying to trigger an event when a field is updated by REST API.    I prefer not to have to poll the transaction table. I would specifically like to send an email notification to specified users when a field value is changed by RESTAPI.

I have tried to trigger rules as a proof of concept, but no action is taken after the field is changed.

Please advise.  

  • Suggested Answer

    0  

    Hi Thomas,

    There's no easy way to differentiate betwen REST APIs and non-REST API calls in PPM, because in PPM pretty much all the "modern" screens are actually using REST APIs to perform all their operations (Team, Portfolio, Program, etc). I know that the Request details page is not using REST to update fields (yet), but let's keep in mind that this may change at any point in the future - and your solution better be future-proof.

    So, one way you could proceed is if your REST API calls are using a specific integration user, then you can easily enable field audit (history or notes) and check if the changes was done by this REST-only user.

    I fully agree that polling the DB tables regularly to find if any change happened is NOT the right approach - you should instead use PPM Web Hooks and call some custom JSP upon each request update (or even upon creation or delete if you want to handle this scenario). Since the Web Hook will pass the request ID, you JSP will only retrieve field changes for that specific request from DB, and check if the change was done by the REST user, then act accordingly.

    I don't see any other way to implement what you're looking for if you want to avoid some slow and wasteful DB Polling.

  • 0 in reply to   

    Thank you for the quick response.  I have spend hours researching this issue with no results trying to void polling.   We currently have Product version: 10.0.4, 37133, 3f6d136 11/18/2022 03:13 AM.  Are web hooks implemented in this version? Is there a patch that could add this functionality? 

      

  • 0   in reply to 

    Hi Thomas,

    PPM WebHooks were introduced in PPM 23.3.

    Just like with all other new features, there's no patch to get this capability on older versions - time to upgrade!

  • 0 in reply to   

    Thank You.   Will do.