Dear Community,
I'm again facing issues when special characters are used in rest template requests towards Confluence: Confluence returns 401.
Getting a page with title "Test 1" works. Getting a page with title "Test ä" or "Test &" however don't work.
A working example:
https://edrup-dev4.atlassian.net/wiki/rest/api/content?spaceKey=CT&title=Cite%20source%201&expand=body.storage%2Cversion
Not working:
https://edrup-dev4.atlassian.net/wiki/rest/api/content?spaceKey=CT&title=Cite%20source%C3%A4%C3%BC%C3%9F%201&expand=body.storage%2Cversion
Remark: when I HTML-escape the Umlauts in the sample before JWT signing works but Confluence is then not able to find the content.
Any ideas?
Thank you
Andreas
Hello @Andreas Purde ,
I am unable to reproduce the reported issues: neither the 401 nor the empty content.
I have tried in the browser as well as using Postman and Curl. The only difference is that in Curl you can only pass the title url-encoded (in the browser and in postman it gets url-encoded automatically):
curl -u <EMAIL-ADDRESS>:<API-TOKEN> "https://SITE-NAME.atlassian.net/wiki/rest/api/content?spaceKey=QWER&title=Test+%C3%A4&expand=body.storage,version" | json_pp
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 5926 0 5926 0 0 11574 0 --:--:-- --:--:-- --:--:-- 11551
{
"start" : 0,
"limit" : 25,
"_links" : {
"base" : "https://SITE-NAME.atlassian.net/wiki",
"self" : "https://SITE-NAME.atlassian.net/wiki/rest/api/content?spaceKey=QWER&expand=body.storage,version&title=Test+%C3%A4",
"context" : "/wiki"
},
"results" : [
{
"macroRenderedOutput" : {},
"type" : "page",....
....
Can you kindly repeat the same test on your side and let me know if you get the same results?
Also, in case you still face the issue, as possible workaround you can either:
Cheers,
Dario
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.