[midPoint] Example of setting extension attributes via REST Client API?
Alexandre Zia
alexandre.zia at ifood.com.br
Sat Aug 17 00:06:17 CEST 2019
The same way you would modify any other attribute:
# ADD
curl -v \
https://foo.bar/midpoint/model/rest/users/400ab585-7d0d-44ea-acbb-4834c8b9dd8b
\
-H 'Authorization: Basic REDACTED' \
-H 'Host: foo.bar' \
-H 'Content-Type: application/xml' \
-d '<objectModification
xmlns="http://midpoint.evolveum.com/xml/ns/public/common/api-types-3"
xmlns:c="http://midpoint.evolveum.com/xml/ns/public/common/common-3"
xmlns:t="http://prism.evolveum.com/xml/ns/public/types-3">
<itemDelta>
<t:modificationType>add</t:modificationType>
<t:path>extension/orgpath</t:path>
<t:value>/BR/Tecnologia/Engineering</t:value>
</itemDelta>
</objectModification>'
# MODIFY
curl -v \
https://foo.bar/midpoint/model/rest/users/400ab585-7d0d-44ea-acbb-4834c8b9dd8b
\
-H 'Authorization: Basic REDACTED' \
-H 'Host: foo.bar' \
-H 'Content-Type: application/xml' \
-d '<objectModification
xmlns="http://midpoint.evolveum.com/xml/ns/public/common/api-types-3"
xmlns:c="http://midpoint.evolveum.com/xml/ns/public/common/common-3"
xmlns:t="http://prism.evolveum.com/xml/ns/public/types-3">
<itemDelta>
<t:modificationType>replace</t:modificationType>
<t:path>extension/orgpath</t:path>
<t:value>/BR/Tecnologia/Engineering/InfraSec/Segurança</t:value>
</itemDelta>
</objectModification>'
# DELETE
curl -v \
https://foo.bar/midpoint/model/rest/users/400ab585-7d0d-44ea-acbb-4834c8b9dd8b
\
-H 'Authorization: Basic REDACTED' \
-H 'Host: foo.bar' \
-H 'Content-Type: application/xml' \
-d '<objectModification
xmlns="http://midpoint.evolveum.com/xml/ns/public/common/api-types-3"
xmlns:c="http://midpoint.evolveum.com/xml/ns/public/common/common-3"
xmlns:t="http://prism.evolveum.com/xml/ns/public/types-3">
<itemDelta>
<t:modificationType>delete</t:modificationType>
<t:path>extension/orgpath</t:path>
<t:value>/BR/Tecnologia/Engineering/InfraSec/Segurança</t:value>
</itemDelta>
</objectModification>'
On Wed, Aug 14, 2019 at 10:42 AM Chris Woods <Chris.Woods at rohde-schwarz.com>
wrote:
> Hi,
>
> does anyone have any example of setting extension attributes on the
> UserType via the REST client API when perfoming an add operation? There
> seem to be examples in the test class for an update, but not for create.
>
> I really don’t know what to set – ExtensionType has a getAny method whose
> return value is just defined as a List<Object> which doesn’t point me in
> any direction as to what is expected.
>
>
>
> Thanks in advance,
>
> Chris
>
>
> Content provided within this e-mail including any attachments, is for the
> use of the intended recipients and may contain Rohde & Schwarz company
> restricted information. Any unauthorized use, disclosure, or distribution
> of this communication in whole or in part is strictly prohibited. If you
> are not the intended recipient, please notify the sender by reply email or
> by telephone and delete the communication in its entirety.
> _______________________________________________
> midPoint mailing list
> midPoint at lists.evolveum.com
> http://lists.evolveum.com/mailman/listinfo/midpoint
>
--
<https://www.ifood.com.br/>
Alexandre R Zia
*Security*
www.ifood.com.br
<https://www.facebook.com/iFood?fref=ts> <https://twitter.com/iFood>
<https://www.instagram.com/iFoodBrasil/> <https://www.youtube.com/ifood>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.evolveum.com/pipermail/midpoint/attachments/20190816/e0f0ee1b/attachment.htm>
More information about the midPoint
mailing list