Commit f64dd1b492952083449dc7f0e226cf7b20e1a1fb
1 parent
e8bb32e6
Exists in
master
and in
4 other branches
Add docs for create file API
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
Showing
1 changed file
with
16 additions
and
1 deletions
Show diff stats
doc/api/repositories.md
... | ... | @@ -368,4 +368,19 @@ GET /projects/:id/repository/archive |
368 | 368 | |
369 | 369 | Parameters: |
370 | 370 | + `id` (required) - The ID of a project |
371 | -+ `sha` (optional) - The commit sha to download defaults to the tip of the default branch | |
372 | 371 | \ No newline at end of file |
372 | ++ `sha` (optional) - The commit sha to download defaults to the tip of the default branch | |
373 | + | |
374 | + | |
375 | +## Create new file in repository | |
376 | + | |
377 | +``` | |
378 | +POST /projects/:id/repository/files | |
379 | +``` | |
380 | + | |
381 | +Parameters: | |
382 | + | |
383 | ++ `file_name` (required) - The name of new file. Ex. class.rb | |
384 | ++ `file_path` (optiona) - The path to new file. Ex. lib/ | |
385 | ++ `branch_name` (required) - The name of branch | |
386 | ++ `content` (required) - File content | |
387 | ++ `commit_message` (required) - Commit message | ... | ... |