Rest Groups » History » Version 1
Jean-Philippe Lang, 2012-06-03 15:09
1 | 1 | Jean-Philippe Lang | h1. Groups |
---|---|---|---|
2 | |||
3 | h2. /groups.:format |
||
4 | |||
5 | h3. GET |
||
6 | |||
7 | Returns the list of groups. |
||
8 | |||
9 | +Example+: |
||
10 | |||
11 | GET /groups.xml |
||
12 | |||
13 | +Response+: |
||
14 | |||
15 | <pre> |
||
16 | <groups type="array"> |
||
17 | <group> |
||
18 | <id>53</id> |
||
19 | <name>Managers</name> |
||
20 | </group> |
||
21 | <group> |
||
22 | <id>55</id> |
||
23 | <name>Developers</name> |
||
24 | </group> |
||
25 | </groups> |
||
26 | </pre> |
||
27 | |||
28 | h3. POST |
||
29 | |||
30 | Creates a group. |
||
31 | |||
32 | +Parameters+: |
||
33 | |||
34 | * @group@ (required): a hash of the group attributes, including: |
||
35 | |||
36 | * @name@ (required): the group name |
||
37 | * @user_ids@: ids of the group users (an empty group is created if not provided) |
||
38 | |||
39 | +Example+: |
||
40 | |||
41 | <pre> |
||
42 | POST /groups.xml |
||
43 | |||
44 | <?xml version="1.0" encoding="ISO-8859-1" ?> |
||
45 | <group> |
||
46 | <name>Developers</name> |
||
47 | <user_ids> |
||
48 | <user_id>3</user_id> |
||
49 | <user_id>5</user_id> |
||
50 | </user_ids> |
||
51 | </group> |
||
52 | </pre> |
||
53 | |||
54 | +Response+: |
||
55 | |||
56 | * @201 Created@: group was created |
||
57 | * @422 Unprocessable Entity@: group was not created due to validation failures (response body contains the error messages) |
||
58 | |||
59 | h2. /groups/:id.:format |
||
60 | |||
61 | TODO |
||
62 | |||
63 | h2. /groups/:id/users.:format |
||
64 | |||
65 | TODO |
||
66 | |||
67 | h2. /groups/:id/users/:user_id.:format |
||
68 | |||
69 | TODO |