Feature #9725

Managing memberships and list existing roles via REST api

Added by Pierre-Yves Ronot almost 6 years ago. Updated over 5 years ago.

Status:ClosedStart date:
Priority:NormalDue date:
Assignee:-% Done:

0%

Category:REST API
Target version:-
Resolution:Duplicate

Description

For an application we are developping, we need to be able to manage memberships with the REST api.
Attached is a patch that enables :
- access to the members of a project using the ?include=members option of the project's interface
- get and edit membership informations with GET /member/{id}.xml and PUT /member/{id}.xml
- add and remove memberships with POST /projects/{id}/members.xml and DELETE /member/{id}.xml
- list roles with GET /roles.xml and get role informations with GET /role/{id}.xml

A member description takes this form (consistent with the web interface) (to POST to /projects/{id}/members.xml) :

<member>
    <role_ids type=\"array\">
        <role_id>3</role_id>
        <role_id>5</role_id>
    </role_ids>
    <user_ids type=\"array\">
        <user_id>1</user_id>
    </user_ids>
</member>

For the edition :

<member>
    <role_ids type="array">
        <role_id name="Manager ">4</role_id>
        <role_id name="Rapporteur ">5</role_id>
    </role_ids>
</member>

Can someone review the patch ? If possible, we would like this feature to be added to the next release.

Thanks in advance
Pierre-Yves

patch_membership - REST membership patch (11 KB) Pierre-Yves Ronot, 2011-12-05 13:19

patch_membership - Up to date patch (11 KB) Pierre-Yves Ronot, 2011-12-12 18:54

patch_membership - Patch for the 1.3 stable branch. (11.7 KB) Pierre-Yves Ronot, 2011-12-14 16:43


Related issues

Duplicates Redmine - Feature #7420: Rest API for projects members Closed 2011-01-24

Associated revisions

Revision 8799
Added by Jean-Philippe Lang over 5 years ago

Adds a simple API for listing roles (#9725).

History

#1 Updated by Pierre-Yves Ronot almost 6 years ago

Related : #7420, #4968

#2 Updated by Yannis Mazzer almost 6 years ago

+1

Very good idea, I asked for it some weeks ago on irc channel :)

Pierre-Yves Ronot wrote:

Related : #7420, #4968

#5 Updated by Jean-Philippe Lang over 5 years ago

  • Status changed from New to Closed
  • Resolution set to Duplicate

See #7420. Memberships API is added for 1.4. A simple role API was also added.
Have a look at REST API.

#6 Updated by Pierre-Yves Ronot over 5 years ago

Thank you very much, we appreciate it.

Also available in: Atom PDF