Hello.
I used Jira api v2 to create issue and assignee uer for it. Something like what:
curl -D- -u 'user;user' -X POST --data '{"fields":{"project":{"key":"TEST"}, "summary":"TEST", "description":"Test Started", "assignee":{"name":"charlie"}, "issuetype":{"name":"Task"}}}' -H "Content-Type:application/json" https://myjira,test:443/rest/api/2/issue/ -k
curl -D- -u 'user:user: x' -X POST https://myjira.test:443/rest/api/2/issue/TEST-9312/transitions?expand=transitions.fields -k --data '{"transition":{"id":"291"}}'
curl --request POST --url 'https://myjira.test:443/rest/api/2/issue/TEST-9312/transitions?expand=transitions.fields' --user 'user:user' --header 'Accept: application/json' --header 'Content-Type: application/json' --data '{"transition":{"id":"291"}}' -k
I don't understand why i get this errors and why patterns so different.
Thanks
Dear @Serphentos ,
welcome to the community!
In your first call, you did not set the custom headers
Accept: application/json
Content-Type: application/json
Sometimes when you get a
XSRF check failed
you need to set the
User-Agent: x
header, too. HTTP_CODE 415 is in most cases an indicator for missing header information.
So long
Thomas
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.