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.
Join us June 26, 11am PT for a webinar with Atlassian Champion Robert Hean & Loom’s Brittany Soinski. Hear tips, stories, and get your burning questions answered. Learn how Loom makes training and enablement easier. Don’t miss it!
Register todayOnline forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.