Create Confluence Subpage via Web Request in Jira rule (HTTP Code 302)

Sebastian Seidel March 5, 2024

Hello dear community,
as mentioned in the headline, I would like to automatically create a subpage in Confluence under the main page "Tracking" when creating an issue in Jira. Unfortunately, I get the HTTP code 302 and no page is created.
Thank you very much for your help!

Web request data in the jira rule:

Webhook: https://confluence.page/link/to/project
Header:

  • Content-Type: application/jason
  • Authorization: Bearer <token>

 Custom data:

{
   "type": "page",
   "title": "{{issue.created}} {{issue.summary}}",
   "space": {
      "key": "<key>"
   },
   "ancestors": [
      {
         "id": "<id>",
         "type": "page"
      }
   ],
   "body": {
      "storage": {
         "value": "<p>Dies ist die Subpage für {{issue.key}} <p/>",
         "representation": "storage"
      }
   }
}

2 answers

2 accepted

0 votes
Answer accepted
Sebastian Seidel March 11, 2024

Perhaps an addition:
I have tried to insert various inputs in the authorization header and received the following responses:

  • Bearer <Pat> (HTTP Code 405)
  • Bearer <base 64 encoded username:Pw> (HTTP Code 302)
  • Basic <Pat> (HTTP Code 401)
  • Basic <base 64 encoded username:Pw> (HTTP Code 502)
  • only <PAT> (HTTP Code 302)
  • only <base 64 encoded username:Pw> (HTTP Code 302)

The forwarding of the HTTP code 302 redirects to the Login Page (/confluence/login.action?). Perhaps as a note it is a self-hosted environment.

I am grateful for any advice!

0 votes
Answer accepted
Sebastian Seidel March 11, 2024

I find a solution!

#Closed

Brad Evans April 9, 2024

This is the exact issue I am facing - what was your solution?

Suggest an answer

Log in or Sign up to answer