[midPoint] API call return same value
Pavol Mederly
mederly at evolveum.com
Mon Jun 4 10:40:55 CEST 2018
Hello Sylvaire-Kevin,
as for the duplicate records: you are probably using some query filter
to select only a subset of users, aren't you? Or maybe there is some
authorization in effect that implies such a filter.
Then there are various options:
1. try to rewrite the filter e.g. by using 'exists' keyword (if
applicable) - but I am afraid this will help only quite rarely;
2. use 'distinct' search query option - but I am not sure if this is
supported in your version of midPoint;
3. use a custom script (embedded in bulk action, invoked by
execute-script action) to count the objects and then return only the
final number (see /rpc/execute-script call). The bulk action could
then call model service 'count' operation using the 'distinct' keyword.
Please see our wiki for more information.
Best regards,
Pavol Mederly
Software developer
evolveum.com
On 04.06.2018 9:26, Sylvaire kevin TIPA wrote:
>
> Hey guy,
>
> I try to make a REST call to MP for count the number of users.
> Currently, I just call /users endpoints and parse XML for count user
> (do you have better solution) ?
>
> When I call urL/rest.users , I get a xml with many time the same users
> … it’s normal ? How I can limit it to unique user ?
>
> Cordialement,
>
> cid:8e2f30c3-f5eb-4f4e-aefb-9d083f8a3b45
>
> *Sylvaire-Kevin TIPA*//
>
> /Thales Services / OIC / DevOps Automatisation Infrastructures/
>
> …………………………………………………………………………………………
>
> THALES SERVICES SAS
> 44 Quai Charles de Gaulle
> CS 20100
> 69463 Lyon Cedex 06
>
> …………………………………………………………………………………………
>
> www.thalesgroup.com <http://www.thalesgroup.com/>
>
> This message contains confidential information and is intended only
> for the individual(s) addressed in the message. If you are not the
> named addressee, you should not disseminate, distribute, or copy this
> e-mail. If you are not the intended recipient, you are notified that
> disclosing, distributing, or copying this e-mail is strictly prohibited.
>
>
>
> _______________________________________________
> 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/20180604/8cba52b2/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image002.png
Type: image/png
Size: 191735 bytes
Desc: not available
URL: <https://lists.evolveum.com/pipermail/midpoint/attachments/20180604/8cba52b2/attachment.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image001.png
Type: image/png
Size: 6112 bytes
Desc: not available
URL: <https://lists.evolveum.com/pipermail/midpoint/attachments/20180604/8cba52b2/attachment-0001.png>
More information about the midPoint
mailing list