Rest Users » History » Version 1

Jean-Philippe Lang, 2010-12-23 14:51

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 1 Jean-Philippe Lang
h2. Creating a user
20 1 Jean-Philippe Lang
21 1 Jean-Philippe Lang
  POST /users.xml
22 1 Jean-Philippe Lang
23 1 Jean-Philippe Lang
Creates a user.
24 1 Jean-Philippe Lang
25 1 Jean-Philippe Lang
+Parameters+:
26 1 Jean-Philippe Lang
27 1 Jean-Philippe Lang
* @user@ (required): a hash of the user attributes, including:
28 1 Jean-Philippe Lang
29 1 Jean-Philippe Lang
  * @login@ (required): the user login
30 1 Jean-Philippe Lang
  * @password@: the user password
31 1 Jean-Philippe Lang
  * @firstname@ (required)
32 1 Jean-Philippe Lang
  * @lastname@ (required)
33 1 Jean-Philippe Lang
  * @mail@ (required)
34 1 Jean-Philippe Lang
35 1 Jean-Philippe Lang
+Response+:
36 1 Jean-Philippe Lang
37 1 Jean-Philippe Lang
  * @201 Created@: user was created
38 1 Jean-Philippe Lang
  * @422 Unprocessable Entity@: user was not created due to validation failures (response body contains the error messages)
39 1 Jean-Philippe Lang
40 1 Jean-Philippe Lang
h2. Updating a user
41 1 Jean-Philippe Lang
42 1 Jean-Philippe Lang
  PUT /users/[id].xml
43 1 Jean-Philippe Lang
44 1 Jean-Philippe Lang
+Parameters+:
45 1 Jean-Philippe Lang
46 1 Jean-Philippe Lang
* @user@ (required): a hash of the user attributes
47 1 Jean-Philippe Lang
48 1 Jean-Philippe Lang
Updates the user of given id.
49 1 Jean-Philippe Lang
50 1 Jean-Philippe Lang
h2. Deleting a user
51 1 Jean-Philippe Lang
52 1 Jean-Philippe Lang
Deleting a user is not supported yet.