Rest Users » History » Version 2

Bevan Rudge, 2011-07-05 01:11
Adding documentation about include=memberships

1 1 Jean-Philippe Lang
h1. Users
2 1 Jean-Philippe Lang
3 1 Jean-Philippe Lang
h2. Listing users
4 1 Jean-Philippe Lang
5 1 Jean-Philippe Lang
  GET /users.xml
6 1 Jean-Philippe Lang
7 1 Jean-Philippe Lang
Returns users.
8 1 Jean-Philippe Lang
9 1 Jean-Philippe Lang
h2. Showing a user
10 1 Jean-Philippe Lang
11 1 Jean-Philippe Lang
  GET /users/[id].xml
12 1 Jean-Philippe Lang
13 1 Jean-Philippe Lang
Returns the user of given id.
14 1 Jean-Philippe Lang
15 1 Jean-Philippe Lang
  GET /users/current.xml
16 1 Jean-Philippe Lang
17 1 Jean-Philippe Lang
Returns the user whose credentials are used to access the API.
18 1 Jean-Philippe Lang
19 2 Bevan Rudge
  GET /users/3.json?include=memberships
20 2 Bevan Rudge
21 2 Bevan Rudge
Returns the details about user ID 3, and additional detail about the user's project roles and memberships.  *There are probably other such undocumented features like this*.
22 2 Bevan Rudge
23 1 Jean-Philippe Lang
h2. Creating a user
24 1 Jean-Philippe Lang
25 1 Jean-Philippe Lang
  POST /users.xml
26 1 Jean-Philippe Lang
27 1 Jean-Philippe Lang
Creates a user.
28 1 Jean-Philippe Lang
29 1 Jean-Philippe Lang
+Parameters+:
30 1 Jean-Philippe Lang
31 1 Jean-Philippe Lang
* @user@ (required): a hash of the user attributes, including:
32 1 Jean-Philippe Lang
33 1 Jean-Philippe Lang
  * @login@ (required): the user login
34 1 Jean-Philippe Lang
  * @password@: the user password
35 1 Jean-Philippe Lang
  * @firstname@ (required)
36 1 Jean-Philippe Lang
  * @lastname@ (required)
37 1 Jean-Philippe Lang
  * @mail@ (required)
38 1 Jean-Philippe Lang
39 1 Jean-Philippe Lang
+Response+:
40 1 Jean-Philippe Lang
41 1 Jean-Philippe Lang
  * @201 Created@: user was created
42 1 Jean-Philippe Lang
  * @422 Unprocessable Entity@: user was not created due to validation failures (response body contains the error messages)
43 1 Jean-Philippe Lang
44 1 Jean-Philippe Lang
h2. Updating a user
45 1 Jean-Philippe Lang
46 1 Jean-Philippe Lang
  PUT /users/[id].xml
47 1 Jean-Philippe Lang
48 1 Jean-Philippe Lang
+Parameters+:
49 1 Jean-Philippe Lang
50 1 Jean-Philippe Lang
* @user@ (required): a hash of the user attributes
51 1 Jean-Philippe Lang
52 1 Jean-Philippe Lang
Updates the user of given id.
53 1 Jean-Philippe Lang
54 1 Jean-Philippe Lang
h2. Deleting a user
55 1 Jean-Philippe Lang
56 1 Jean-Philippe Lang
Deleting a user is not supported yet.