[midPoint] REST API - Search a shadow with specified name in a resource
Wojciech Staszewski
wojciech.staszewski at diagnostyka.pl
Mon Oct 29 15:50:25 CET 2018
Hi,
I'm trying to write a query for REST API, that search a resource for a shadow with specified name.
Based on some examples I wrote something like this:
<?xml version="1.0"?>
<q:query xmlns:q="http://prism.evolveum.com/xml/ns/public/query-3">
<q:filter>
<q:and>
<q:ref>
<q:path>resourceRef</q:path>
<q:value>
<oid>11111111-1111-0000-0000-000000000001</oid>
</q:value>
</q:ref>
<q:equal>
<q:path>name</q:path>
<q:value>JACK</q:value>
</q:equal>
<q:equal>
<q:path>objectClass</q:path>
<q:value xmlns:ri="http://midpoint.evolveum.com/xml/ns/public/resource/instance-3">ri:AccountObjectClass</q:value>
</q:equal>
</q:and>
</q:filter>
</q:query>
But it doesn't work. The error is:
"Cannot combine on-resource and off-resource properties in a shadow search query. Encountered property name."
But the query works in "Query playground" (the objectClass part is missing, all the rest is the same as above):
<query>
<filter>
<and>
<ref>
<path>resourceRef</path>
<value oid="11111111-1111-0000-0000-000000000001"/>
</ref>
<equal>
<path>name</path>
<value>JACK</value>
</equal>
</and>
</filter>
</query>
Do you know how to fix it and make this work?
Thanks!
WS
--
Wojciech Staszewski
Administrator Systemów Sieciowych
www.diagnostyka.pl
Diagnostyka Sp. z o. o.
ul. Prof. M. Życzkowskiego 16, 31-864 Kraków
Numer KRS: 0000381559 (Sąd Rejonowy dla Krakowa-Śródmieścia w Krakowie, XI Wydział Gospodarczy KRS)
NIP: 675-12-65-009; REGON: 356366975
Kapitał zakładowy: 33 756 500 zł.
Pomyśl o środowisku zanim wydrukujesz ten e-mail.
More information about the midPoint
mailing list