Rest Users » History » Version 6

« Previous - Version 6/27 (diff) - Next » - Current version
Jean-Philippe Lang, 2012-06-03 15:19
add groups association


Listing users

GET /users.xml

Returns users.

Showing a user

GET /users/[id].xml

Returns the user of given id.

GET /users/current.xml

Returns the user whose credentials are used to access the API.


  • include (optional): a coma separated list of associations to include in the response:
    • memberships
    • groups (added in 2.1)


GET /users/3.xml?include=memberships,groups

Returns the details about user ID 3, and additional detail about the user's project memberships.


  <custom_fields type="array" />
  <memberships type="array">
      <project name="Redmine" id="1"/>
      <roles type="array">
        <role name="Administrator" id="3"/>
        <role name="Contributor" id="4"/>
  <groups type="array">
    <group id="20" name="Developers"/>

Creating a user

POST /users.xml

Creates a user.


  • user (required): a hash of the user attributes, including:
    • login (required): the user login
    • password: the user password
    • firstname (required)
    • lastname (required)
    • mail (required)
    • auth_source_id: authentication mode id


POST /users.xml

<?xml version="1.0" encoding="ISO-8859-1" ?>


  • 201 Created: user was created
  • 422 Unprocessable Entity: user was not created due to validation failures (response body contains the error messages)

Updating a user

PUT /users/[id].xml


  • user (required): a hash of the user attributes (same as for user creation)

Updates the user of given id.

Deleting a user

DELETE /users/[id].xml

Deletes the user of given id.


  • 200 OK: user was deleted