Hi,
Im trying to use teh Jira REST api to create an issue, but have run into a problem that i cant seem to find a solution for, does anyone know of where I am going wrong. (Ive been able to do get requests ok, so happy that the authentication and url are setup correctly)
Code
self.class.base_uri @api_url self.class.basic_auth @api_username, @api_password self.class.headers({'Content-Type' => 'application/json'}) response = self.class.post("/issue", :body => { :fields => { :issuetype => { :id => "1" }, :project => { :key => "DEMO" }, :summary => "Test ticket", :description => "Test Desc" } })
Response
{"errorMessages"=>["Unrecognized token 'filssmay': was expecting 'null', 'true', 'false' or NaN\n at [Source: org.apache.catalina.connector.CoyoteInputStream@6d63c5; line: 1, column: 17]"]}
Thanks,
Scott
Community moderators have prevented the ability to post new answers.
Hi Scott, can you please take a look(or you can post it here) on your JSON string whether it is correct?
Thanks for your response, you triggered a thought and it turned out that I wasnt actually generating the json and isntead just sending over normal params.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You are welcome ;) Please mark answer as correct answer if it helped to you.
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.
You are welcome ;) Please mark answer as correct answer if it helped to you.
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.