Actions
Rest IssueRelations » History » Revision 6
« Previous |
Revision 6/10
(diff)
| Next »
Go MAEDA, 2018-09-19 02:06
Added syntax highlighting
Issue Relations¶
- Table of contents
- Issue Relations
/issues/:issue_id/relations.:format¶
GET¶
Returns the relations for the issue of given id (:issue_id).
Example:
GET /issues/8470/relations.xml
Response:
<?xml version="1.0" encoding="UTF-8"?>
<relations type="array">
<relation>
<id>1819</id>
<issue_id>8470</issue_id>
<issue_to_id>8469</issue_to_id>
<relation_type>relates</relation_type>
<delay/>
</relation>
<relation>
<id>1820</id>
<issue_id>8470</issue_id>
<issue_to_id>8467</issue_to_id>
<relation_type>relates</relation_type>
<delay/>
</relation>
</relations>
Note: when getting an issue, relations can also be retrieved in a single request using /issues/:id.:format?include=relations
.
POST¶
Creates a relation for the issue of given id (:issue_id).
Parameters:
relation
(required): a hash of the relation attributes, including:issue_to_id
(required): the id of the related issuerelation_type
(required to explicit : default "relates"): the type of relation (in: "relates", "duplicates", "duplicated", "blocks", "blocked", "precedes", "follows", "copied_to", "copied_from")delay
(optional): the delay for a "precedes" or "follows" relation
Response:
201 Created
: relation was created422 Unprocessable Entity
: relation was not created due to validation failures (response body contains the error messages)
/relations/:id.:format¶
GET¶
Returns the relation of given id.
Example:
GET /relations/1819.xml
Response:
<?xml version="1.0" encoding="UTF-8"?>
<relation>
<id>1819</id>
<issue_id>8470</issue_id>
<issue_to_id>8469</issue_to_id>
<relation_type>relates</relation_type>
<delay/>
</relation>
DELETE¶
Deletes the relation of given id.
Response:
200 OK
: relation was deleted422 Unprocessable Entity
: relation was not deleted (response body contains the error messages)
Updated by Go MAEDA over 6 years ago · 6 revisions