summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2013-08-29 10:02:32 -0700
committerDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2013-08-29 10:02:32 -0700
commit079d3a5dc1c86abf301b7a9f812a7920f78c5376 (patch)
tree1c99bac07c97ac7463953cc2d4c52b5e80711317 /doc
parent4aa2d16a3bcdee5f5fb25a51638a5801bddec613 (diff)
parent59f428dca20228984e9f50c33b12f54eb15638e5 (diff)
downloadgitlab-ce-079d3a5dc1c86abf301b7a9f812a7920f78c5376.tar.gz
Merge pull request #4906 from alexvh/standardize_diff_api_url
Standardize recently added commit diff api url
Diffstat (limited to 'doc')
-rw-r--r--doc/api/repositories.md29
1 files changed, 27 insertions, 2 deletions
diff --git a/doc/api/repositories.md b/doc/api/repositories.md
index 229d4409ea6..cb0626972e5 100644
--- a/doc/api/repositories.md
+++ b/doc/api/repositories.md
@@ -239,12 +239,37 @@ Parameters:
]
```
+## Get a single commit
+
+Get a specific commit identified by the commit hash or name of a branch or tag.
+
+```
+GET /projects/:id/repository/commits/:sha
+```
+
+Parameters:
+
++ `id` (required) - The ID of a project
++ `sha` (required) - The commit hash or name of a repository branch or tag
+
+```json
+{
+ "id": "6104942438c14ec7bd21c6cd5bd995272b3faff6",
+ "short_id": "6104942438c",
+ "title": "Sanitize for network graph",
+ "author_name": "randx",
+ "author_email": "dmitriy.zaporozhets@gmail.com",
+ "created_at": "2012-09-20T09:06:12+03:00"
+}
+```
+
+
## Get the diff of a commit
Get the diff of a commit in a project.
```
-GET /projects/:id/repository/commit/:sha
+GET /projects/:id/repository/commits/:sha/diff
```
Parameters:
@@ -323,7 +348,7 @@ Parameters:
Get the raw file contents for a file.
```
-GET /projects/:id/repository/commits/:sha/blob
+GET /projects/:id/repository/blobs/:sha
```
Parameters: