[midPoint] API call return same value
Sylvaire kevin TIPA
sylvaire-kevin.tipa at mythalesgroup.io
Mon Jun 4 12:55:09 CEST 2018
Ok thanks, you have right ( :) )
My previous filter check employType (which can be "internal" or "contractor" or "external") and return same value many time (probably because employType is multifield value, so it's evaluate many time). I replace it by subtring on first name's first letter (which is my pattern for apply employType) and it's seems to be ok.
Thanks for your help
<filter>
<q:or>
<q:substring>
<q:path>name</q:path>
<q:value>T</q:value>
<q:anchorStart>true</q:anchorStart>
</q:substring>
<q:substring>
<q:path>name</q:path>
<q:value>E</q:value>
<q:anchorStart>true</q:anchorStart>
</q:substring>
<q:substring>
<q:path>name</q:path>
<q:value>S</q:value>
<q:anchorStart>true</q:anchorStart>
</q:substring>
</q:or>
</filter>
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/>
De : midPoint [mailto:midpoint-bounces at lists.evolveum.com] De la part de Pavol Mederly
Envoyé : lundi 4 juin 2018 10:41
À : midpoint at lists.evolveum.com
Objet : Re: [midPoint] API call return same value
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 ?
[cid:image002.png at 01D3FC03.432620B0]
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<mailto:midPoint at lists.evolveum.com>
http://lists.evolveum.com/mailman/listinfo/midpoint
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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.evolveum.com/pipermail/midpoint/attachments/20180604/7f7286f6/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image001.png
Type: image/png
Size: 6112 bytes
Desc: image001.png
URL: <https://lists.evolveum.com/pipermail/midpoint/attachments/20180604/7f7286f6/attachment.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image002.png
Type: image/png
Size: 191735 bytes
Desc: image002.png
URL: <https://lists.evolveum.com/pipermail/midpoint/attachments/20180604/7f7286f6/attachment-0001.png>
More information about the midPoint
mailing list