summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEdwin Kempin <edwin.kempin@gmail.com>2014-07-19 00:31:26 +0000
committerGerrit Code Review <noreply-gerritcodereview@google.com>2014-07-17 19:54:51 +0000
commit9d9e54df09a59b45aebdeb0b63152e3ac5ec5417 (patch)
treef827f26c03b1863882a16d381f8e0b1d84284bca
parent512448049daee35967fc5ce288d1758ea16fee0f (diff)
parent669f251081bf28f477f9f86bb32110639773b4d2 (diff)
Merge "Add documentation of the changes REST API /related endpoint"
-rw-r--r--Documentation/rest-api-changes.txt104
1 files changed, 104 insertions, 0 deletions
diff --git a/Documentation/rest-api-changes.txt b/Documentation/rest-api-changes.txt
index 63e549983f..7a01b9985f 100644
--- a/Documentation/rest-api-changes.txt
+++ b/Documentation/rest-api-changes.txt
@@ -1554,6 +1554,79 @@ for the current patch set.
}
----
+[[get-related-changes]]
+=== Get Related Changes
+--
+'GET /changes/link:#change-id[\{change-id\}]/revisions/link:#revision-id[\{revision-id\}]/related'
+--
+
+Retrieves related changes of a revision. Related changes are changes that either
+depend on, or are dependencies of the revision.
+
+.Request
+----
+ GET /changes/gerrit~master~I5e4fc08ce34d33c090c9e0bf320de1b17309f774/revisions/b1cb4caa6be46d12b94c25aa68aebabcbb3f53fe/related HTTP/1.0
+----
+
+As result a link:#related-changes-info[RelatedChangesInfo] entity is returned
+describing the related changes.
+
+.Response
+----
+ HTTP/1.1 200 OK
+ Content-Disposition: attachment
+ Content-Type: application/json;charset=UTF-8
+
+ )]}'
+ {
+ "changes": [
+ {
+ "change_id": "Ic62ae3103fca2214904dbf2faf4c861b5f0ae9b5",
+ "commit": {
+ "commit": "78847477532e386f5a2185a4e8c90b2509e354e3",
+ "parents": [
+ {
+ "commit": "bb499510bbcdbc9164d96b0dbabb4aa45f59a87e"
+ }
+ ],
+ "author": {
+ "name": "David Ostrovsky",
+ "email": "david@ostrovsky.org",
+ "date": "2014-07-12 15:04:24.000000000",
+ "tz": 120
+ },
+ "subject": "Remove Solr"
+ },
+ "_change_number": 58478,
+ "_revision_number": 2,
+ "_current_revision_number": 2
+ },
+ {
+ "change_id": "I5e4fc08ce34d33c090c9e0bf320de1b17309f774",
+ "commit": {
+ "commit": "b1cb4caa6be46d12b94c25aa68aebabcbb3f53fe",
+ "parents": [
+ {
+ "commit": "d898f12a9b7a92eb37e7a80636195a1b06417aad"
+ }
+ ],
+ "author": {
+ "name": "David Pursehouse",
+ "email": "david.pursehouse@sonymobile.com",
+ "date": "2014-06-24 02:01:28.000000000",
+ "tz": 540
+ },
+ "subject": "Add support for secondary index with Elasticsearch"
+ },
+ "_change_number": 58081,
+ "_revision_number": 10,
+ "_current_revision_number": 10
+ }
+ ]
+ }
+----
+
+
[[set-review]]
=== Set Review
--
@@ -2861,6 +2934,37 @@ Whether the query would deliver more results if not limited. +
Only set on either the last or the first change that is returned.
|==================================
+[[related-changes-info]]
+=== RelatedChangesInfo
+The `RelatedChangesInfo` entity contains information about related
+changes.
+
+[options="header",width="50%",cols="1,6"]
+|===========================
+|Field Name |Description
+|`changes` |A list of
+link:#related-change-and-commit-info[RelatedChangeAndCommitInfo] entities
+describing the related changes. Sorted by git commit order, newest to
+oldest. Empty if there are no related changes.
+|===========================
+
+[[related-change-and-commit-info]]
+=== RelatedChangeAndCommitInfo
+
+The `RelatedChangeAndCommitInfo` entity contains information about
+a related change and commit.
+
+[options="header",width="50%",cols="1,^1,5"]
+|===========================
+|Field Name ||Description
+|`change_id` |optional|The Change-Id of the change.
+|`commit` ||The commit as a
+link:#commit-info[CommitInfo] entity.
+|`_change_number` |optional|The change number.
+|`_revision_number` |optional|The revision number.
+|`_current_revision_number`|optional|The current revision number.
+|===========================
+
[[change-message-info]]
=== ChangeMessageInfo
The `ChangeMessageInfo` entity contains information about a message