[midPoint] Example of setting extension attributes via REST Client API?
Chris Woods
chris at cmwoods.com
Sat Aug 17 10:26:28 CEST 2019
Hi Alexandre,
I meant using the java model-client code. I have worked it out in the
meantime and will post an example on the wiki.
Regards,
Chris
Am 17. August 2019 00:06:43 schrieb Alexandre Zia <alexandre.zia at ifood.com.br>:
> 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
>
>
>
> --
>
>
>
>
> Alexandre R Zia
>
>
>
>
>
>
> Security
>
>
>
>
>
>
>
>
>
>
> www.ifood.com.br
>
>
>
> _______________________________________________
> midPoint mailing list
> midPoint at lists.evolveum.com
> http://lists.evolveum.com/mailman/listinfo/midpoint
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.evolveum.com/pipermail/midpoint/attachments/20190817/be8eecba/attachment.htm>
More information about the midPoint
mailing list