<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css" style="display:none"><!-- p { margin-top: 0px; margin-bottom: 0px; }--></style>
</head>
<body dir="ltr" style="font-size:12pt;color:#000000;background-color:#FFFFFF;font-family:Calibri,Arial,Helvetica,sans-serif;">
<p>Hello dear community,<br>
</p>
<p><br>
</p>
<p>Is there an option to filter results from a search query via REST API exactly in XML form?<br>
<br>
What I'm trying to do:<br>
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).<br>
</p>
<p><br>
</p>
<p>How I'm trying to do:<br>
Calling a POST request onto <a href="https://idm.stage.bdc1.hu.sec.in.pan-net.eu/midpoint/ws/rest/users/search">https://myidm.com/midpoint/ws/rest/users/search</a> with query in body:<br>
</p>
<div><br>
</div>
<div>
<div><q:query xmlns:q="http://prism.evolveum.com/xml/ns/public/query-3"><br>
</div>
<div>    <q:filter></div>
<div>    <span style="white-space:pre"></span><and><br>
</div>
<div>    <span style="white-space:pre"></span><or></div>
<div>        <substring><br>
</div>
<div>            <matching>polyStringNorm</matching></div>
<div>            <path>name</path></div>
<div>            <value>123</value></div>
<div>        </substring></div>
<div>        <substring></div>
<div>            <matching>polyStringNorm</matching></div>
<div>            <path>fullName</path></div>
<div>            <value>123</value></div>
<div>        </substring></div>
<div>    </or></div>
<div>    <span style="white-space:pre"></span><or></div>
<div>    <span style="white-space:pre"></span><not></div>
<div>    <span style="white-space:pre"></span><equal></div>
<div>    <span style="white-space:pre"></span><path>activation/administrativeStatus</path></div>
<div>    <span style="white-space:pre"></span><value>disabled</value></div>
<div>    <span style="white-space:pre"></span></equal></div>
<div>    <span style="white-space:pre"></span></not></div>
<div>    <span style="white-space:pre"></span><not></div>
<div>    <span style="white-space:pre"></span><equal></div>
<div>    <span style="white-space:pre"></span><path>activation/administrativeStatus</path></div>
<div>    <span style="white-space:pre"></span><value>archived</value></div>
<div>    <span style="white-space:pre"></span></equal></div>
<div>    <span style="white-space:pre"></span></not></div>
<div>    <span style="white-space:pre"></span></or></div>
<div>    <span style="white-space:pre"></span></and></div>
<div><span style="white-space:pre"></span></q:filter></div>
<div><span style="white-space:pre"></span><paging>   </div>
<div>        <orderBy>familyName</orderBy></div>
<div>        <orderDirection>ascending</orderDirection>  </div>
<div>        <maxSize>10</maxSize></div>
<div>    </paging><br>
</div>
<div></q:query><br>
</div>
<div><br>
</div>
<div>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?<br>
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.<br>
</div>
<div><br>
</div>
<div>Thank you!<br>
</div>
<div>Johny<br>
</div>
<br>
</div>
<p><br>
</p>
</body>
</html>