I am getting a 400 error when trying to use the JIRA API
to create a workflow object i.a.w. the JIRA Cloud API specification:
The HTTP POST body JSON is shown below and should be valid according to the documentation and example.
The API end point is `/rest/api/3/workflow`.
Any thoughts on why the server is rejecting it?
{
"name": "foo-workflow-name-278828446683910193",
"transitions": [
{
"name": "Created",
"to": "1",
"type": "initial",
"description": "Test Workflow Transition",
"from": []
},
{
"name": "In progress",
"to": "2",
"type": "directed",
"description": "Dummy transition desc.",
"from": [
"1"
],
"screen": {
"id": "10001"
}
},
{
"name": "Completed",
"to": "3",
"type": "global",
"from": []
}
],
"statuses": [
{
"id": "1",
"properties": {
"jira.issue.editable": "false"
}
},
{
"id": "2"
},
{
"id": "3"
}
],
"description": "A dull description for a workflow."
}
Furthermore, the error response from the server does not contain enough detail to resolve the issue and that's a problem per-se.
`{"errorMessages":["Invalid request payload. Refer to the REST API documentation and try again."]}`
This was an error in the serialization code, but I also discovered that the example values aren't valid, so there is actually an error in the JIRA API documentation.
Id "2" doesn't exist by default AFAICT in a "clean" JIRA cloud instance.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.