Rest Groups » History » Version 1

Jean-Philippe Lang, 2012-06-03 15:09

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