Remove Labels that are numeric or integers with REST API

Sam Chan August 18, 2020

I was trying to use the rest api delete label with query parameter to remove a label that is an integer but I keep getting 500 Internal Server Error. How do I remove a label that is a numeric value?

 

postman.JPG

 

1 answer

0 votes
Hana Kučerová
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
August 18, 2020

Hi @Sam Chan ,

please try this URL (+ DELETE):

https://yourinstance_confluence/rest/api/content/26083521/label/56789

I've just tested it and it works for me. 

Sam Chan August 18, 2020

I just tried that and got this response along with 500 internal server error again

{    "statusCode": 500,    "message": "com.atlassian.confluence.core.service.NotValidException: [ValidationError [messageKey=label.not.found, args=[]]]"}

Sam Chan August 18, 2020

The weird thing is that the URL works when the label is not a numeric number. I made a call with something like this below and it worked...it removed the confluence label

DELETE REQUEST https://your_confluence/rest/api/content/26083521/label/confluence  

 

My confluence server is running version 5.9.11

Hana Kučerová
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
August 18, 2020

 

According to the documentation, there could be problems with "/", but numbers are not mentioned.

Version 5.9.11 is quite old, it seems to me like a bug :-(...

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events