I wonder How to get count of attachment via rest API.
# echo -e "\nNumber of attachment is" && curl -s -n http://localhost:8090/rest/api/content/26477449/child/attachment | python -mjson.tool | tail -3 | head -1 | tr -dc '0-9' && echo
Number of attachment is
4
# echo -e "\nNumber of attachment is" && curl -s -n http://localhost:8090/rest/api/content/11048040/child/attachment | python -mjson.tool | tail -3 | head -1 | tr -dc '0-9' && echo
Number of attachment is
13
Hey Pavel, your code only works if there are max 50 attachments (or what you passed as a limit query parameter). The Rest endpoint you used only returns how many attachments it returned, not how many attachments exist.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Want me to fix that?
I've to find page with more than 50 files first)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.