diff --git a/doc/api/branches.md b/doc/api/branches.md index a62f9e38a90eef3679f1be51d325390fb7052425..3417a69507778d0b11853643e5b4b178c8837f61 100644 --- a/doc/api/branches.md +++ b/doc/api/branches.md @@ -165,3 +165,34 @@ Parameters: "protected": false } ``` + +## Create repository branch + + +``` +POST /projects/:id/repository/branches +``` + +Parameters: + ++ `id` (required) - The ID of a project ++ `branch_name` (required) - The name of the branch ++ `ref` (required) - Create branch from commit sha or existing branch + +```json +{ + "name": "my-new-branch", + "commit": { + "id": "8848c0e90327a0b70f1865b843fb2fbfb9345e57", + "message": "Merge pull request #54 from brightbox/use_fog_brightbox_module\n\nUpdate to use fog-brightbox module", + "parent_ids": ["fff449e0bf453576f16c91d6544f00a2664009d8", "f93a93626fec20fd659f4ed3ab2e64019b6169ae"], + "authored_date": "2014-02-20T19:54:55+02:00", + "author_name": "john smith", + "author_email": "john@example.com", + "committed_date": "2014-02-20T19:54:55+02:00", + "committer_name": "john smith", + "committer_email": "john@example.com" + }, + "protected": false +} +```