I'm trying to set up an automation that should add a description to a given version when that version is released. Since there's no automation task for updating version descriptions, I'm using the Send web request task to do this through the API.
Web request URL: https://<my-domain>.atlassian.net/rest/api/3/version/{{version.id}}
HTTP method: PUT
Web request body: Custom data
Custom data:
{
"description": "Version {{version.name}} was released on {{now}}."
}
Headers:
Content-Type: application/json
Authorization: Basic <my-email:my-token | base64>
Problem
Jira Automation
Simple as that. However, when I'm triggering the automation it fails. The Audit log reports "Some errors".
Show more shows this:
Version released 06/05/2025, 11:20:51
Send web request 06/05/2025, 11:20:51
Unable to publish the web request - received HTTP status response:
Error found in the HTTP body response:
{"status-code":500,"stack-trace":""}
Not much information, just a status code 500.
Curl
Shooting directly at the endpoint using Postman doesn't work either, but with curl it works just fine!
curl command:
curl -u <my-email>:<my-token> -X PUT "https://<my-domain>.atlassian.net/rest/api/3/version/11538" -H "Accept: application/json" -H "Content-Type: application/json" -d "{\"description\": \"This is a pretty nice description\"}"
Where 11538 is an ID of one of the versions.
Things I've tried
I do have the ADMINISTER_PROJECTS permission, checked that through the mypermissions endpoint.
I have also tried:
- Other combinations of JSON data in the body
- Changing the actor of the automation from "Automation for Jira" to myself
- Create a new API token with ALL the access rights (not only the ones specified in the AIPI documentation: write:project-version:jira, read:project-version:jira)
- Doing a POST to /version/{{version.id}}/move, same error there
Conclusion
I was thinking that maybe it's an issue with the headers sent but an internal server error doesn't indicate that(?).
Anyone has any idea what could be wrong?