REST API Execute rejects all commands
I've successfully being able to fetch issues using REST API but the update of issues always fails with the invalid command error message, e.g.
{"value":"Command [State Fixed] is invalid:"}
I've tried to use PostMan and Node.js (I'm quite novice). I've tested the used commands also in the browser and they are working ok.
Below is the example used from Node.js:
options = {
headers: {accept:'application/json', authorization:'Bearer perm:<my-perm-key>, 'Content-Type':'application/x-www-form-urlencoded'},
body:'command=State Fixed'
}
res = req('POST', 'https://<my-domain>.myjetbrains.com/youtrack/rest/issue/<my-issue-id>/execute', options);
Please sign in to leave a comment.
Ok, Solved this. The permanent token for some reason did not have rights for the object. I created a new permanent token for my user account and not this works.
The error message was really misleading ...