[midPoint] Help with returned content

Pavol Mederly mederly at evolveum.com
Thu Oct 3 11:59:36 CEST 2019


Forgot to reply to the list :)



-------- Forwarded Message --------
Subject: 	Re: [midPoint] Help with returned content
Date: 	Thu, 3 Oct 2019 10:49:25 +0200
From: 	Pavol Mederly <mederly at evolveum.com>
To: 	Minarciny, Jan <jan.minarciny at pan-net.eu>



Hello Jan,


yes, it's possible to do this using bulk action task. But REST API (get 
and search operations) has an option of providing include and exclude 
options that result in inclusion (like for userPhoto that's not returned 
by default) or exclusion of given items.


See 
https://github.com/Evolveum/midpoint/blob/8eac39e2553501a59221ba7a13afc4b13a7dff88/model/model-impl/src/main/java/com/evolveum/midpoint/model/impl/ModelRestService.java#L714.


Best regards,

Pavol Mederly
Software developer
evolveum.com

On 02.10.2019 16:44, Minarciny, Jan wrote:
>
> Hello dear community,
>
>
> Is there an option to filter results from a search query via REST API 
> exactly in XML form?
>
> What I'm trying to do:
> Get list of only usernames and emails of selected active users from 
> midpoint (not a list of whole user objects = somehow filter the 
> returned result).
>
>
> How I'm trying to do:
> Calling a POST request onto 
> https://myidm.com/midpoint/ws/rest/users/search 
> <https://idm.stage.bdc1.hu.sec.in.pan-net.eu/midpoint/ws/rest/users/search> with 
> query in body:
>
>
> <q:query xmlns:q="http://prism.evolveum.com/xml/ns/public/query-3">
>     <q:filter>
> <and>
> <or>
>         <substring>
> <matching>polyStringNorm</matching>
>             <path>name</path>
>             <value>123</value>
>         </substring>
>         <substring>
> <matching>polyStringNorm</matching>
>             <path>fullName</path>
>             <value>123</value>
>         </substring>
>     </or>
> <or>
> <not>
> <equal>
> <path>activation/administrativeStatus</path>
> <value>disabled</value>
> </equal>
> </not>
> <not>
> <equal>
> <path>activation/administrativeStatus</path>
> <value>archived</value>
> </equal>
> </not>
> </or>
> </and>
> </q:filter>
> <paging>
>         <orderBy>familyName</orderBy>
> <orderDirection>ascending</orderDirection>
>         <maxSize>10</maxSize>
>     </paging>
> </q:query>
>
> Still, I haven't found either in docs or in code or in examples 
> anything like this, has please any of you done something like this?
> I have thought about wrapping a bulk search with processing into task, 
> import that trough PUT & after some time GET that task... but that 
> seems too complicated to achieve so little.
>
> Thank you!
> Johny
>
>
>
> _______________________________________________
> 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/20191003/ea835ff6/attachment.htm>


More information about the midPoint mailing list