I am trying create issue via HTTP POST with the url: http://127.0.0.1:8080/secure/CreateIssueDetails.jspa?pid=10000&issuetype=1&summary=My+Test+Issue&os_username=admin&os_password=admin
But I am receiving the message:
XSRF Security Token Missing
JIRA could not complete this action due to a missing form token.
What I have change in my url or in my jira configuration?
Thanks!
This is protection against cross-site request forging. A form would pass "atl_token" parameter, which you can first read by loading CreateIssue.jspa page.
However, if you're POSTing from code, you can add {{X-Atlassian-Token: no-check}} header.
See here: http://confluence.atlassian.com/display/JIRADEV/Form+Token+Handling
But as should be the url of the post, I tried in various ways by adding the parameter "atl_token" and does not work. It only works by disabling the token?
best regards,
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
If you are sending HTTP POST, then URL does not contain any parameters - they are send as the content after request headers.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I can upload attachments via HTTP POST? If yes, I can do this in the same post of the issue create?
Best regards,
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You may disable token checking via the properties files as mentioned in the Jira documentation (a restart of the server will be required to take effect).
Alternately, you can pre-populate the form and the let the authenticated user verify / create the issue.
To do this, post your form like so:
<form action="{jira-base}/secure/CreateIssueDetails!init.jspa" target="_blank" method="post"> <input name="pid" value="10060" type="hidden"> <input name="issuetype" value="6" type="hidden"> <input name="assignee" value="-1" type="hidden"> <input name="reporter" value="someuser" type="hidden"> <input name="description" value="description" type="hidden"> <input name="priority" value="3" type="hidden"> <input name="components" value="10340" type="hidden"> <input name="fixVersions" value="10312" type="hidden"> <input name="summary" value="some summary " type="hidden"> <input value="ACTION REQUEST" type="submit"> </form>
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.