Whereas $count allows to get the entities count inside the response body, sometimes there is no need to get the entities, but the amount. According to the official docs there is no way for doing so, maybe some workarounds ?
Asked
Active
Viewed 57 times
1 Answers
0
Given the class notebook id, do the following:
GET ~/classnotebooks/ID/sectiongroups?$count=true&$select=id
That would give you the count of sectiongroups in the notebook and the id's of those sectiongroups.

Jorge Aguirre
- 2,787
- 3
- 20
- 27
-
These requests are terribly large, with enough of section groups parsing one response may cause oom exception, for example. Is there any other way ? – Игорь Комаров Mar 21 '17 at 07:44
-
Yes - you can reduce the JSON that is returned by using select. Added to response. – Jorge Aguirre Apr 03 '17 at 17:43
-
This is not less dirty than counting the records inside the original json. – Игорь Комаров Apr 04 '17 at 11:31
-
Added an alternative. – Jorge Aguirre Apr 04 '17 at 17:01
-
Jorge Aguirre, can you leave a link to the alternative, please ? – Игорь Комаров Apr 05 '17 at 15:13
-
This is not the thing I needed. Bit better than it was before, but still bad in case of hundred+ sectionGroups are inside a classNotebook entity – Игорь Комаров Apr 06 '17 at 15:32