title: Does anyone know how to create a version via Redmine Api Rest?
body: <p>I want to create a new version for my project via redmine api rest.I folowed the doc on the web <a href="https://www.redmine.org/projects/redmine/wiki/Rest_Versions" rel="nofollow noreferrer">https://www.redmine.org/projects/redmine/wiki/Rest_Versions</a></p>
  
  <pre><code>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)
  </code></pre>
  
  <p>the actual result is a HTTPUnprocessableEntity (422) and i expected a 201 created. The response body looks like this: </p>
  
  <pre><code>&lt;div id="content"&gt;
      &lt;h2&gt;422&lt;/h2&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>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</p>