Rest IssueRelations » History » Version 1

Jean-Philippe Lang, 2011-07-04 19:21

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