Hi Community,
We are trying to create defects automatically from ALM to Jira Cloud using Scriptrunner or Jira Automation. We were looking at ALM Rest Api documentation to create this 'integration'. Just to let you know, we only want to read ALM defects collection through rest api and then create the defects using a branch in automation or an array in scriptrunner.
I tried first using Postman and everything goes smoothly, but when I tried to replicate the scenario in Cloud I got issues when using defects endpoint after authentication.
I'm doing the following for that.
- Create a POST to /qcbin/authentication-point/alm-authenticate endpoint with the xml body with the username and password
- Create a POST to /qcbin/rest/site-session endpoint with the right xml body
- Create a GET to retrieve a defects collection from /qcbin/rest/domains/{domain}/projects/{project}/defects endpoint
This is Postman works great, however within Jira Cloud the 3rd step always throws me same error: Authentication failed. Browser based integrations - to login append '?login-form-required=y' to the url you tried to access.
I tried adding the cookies manually (LWSSO, JSESSIONID, QCsession, ALM_user and XFR_Token) as a header, adding the parameter at the end of the endpoint but I can't make it work. I also tried using the sign-in endpoint to get the cookies (except the JSESSIONID) but everything returns the same 401 issue. Do you know how can I fix this or if it is not possible to integrate with ALM within a browser based application like Jira?
Thanks!