Hello,
I know this is not supported official API, but I"ve seen a few post where Atlassian member recommending "using the internal api even if it might change".
Now, I would like to run some automation script, and I require getting JIRA issues related to a Pull Request.
I am using the following internal API.
https://bitbucket.org/!api/internal/repositories/{workspace}/{slug}/pullrequests/${pull_request_id}/jira/issues?page=1
Now, I use other internal API in my automation script, they all work using the `oauth` login, but this API in particular REQUIRE a `cloud.session.token` passed as cookie in the request.
I I do not pass the cookie, the API do not fail, but return empty issues. in the case I do add a `cloud.session.token`, then the API return issues.
I have no idea where I can retrieve this `cloud.session.token` without manually adding it, and it keep getting disabled after a few days so it's a huge pain.
My question are, why this API require a `cloud.session.token` to return valid result, while it does work even with the normal oauth token but the list of issues is always empty.
And How can I retrieve a `cloud.session.token` automatically so I don't have to update my script every few days.
Thank you.