Project

General

Profile

REST API, cannot add users to projects

Added by pf w almost 11 years ago

This line should work:

curl -X POST -H "Content-Type: application/json" -X PUT --data '{"membership":{"user_id": 80,"role_ids": [ 2 ]}}' -u foo:bar http://rpredmine/redmine/projects/1/memberships.json

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" 
   "http://www.w3.org/TR/html4/loose.dtd">
<html>
<title>Redmine 404 error</title>
<style>
body{
font-family: Trebuchet MS,Georgia,"Times New Roman",serif;
color:#303030;
margin:10px;
}
h1{
font-size:1.5em;
}
p{
font-size:0.8em;
}
</style>
<body>
  <h1>Page not found</h1>
  <p>The page you were trying to access doesn't exist or has been removed.</p>
  <p><a href="javascript:history.back()">Back</a></p>
</body>
</html>

I really cannot tell what I'm doing wrong as I'm following the documentation to the t.


Replies (2)

RE: REST API, cannot add users to projects - Added by pf w almost 11 years ago

Why no response?

pf w wrote:

This line should work:

[...]

[...]

I really cannot tell what I'm doing wrong as I'm following the documentation to the t.

RE: REST API, cannot add users to projects - Added by Jan Niggemann (redmine.org team member) almost 11 years ago

pf w wrote:

Why no response?

Because nobody reading your post knows an answer?

    (1-2/2)