summaryrefslogtreecommitdiff
path: root/doc/api/repository_files.md
diff options
context:
space:
mode:
authorJacob Vosmaer <jacob@gitlab.com>2016-08-09 12:27:37 +0200
committerJacob Vosmaer <jacob@gitlab.com>2016-08-09 12:27:37 +0200
commit7a99826694ccc9dc5fd5f8cbecf7b51f8d690de4 (patch)
treee58828158e6a818e82a0a7cda95b642998233d77 /doc/api/repository_files.md
parent71952d057d5edad0697d7da76f5da034689e0f4a (diff)
parent551ffc0a4d25a381e9f8f6a8d6f2793bb87f3145 (diff)
downloadgitlab-ce-7a99826694ccc9dc5fd5f8cbecf7b51f8d690de4.tar.gz
Merge branch 'master' of https://gitlab.com/gitlab-org/gitlab-ce into remove-grack-lfs
Diffstat (limited to 'doc/api/repository_files.md')
-rw-r--r--doc/api/repository_files.md16
1 files changed, 16 insertions, 0 deletions
diff --git a/doc/api/repository_files.md b/doc/api/repository_files.md
index 623063f357b..1b8ee88b4ed 100644
--- a/doc/api/repository_files.md
+++ b/doc/api/repository_files.md
@@ -12,6 +12,10 @@ Allows you to receive information about file in repository like name, size, cont
GET /projects/:id/repository/files
```
+```bash
+curl -X GET -H 'PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK' 'https://gitlab.example.com/api/v3/projects/13083/repository/files?file_path=app/models/key.rb&ref=master'
+```
+
Example response:
```json
@@ -39,6 +43,10 @@ Parameters:
POST /projects/:id/repository/files
```
+```bash
+curl -X POST -H 'PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK' 'https://gitlab.example.com/api/v3/projects/13083/repository/files?file_path=app/project.rb&branch_name=master&content=some%20content&commit_message=create%20a%20new%20file'
+```
+
Example response:
```json
@@ -62,6 +70,10 @@ Parameters:
PUT /projects/:id/repository/files
```
+```bash
+curl -X PUT -H 'PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK' 'https://gitlab.example.com/api/v3/projects/13083/repository/files?file_path=app/project.rb&branch_name=master&content=some%20other%20content&commit_message=update%20file'
+```
+
Example response:
```json
@@ -94,6 +106,10 @@ Currently gitlab-shell has a boolean return code, preventing GitLab from specify
DELETE /projects/:id/repository/files
```
+```bash
+curl -X PUT -H 'PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK' 'https://gitlab.example.com/api/v3/projects/13083/repository/files?file_path=app/project.rb&branch_name=master&commit_message=delete%20file'
+```
+
Example response:
```json