on 09-02-2016 4:53 PM
We have recently upgraded to REST V2 and I am trying to convert my V1 API's.
I have no issue calling the self service tasks, but when I try to use the task below to assign a role to another employee, I get a 500 Internal Server Error. I am pretty sure it is my lack of understanding of how MX_ASSIGNMENT is populated for an update
URI ...idmrestapi/v2/service/ET_MX_PERSON(ID=9946,TASK_GUID=guid'D092EA23-9E5D-4FC7-9467-1E1D0BBE3629')
Header
X-CSRF-Token : 9ovUtPO_dEgiJVEALrCCESTfiAY48xAdzkM
Content-Type : application/json
X-HTTP-Method : MERGE
Body
{"ER_MXREF_MX_ROLE":[{"REFERENCED_ID":"37174", “REASON”:“Role Assignment”,"VALID_FROM":"\/Date(1471305600000)\/","VALID_TO":"\/Date(1471478400000)\/"}]}
Any thoughts would be appreciated.
Thanks Andrew
Did you try to use the REFERENCED_ID only (w/o reason and date fields)?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Yes thanks that was my first attempt.
I believe it is an error in either the documentation or the API implementation. That task described does not have an attribute for MXREF_MX_ROLE only MX_ASSIGNMENT so unless the API does some internal mapping I should not have expect it to work.
So based on the attribute not assigned to the API, is there a different task that I should be looking at? Should I be extending the existing API's? The RDS package does contain the required attributes but I would not expect those API's are fully supported by SAP.
Thanks,
Andrew
Documented API's from help.sap.com
User | Count |
---|---|
87 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.