I'm trying to read out some resource information from the REST API in a GEL Script, and I'm getting a 401 (unauthorized) error. I can log into PPM with my Integration User and get a response from the REST URL (https://cppm-nnnn.ondemand.ca.com/ppm/rest/v1/resources/5005400 ). I can get a response back when I hit /auth/login, but when I try to access the REST through a GEL script, I get the 401 error. I can run the script with my own credentials and get the correct response, but of course ideally I want the integration user to be able to run it.
Anyone have any clues what I'm missing? I'm guessing it's a security right somewhere, but I've given the integration user all of the ones I can think of.
Many thanks in advance, and Merry Christmas to all.
Hi TEAConsulting ,
You can follow link GEL Script consuming CA PPM REST API for sample.
Hi Prashank, thanks for the reply. I've been using that blog-post as my guide, and everything is working happily until I try to execute the REST call with my integration user. It works fine when I call the REST using my own credentials, but I get the Error 400 when I call using the integration user. That leads me to think there is either some security right missing (my integration user has the API right, and also Resource - Edit All among others), or perhaps the API somehow knows the integration user is different from the logged-in user and disallows the script for that reason.
I have also used integration user and it need to have specific security rights related to API and Object which integration user is trying to access. Also try to look into app-ca log for missing API right.
Turns out it was related to an access right. Problem now solved! Thanks so much for your help, Prashank.