Rest IssueRelations » History » Version 1
Jean-Philippe Lang, 2011-07-04 19:21
1 | 1 | Jean-Philippe Lang | h1. Issue Relations |
---|---|---|---|
2 | |||
3 | {{>toc}} |
||
4 | |||
5 | h2. /issues/:issue_id/relations |
||
6 | |||
7 | h3. POST |
||
8 | |||
9 | Creates a relation for the issue of given id (:issue_id). |
||
10 | |||
11 | +Parameters+: |
||
12 | |||
13 | * @relation@ (required): a hash of the relation attributes, including: |
||
14 | |||
15 | * @issue_to_id@ (required): the id of the related issue |
||
16 | * @relation_type@ (required): the type of relation (in: "relates", "duplicates", "duplicated", "blocks", "blocked", "precedes", "follows") |
||
17 | * @delay@ (optional): the delay for a "precedes" or "follows" relation |
||
18 | |||
19 | +Response+: |
||
20 | |||
21 | * @201 Created@: relation was created |
||
22 | * @422 Unprocessable Entity@: relation was not created due to validation failures (response body contains the error messages) |
||
23 | |||
24 | h2. /issues/:issue_id/relations/:id |
||
25 | |||
26 | h3. GET |
||
27 | |||
28 | Returns the relation of given id. |
||
29 | |||
30 | +Response+: |
||
31 | |||
32 | <pre> |
||
33 | <?xml version="1.0" encoding="UTF-8"?> |
||
34 | <relation> |
||
35 | <id>1819</id> |
||
36 | <issue_id>8470</issue_id> |
||
37 | <issue_to_id>8469</issue_to_id> |
||
38 | <relation_type>relates</relation_type> |
||
39 | <delay/> |
||
40 | </relation> |
||
41 | </pre> |
||
42 | |||
43 | h3. DELETE |
||
44 | |||
45 | Deletes the relation of given id. |
||
46 | |||
47 | +Response+: |
||
48 | |||
49 | * @200 OK@: relation was deleted |
||
50 | * @422 Unprocessable Entity@: relation was not deleted (response body contains the error messages) |