How can I access the attachment labels via SOAP?

The function getLabelsById(String token, long objectId) didn't accept the attachment ID as objectID.

How do I read and write the labels on an attachment via the SOAP-API?

2 answers

Hello Marcel,

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 :)

  • jira.atlassian.com

Hope this helps!

Cheers,

Guilherme

Hello Guilherme,

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:

https://developer.atlassian.com/display/CONFDEV/Confluence+XML-RPC+and+SOAP+APIs

Kind regards.

Marcel

Suggest an answer

Log in or Sign up to answer
Community showcase
Posted Oct 24, 2018 in Confluence

Atlassian Research opportunity with Confluence templates

Do you use templates with Confluence? Take part in a remote 1-hr workshop. You'll receive USD $100 for your time!   We're looking for people to participate in a   remote 1-hr workshop...

1,100 views 17 14
Join discussion

Atlassian User Groups

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!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you