on 10-09-2013 8:44 AM
Hello everybody,
I am trying to use the new REST API, which is part of the IdM SP8 and have some problems I cannot get solved.
Every GET operation seems to be working fine, but whenever I am trying to write new information to the database or changing user
attributes, I am getting an 403 (forbidden) error.
The task guid I am using belongs to access where the access controlled is set to 'everyone' and I am using the tunneling method 'MERGE'
described in the API documentation.
Is anybody having the same problems or has an idea how I could solve the problem?
Thanks you.
Moritz
It would be great if somebody could share a correct and working uri to use when changing attributes of a person. I still dont have any solution for the described problem I am facing.
Please dont share the link provided in the API documentation, I tried it and it doesnt work.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Moritz,
I have few questions. What is your deployment scenario? I mean how did you get the new rest api and how did you deploy it? Did you use SUM to update or just deployed the SCA through NWDS or telnet?
I am asking because you should not have both URIs working only the /idmrestapi/v2/service one.
My second question is Is there more detailed stack trace of your error? The second message that you provide is not very specific.
Also have you imported the UI Tasks for HTML5.mcc template in your management console? This template imports several UI tasks which are later used by the REST api for access control thus lacking them may lead you to "access forbidden" error.
Here is an example request on my system that is changing the middle name of the user:
Request headers:
Request Payload:
Please let me know if any of the above helps you.
Best,
Hristo
Found out what has to be part of the problem: You have to send a HTTP GET Request with the header X-CSRF-Token having the value Fetch. The value of the requests answer has to be send with every HTTP POST request. Now I am not getting the 403 Error, but an 500 or 405 Error. Apparently there has to be a problem with the URI I am entering.
Shouldnt this work:
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello Moritz,
the URI you are using is not correct. Please try with:
http://...:.../idmrestapi/v2/service/ET_MX_PERSON(ID=63,TASK_GUID=guid'4103F92B-731A-BA33-B544-79539F7F00F2')
For more info please look at: http://help.sap.com/saphelp_nwidmic_72/helpdata/en/ef/d3e90dace9408faac84cb4bc9fe60d/content.htm?fra...
Let me know if this solved your issue.
Best Regards,
Hristo
Hi Moritz,
the new rest api (v2) is located on <host>:<port>/idmrestapi/v2/service and won't work properly on the other URI. Could you please try with it and if you face the error again, please go to NWA -> Troubleshooting -> Logs & Traces -> Log Viewer and then in the Developer Traces and paste the exact error.
Best Regards,
Hristo
Hello Hristo,
this example is part of the REST API v2 documentation:
Anyways, I tried using the idmrestapi URI as well. No difference.
Accoridng to this example it should be quite easy to change a persons lastname. I only have to set the tunnel method to merge and send the right token.
I am always getting this error.
Log from NWA:
Thank you very much.
Moritz
User | Count |
---|---|
101 | |
13 | |
13 | |
11 | |
11 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.