I don't believe that this function will function that way. By the documentation:
Vector getLabelsById(String token, long objectId) - Returns all Labels\ for the given ContentEntityObject ID
So I believe that you could try to get the attachment information and see if it does return the Label as well. If it does not, then we can create a feature request to add this feature on the next calls :)
Hope this helps!
yes please add this feature request (or bug?).
At least the documentation should be more precise and replace in the second part of the brackets (getLabelsById(String token, long objectId)) "long objectId" by "string pageId", as "long objectId" suggests that labels of other objects than pages might be requested, what is obviously not the case, as only labels of pages can be obtained.
Even the notion "ContentEntityObject ID" is not described in detail on this page:
Hi team, I’m Avinoam, a product manager on Confluence Cloud, and today I’m really excited to let the Community know that all customers can now try out the new editing experience and see some of the ...
Connect with like-minded Atlassian users at free events near you!Find a group
Connect with like-minded Atlassian users at free events near you!
Unfortunately there are no AUG chapters near you at the moment.Start an AUG