Details
-
Bug
-
Resolution: Unresolved
-
Low
-
None
-
6.5.0
-
None
-
2
-
Severity 3 - Minor
-
0
-
Description
Summary
It is not possible to delete integer labels through the REST API.
Steps to Reproduce
- Add an all-integer label to a page (2016 for example)
- Run the following curl command to delete it:
{code}
curl -v -S -u <username>:<password> -X DELETE http://<domain>/rest/api/content/66755/label?name=2016
{code}
Expected Results
Label is deleted and the following output is shown in the console:
{code}
- Trying 192.168.10.10...
- Connected to quicksilver (127.0.0.1) port 80 (#0)
- Server auth using Basic with user 'admin'
> DELETE /confluence/rest/api/content/66755/label?name=test_lable HTTP/1.1
> Host: quicksilver
> Authorization: Basic YWRtaW46YWRtaW4=
> User-Agent: curl/7.43.0
> Accept: /
>
< HTTP/1.1 204 No Content
< Date: Wed, 08 Nov 2017 19:36:02 GMT
< Server: Apache-Coyote/1.1
< X-ASEN: SEN-L5422754
< X-Seraph-LoginReason: OK
< X-AUSERNAME: admin
< Cache-Control: no-cache, must-revalidate
< Expires: Thu, 01 Jan 1970 00:00:00 GMT
< X-Content-Type-Options: nosniff
< Content-Type: application/json
< Set-Cookie: JSESSIONID=C6ABA446ACA2497051852585C3B019AB; Path=/confluence; HttpOnly
< - Connection #0 to host quicksilver left intact
{code}
Actual Results
Label is not deleted and a 500 error is returned with messageKey=label.not.found:
{code}
- Trying 192.168.10.10...
- Connected to quicksilver (127.0.0.1) port 80 (#0)
- Server auth using Basic with user 'admin'
> DELETE /confluence/rest/api/content/66755/label?name=2016 HTTP/1.1
> Host: quicksilver
> Authorization: Basic YWRtaW46YWRtaW4=
> User-Agent: curl/7.43.0
> Accept: /
>
< HTTP/1.1 500 Internal Server Error
< Date: Wed, 08 Nov 2017 19:36:26 GMT
< Server: Apache-Coyote/1.1
< X-ASEN: SEN-L5422754
< X-Seraph-LoginReason: OK
< X-AUSERNAME: admin
< Cache-Control: no-cache, must-revalidate
< Expires: Thu, 01 Jan 1970 00:00:00 GMT
< X-Content-Type-Options: nosniff
< Content-Type: application/json
< Set-Cookie: JSESSIONID=09567DCB359114A39EDB4558CED13A2D; Path=/confluence; HttpOnly
< Connection: close
< Transfer-Encoding: chunked
< - Closing connection 0
{"statusCode":500,"message":"com.atlassian.confluence.core.service.NotValidException: [ValidationError [messageKey=label.not.found, args=[]]]"}
{code}
Notes
Labels that contain letters can be successfully deleted. It is also not possible to delete them through the label ID.
Workaround
No known workaround at the moment.