Rest Roles » History » Version 2
Jean-Philippe Lang, 2012-10-17 22:27
1 | 1 | Jean-Philippe Lang | h1. Roles |
---|---|---|---|
2 | |||
3 | {{>toc}} |
||
4 | |||
5 | h2. /roles.:format |
||
6 | |||
7 | h3. GET |
||
8 | |||
9 | Returns the list of roles. |
||
10 | |||
11 | +Examples+: |
||
12 | |||
13 | <pre> |
||
14 | GET /roles.xml |
||
15 | </pre> |
||
16 | |||
17 | +Response+: |
||
18 | |||
19 | <pre> |
||
20 | <?xml version="1.0" encoding="UTF-8"?> |
||
21 | <roles type="array"> |
||
22 | <role> |
||
23 | <id>1</id> |
||
24 | <name>Manager</name> |
||
25 | </role> |
||
26 | <role> |
||
27 | <id>2</id> |
||
28 | <name>Developer</name> |
||
29 | </role> |
||
30 | </roles> |
||
31 | </pre> |
||
32 | 2 | Jean-Philippe Lang | |
33 | h2. /roles/[id].:format |
||
34 | |||
35 | h3. GET |
||
36 | |||
37 | Returns the list of permissions for a given role (version:2.2.0). |
||
38 | |||
39 | +Examples+: |
||
40 | |||
41 | <pre> |
||
42 | GET /roles/5.xml |
||
43 | </pre> |
||
44 | |||
45 | +Response+: |
||
46 | |||
47 | <pre> |
||
48 | <role> |
||
49 | <id>5</id> |
||
50 | <name>Reporter</name> |
||
51 | <permissions type="array"> |
||
52 | <permission>view_issues</permission> |
||
53 | <permission>add_issues</permission> |
||
54 | <permission>add_issue_notes</permission> |
||
55 | ... |
||
56 | </permissions> |
||
57 | </role> |
||
58 | </pre> |