API - easier access to segment size
By getting daily statistics for specific segments size in User.com and putting them in some database with a timestamp, we can measure segment size changes outside from User.com (like we do in analytics module). It's useful to connect that with other data.
Right now the only possibility to get segment size for each segment is asking one-by-one to the endpoint:
https://apidocs.user.com/segments/view-user-segment.html
But this endpoint gives back not only the segment size but every user from that segment, which makes response pretty heavy and sometimes, when asking for too many segments at once I get some timeouts.
That would be great to add:
a/ New endpoint for checking segment size (with possibility for giving multiple segment ID-s in one request)
b/ Another argument (size) in each segment object in response given by existing endpoint:
https://apidocs.user.com/segments/list-all-product-segments.html
Log in to comment and vote
Comments3
Grzegorz Kacperski
Oct 12, 2022
From now on, the change is live :)
Each segment in response of /api/public/segments/ has object_count attribute.
Michal Brozyna
Sep 27, 2022
Hi Arkadiusz,
We will add this feature in the near future.
Best,
Michał
Maciej Rządkowski
May 27, 2022
+snippet tag