Confluence REST API v2 - no body content (tasks)

Suhrab Baryal March 28, 2023

Hello community, I am trying to pull the data from Confluence tasks

I got the json objects back from the API but there is content missing

Does anyone know how to get the body of these tasks?

Please see screenshot below

 

1.png

Also, I'm writing an app that fetches and maps confluence tasks, but I can't get the json responds.

What am I doing wrong, I have all rights to view and in the web view of the rest of the call I can see the Json objects, but why can't I call them up via the app?

Symbol „Von der Community überprüft“

const loadTasks = async () => {

const response = await api
.asUser()
.requestConfluence(route`/wiki/api/v2/tasks`, {
headers: {
'Accept': 'application/json'
}
});

const responseJson = await response.json(); //extract JSON from the http response
// log response to console for testing
console.log(`Response: ${response.status} ${response.statusText}`);
console.log(await response.json());
console.log(responseJson)

return responseJson;
}

Thanks in advance

1 answer

0 votes
Ben Rivlin
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
September 10, 2024

Super late to this, I know, but I came across this and had the same issue, you need to provide a body-format parameter in order to see the body. As per the documentation.

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
STANDARD
PERMISSIONS LEVEL
Product Admin
TAGS
AUG Leaders

Atlassian Community Events