[midPoint] Assing a role to a user via RESTfull interface
pdbogen at cernu.us
pdbogen at cernu.us
Fri Sep 16 10:15:19 CEST 2016
Howdy, Florin.
I happened to have the same problem as you. I wrote a small tool in Go to
perform this task; but the short answer is that no, there's not a simpler way;
what you are doing is, as far as I understand it, completely correct.
If you think having the tool would be helpful to you, I can check with my
management about releasing it as open source.
- Patrick
On Thu, Sep 15, 2016 at 09:18:00PM -0700, Florin. Stingaciu wrote:
> Hello,
>
> As the title suggests, I'm using your REST API to try and assign a role to
> a user. I've managed to do this so far by POSTing to
> http://localhost:8080/midpoint/ws/rest/users/{oid} the follwoing payload:
>
> <apit:objectModification
> xmlns:apit='
> http://midpoint.evolveum.com/xml/ns/public/common/api-types-3'
> xmlns:c='http://midpoint.evolveum.com/xml/ns/public/common/common-3'
> xmlns='http://midpoint.evolveum.com/xml/ns/public/common/common-3'
> xmlns:t="http://prism.evolveum.com/xml/ns/public/types-3">
> <apit:itemDelta>
> <t:modificationType>add</t:modificationType>
> <t:path>assignment</t:path>
> <t:value><targetRef oid="ROLE_OID" type="RoleType"/></t:value>
> </apit:itemDelta>
> </apit:objectModification>
>
> I was wondering if there was a more elegant solution to do this or if this
> is even the correct way of doing so.
>
> Thanks,
> -F
>
> ps. You guys are awesome at your response time! Congrats on your latest
> release and thank you for all your help on this mailing list.
> _______________________________________________
> midPoint mailing list
> midPoint at lists.evolveum.com
> http://lists.evolveum.com/mailman/listinfo/midpoint
--
.
Patrick Bogen .
...
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <https://lists.evolveum.com/pipermail/midpoint/attachments/20160916/5e05af45/attachment.sig>
More information about the midPoint
mailing list