I want to create a new version for my project via redmine api rest.I folowed the doc on the web https://www.redmine.org/projects/redmine/wiki/Rest_Versions
url = Configuration.redmine+"/projects/#{project_id}/versions"
uri = URI.parse(url)
req = Net::HTTP::Post.new(uri.request_uri)
req.basic_auth(user, pass)
req["Content-Type"] = "application/json"
payload = {
version: {
name:version_name
}
}
req.body = payload.to_json
http = Net::HTTP.new(uri.host, uri.port)
return = response = http.request(req)
the actual result is a HTTPUnprocessableEntity (422) and i expected a 201 created. The response body looks like this:
<div id="content">
<h2>422</h2>
</div>
supposedly the redmine api, when it gives this type of error, in the response body comes the reason of the error but here it shows me nothing
Redmine CALISOFT
422
@MartinZinovsky
– Marcos Octavio Guerra Liso Jun 27 '19 at 16:09