Basically the goal of what I'm supposed to do is to change a confluence page's status based on a Jira issue type, i.e. if a Jira issue transitions to "In Progress" it's respective Confluence page should change it's status to "In Progress". The Confluence already exists. So I am using the GET to get this value and lastly, the PUT to update it to the new status. But I can't even get this status value since it does not show up in the content. I am sharing the complete automation. Any help is appreciated.
Hi @Sérgio Baixo and welcome to the community!
You can get the status of a page by using this endpoint of the Confluence API as follows:
Please note that the number in the URL is the page ID.
To update the page status, you can use this endpoint as follows:
For a list of all available statuses and their IDs, have a look at this endpoint.
Hope this helps!
Hi there @Michel Neeser thank you for your welcome and for your response. The GET request worked and I was able to get the web response body that I needed. As for the POST request, your answer was not working for me due to the request body. After much trial and error, I found the the correct answer, for my case, was to leave the request body just like this:
{
"id": "48169017",
"name": "In Progress",
"color": "#2684ff"
}
I had to perform a GET for each state to get it's respective color and ID to proceed with the rest of my automation.
Nonetheless you helped me a lot, thanks again :)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Sérgio Baixo A PUT request with the body containing only the ID worked for me, although this might be because I was using Confluence’s default statuses. Either way, glad it helped! :-)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.