Hi,
I am using the below command to extract the data from the confluence server
curl -u user:"passkey" -X GET "https://confluence.sw.mycompany.com/pages/viewpage.action?pageId=127798346" | python -mjson.tool
This command though it extracts but while piping it to the python json format converter it is giving an error as show here:
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 79367 0 79367 0 0 50295 0 --:--:-- 0:00:01 --:--:-- 50295
Expecting value: line 2 column 1 (char 5)
However if I redirect the output of the curl command to a text file, I get the html content.
Could you please help me resolve this error.
My assumption: The confluence server is returning a html output, which python is treating as a byte array instead of strings so it is giving this error.
Please check and let me know.
I have followed the example available here:
https://developer.atlassian.com/server/confluence/confluence-rest-api-examples/
curl -u admin:admin -X GET "http://localhost:8080/confluence/rest/api/content?type=blogpost&start=0 &limit=10&expand=space,history,body.view,metadata.labels" | python -mjson.tool