summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArihant <arihantar@gmail.com>2019-02-12 12:31:33 +0000
committerAchilleas Pipinellis <axil@gitlab.com>2019-02-12 12:31:33 +0000
commit3ad8021e5366002859c0c3d93dce1e2822abcbd6 (patch)
tree6859591e806a4f109d91f22319cb453db5b91fe8
parent633e9f3175b25bb3ac39bc08ef1d4da56db643a5 (diff)
downloadgitlab-ce-3ad8021e5366002859c0c3d93dce1e2822abcbd6.tar.gz
Added example for get file archive
-rw-r--r--doc/api/repositories.md6
1 files changed, 5 insertions, 1 deletions
diff --git a/doc/api/repositories.md b/doc/api/repositories.md
index 104c64a89ce..681dc72c934 100644
--- a/doc/api/repositories.md
+++ b/doc/api/repositories.md
@@ -119,7 +119,11 @@ would send an archive in ZIP format.
Parameters:
- `id` (required) - The ID or [URL-encoded path of the project](README.md#namespaced-path-encoding) owned by the authenticated user
-- `sha` (optional) - The commit SHA to download. A tag, branch reference or sha can be used. This defaults to the tip of the default branch if not specified
+- `sha` (optional) - The commit SHA to download. A tag, branch reference, or SHA can be used. This defaults to the tip of the default branch if not specified. For example:
+
+ ```sh
+ curl --header "PRIVATE-TOKEN: <your_access_token>" https://gitlab.com/api/v4/projects/<project_id>/repository/archive?sha=<commit_sha>
+ ```
## Compare branches, tags or commits