I want to create cross-project releases using Jira REST API.
I've tried a PUT and a PATCH request to rest/api/3/plans/plan/{planId} and I got 415 and 400 responses.
I've tried the following payloads:
PUT
{
"releases"/"crossProjectReleases": [{
"name": "2.99.0"
}]
}
PATCH
Hi @Cláudia Sardinha and welcome to the community!
I've spent some time trying to figure it out, but I end up in the same issue you do: Mostly 415. Also there's no documentation on how to properly map the JSON Patch scheme to the fields. Maybe someone will pick up this question who has the answer.
Until then I can share that I've made good experience with using the internal REST endpoints that the browser uses in the background when you apply changes to the plan through the UI.
In case you're not familiar with how to do this:
- Open the Network Tab in the Developer Tools of your browser. Load the configuration page where you'd manually would the adjustment that you want to automate. Wait for the page to load. and then clear the network tabs contents.
- Now perform the action and look for the "update" request in the network tab:
- Click on this request and copy the URL and the Payload. By adjusting the payload and using this internal REST endpoint, you should be able to automate what you're looking for.
Those internal endpoints should always be used with caution, but for this particular one I can tell you that I've built production automations for clients years ago and they still run to this day. So it doesn't seem to be changed; and if so, Atlassian hopefully versions them properly, so that using version 3 will grant you a stable endpoint.
I hope this helps!
Greetings
Philipp
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.