Last updated January 20, 2010 08:29, by lea_wang
Feedicon  
[[Home|&laquo; Back to API Home]] <h1>Members Resource</h1> __TOC__ == Member List == Enables the client to receive a paginated list of project members. Each member element in the list contains information such as member id, username, role and a link to the individual member resource. {|- border="1" | Version | 1.0 |- valign="top" | Authentication | required |- valign="top" | URI | <tt>/api/projects/{project-name}/members.json</tt> |- valign="top" | Request | <tt>GET /api/projects/{project-name}/members.json</tt> |- valign="top" | Response | Success: <tt>200</tt> <tt>OK</tt><br/> <tt>Content-Type: <a href="MediaTypesProjectRelated#application/vnd.com.kenai.members+json">application/vnd.com.kenai.members+json</a></tt> |} == Member Info == Enables the client to receive information for a single member given the member id. {|- border="1" | Version | 1.0 |- valign="top" | Authentication | required |- valign="top" | URI | <tt>/api/projects/{project-name}/members/{member-id}.json</tt> |- valign="top" | Request | <tt>GET /api/projects/{project-name}/members/{member-id}.json</tt> |- valign="top" | Response | Success: <tt>200</tt> <tt>OK</tt><br/> Failure: <tt>404</tt> <tt>Not Found</tt><br/> <tt>Content-Type: <a href="MediaTypesProjectRelated#application/vnd.com.kenai.member+json">application/vnd.com.kenai.member+json</a></tt> |} == Create Member== Enables the client to add a new member to a project. A project administrator can add any user with any role to the project. Otherwise, the user can only add himself as an observer to the project. {|- border="1" | Version | 1.0 |- valign="top" | Authentication | required |- valign="top" | URI | <tt>/api/projects/{project-name}/members.json</tt> |- valign="top" | Request | <tt>POST /api/projects/{project-name}/members.json</tt> |- valign="top" | Response | Success: <tt>200</tt> <tt>OK</tt><br/> Failure: <tt>403</tt> if permission denied <tt>Content-Type: <a href="MediaTypesProjectRelated#application/vnd.com.kenai.member.create+json">application/vnd.com.kenai.member.create+json</a></tt> |} == Update Member == Enables the client to update the role of a member. Only a project administrator can update a member including himself to any role. Note that a project owner's role cannot be updated. {|- border="1" | Version | 1.0 |- valign="top" | Authentication | required |- valign="top" | URI | <tt>/api/projects/{project-name}/members/{member-id}.json</tt> |- valign="top" | Request | <tt>PUT /api/projects/{project-name}/members/{member-id}.json</tt> |- valign="top" | Response | Success: <tt>200</tt> <tt>OK</tt><br/> Failure: <tt>403</tt> if permission denied. <tt>404</tt> if not found.<br/> <tt>Content-Type: <a href="MediaTypesProjectRelated#application/vnd.com.kenai.member.update+json">application/vnd.com.kenai.member.update+json</a></tt> |} == Delete Member == Enables the client to delete a member from a project. A project administrator can delete any member including himself except for the project owner. Otherwise, the user can only delete himself from the project. {|- border="1" | Version | 1.0 |- valign="top" | Authentication | required |- valign="top" | URI | <tt>/api/projects/{project-name}/members/{member-id}.json</tt> |- valign="top" | Request | <tt>DELETE /api/projects/{project-name}/members/{member-id}.json</tt> |- valign="top" | Response | Success: <tt>200</tt> <tt>OK</tt><br/> Failure: <tt>403</tt> if permission denied. <tt>404</tt> if not found |} <table> <tr> <td style="height:500px;">&nbsp;</td> <td style="height:500px;">&nbsp;</td> <td style="height:500px;">&nbsp;</td> </tr> </table>
  • Mysql
  • Glassfish
  • Jruby
  • Rails
  • Nblogo
Terms of Use; Privacy Policy;
© 2010, Oracle Corporation and/or its affiliates
(revision 20120127.ac94057)
 
 
Close
loading
Please Confirm
Close