<html>
  <head>

    <meta http-equiv="content-type" content="text/html; charset=windows-1252">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    <p>Forgot to reply to the list :) <br>
    </p>
    <div class="moz-forward-container"><br>
      <br>
      -------- Forwarded Message --------
      <table class="moz-email-headers-table" cellspacing="0"
        cellpadding="0" border="0">
        <tbody>
          <tr>
            <th valign="BASELINE" nowrap="nowrap" align="RIGHT">Subject:
            </th>
            <td>Re: [midPoint] Help with returned content</td>
          </tr>
          <tr>
            <th valign="BASELINE" nowrap="nowrap" align="RIGHT">Date: </th>
            <td>Thu, 3 Oct 2019 10:49:25 +0200</td>
          </tr>
          <tr>
            <th valign="BASELINE" nowrap="nowrap" align="RIGHT">From: </th>
            <td>Pavol Mederly <a class="moz-txt-link-rfc2396E" href="mailto:mederly@evolveum.com"><mederly@evolveum.com></a></td>
          </tr>
          <tr>
            <th valign="BASELINE" nowrap="nowrap" align="RIGHT">To: </th>
            <td>Minarciny, Jan <a class="moz-txt-link-rfc2396E" href="mailto:jan.minarciny@pan-net.eu"><jan.minarciny@pan-net.eu></a></td>
          </tr>
        </tbody>
      </table>
      <br>
      <br>
      <meta http-equiv="Content-Type" content="text/html;
        charset=windows-1252">
      <p>Hello Jan,</p>
      <p><br>
      </p>
      <p>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.</p>
      <p><br>
      </p>
      <p>See <a moz-do-not-send="true"
href="https://github.com/Evolveum/midpoint/blob/8eac39e2553501a59221ba7a13afc4b13a7dff88/model/model-impl/src/main/java/com/evolveum/midpoint/model/impl/ModelRestService.java#L714">https://github.com/Evolveum/midpoint/blob/8eac39e2553501a59221ba7a13afc4b13a7dff88/model/model-impl/src/main/java/com/evolveum/midpoint/model/impl/ModelRestService.java#L714</a>.</p>
      <p><br>
      </p>
      <p>Best regards,<br>
      </p>
      <pre class="moz-signature" cols="72">Pavol Mederly
Software developer
evolveum.com
</pre>
      <div class="moz-cite-prefix">On 02.10.2019 16:44, Minarciny, Jan
        wrote:<br>
      </div>
      <blockquote type="cite" cite="mid:1570027450515.15046@pan-net.eu">
        <meta http-equiv="Content-Type" content="text/html;
          charset=windows-1252">
        <style type="text/css" style="display:none"><!-- p { margin-top: 0px; margin-bottom: 0px; }--></style>
        <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"
            moz-do-not-send="true">https://myidm.com/midpoint/ws/rest/users/search</a> with
          query in body:<br>
        </p>
        <div><br>
        </div>
        <div>
          <div><q:query xmlns:q=<a class="moz-txt-link-rfc2396E"
              href="http://prism.evolveum.com/xml/ns/public/query-3"
              moz-do-not-send="true">"http://prism.evolveum.com/xml/ns/public/query-3"</a>><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>
        <br>
        <fieldset class="mimeAttachmentHeader"></fieldset>
        <pre class="moz-quote-pre" wrap="">_______________________________________________
midPoint mailing list
<a class="moz-txt-link-abbreviated" href="mailto:midPoint@lists.evolveum.com" moz-do-not-send="true">midPoint@lists.evolveum.com</a>
<a class="moz-txt-link-freetext" href="http://lists.evolveum.com/mailman/listinfo/midpoint" moz-do-not-send="true">http://lists.evolveum.com/mailman/listinfo/midpoint</a>
</pre>
      </blockquote>
    </div>
  </body>
</html>