Add REST endpoint to get an arbitrary commit from a project

Bug: issue 2604
Change-Id: I138e60c5291d61c379e947ea26b0fd9d5555c743
Signed-off-by: Edwin Kempin <edwin.kempin@sap.com>
diff --git a/Documentation/rest-api-projects.txt b/Documentation/rest-api-projects.txt
index fc8ccba..7c4f479 100644
--- a/Documentation/rest-api-projects.txt
+++ b/Documentation/rest-api-projects.txt
@@ -972,6 +972,59 @@
   }
 ----
 
+[[commit-endpoints]]
+== Commit Endpoints
+
+[[get-commit]]
+=== Get Commit
+--
+'GET /projects/link:#project-name[\{project-name\}]/commits/link:#commit-id[\{commit-id\}]'
+--
+
+Retrieves a commit of a project.
+
+The commit must be visible to the caller.
+
+.Request
+----
+  GET /projects/work%2Fmy-project/commits/a8a477efffbbf3b44169bb9a1d3a334cbbd9aa96 HTTP/1.0
+----
+
+As response a link:rest-api-changes.html#commit-info[CommitInfo] entity
+is returned that describes the commit.
+
+.Response
+----
+  HTTP/1.1 200 OK
+  Content-Disposition: attachment
+  Content-Type: application/json;charset=UTF-8
+
+  )]}'
+  {
+    "commit": "184ebe53805e102605d11f6b143486d15c23a09c",
+    "parents": [
+      {
+        "commit": "1eee2c9d8f352483781e772f35dc586a69ff5646",
+        "subject": "Migrate contributor agreements to All-Projects."
+      }
+    ],
+    "author": {
+      "name": "Shawn O. Pearce",
+      "email": "sop@google.com",
+      "date": "2012-04-24 18:08:08.000000000",
+      "tz": -420
+    },
+    "committer": {
+      "name": "Shawn O. Pearce",
+      "email": "sop@google.com",
+      "date": "2012-04-24 18:08:08.000000000",
+      "tz": -420
+    },
+    "subject": "Use an EventBus to manage star icons",
+    "message": "Use an EventBus to manage star icons\n\nImage widgets that need to ..."
+  }
+----
+
 [[dashboard-endpoints]]
 == Dashboard Endpoints
 
@@ -1199,6 +1252,10 @@
 The name of a branch or `HEAD`. The prefix `refs/heads/` can be
 omitted.
 
+[[commit-id]]
+=== \{commit-id\}
+Commit ID.
+
 [[dashboard-id]]
 === \{dashboard-id\}
 The ID of a dashboard in the format '<ref>:<path>'.