How can I bring an excellentable data in the Confluence page?

107 Views Asked by At

I have to bring data using unirest from the Confluence page. But, data consisted in Excellentable of kind of web excel. As below code, if using asString() or asJson then return html tab + script sources. Please, Tell me how to bring data from Excellentable. Thanks.

HttpResponse<String> response = Unirest.get(strConUrl)
                      .basicAuth(userId, userPw)
                      .header("Accept", "application/json")
                      .header("Content-Type", "application/json")
                      .asString();


HttpResponse<JsonNode> response = Unirest.get(strConUrl)
                      .basicAuth(userId, userPw)
                      .header("Accept", "application/json")
                      .header("Content-Type", "application/json")
                      .asJson();
1

There are 1 best solutions below

0
Andrii Maliuta On

It is better to use REST API to get pages body data: https://docs.atlassian.com/ConfluenceServer/rest/8.0.2/. In this way you can get "clean" text or HTML/xHTML as you need.