GitLab API

GitlabTool

Actions1095

Branches → postApiV4ProjectsIdRepositoryBranches

AI-generated

Summary

Create a new branch in a GitLab project repository by specifying the project ID and branch details.

Inputs

  • id (required) — The ID or URL-encoded path of the project where the branch will be created.
  • postApiV4ProjectsIdRepositoryBranches (required) — The request body containing the details of the branch to create, as defined by the GitLab API schema for creating repository branches.
  • baseUrl — Optional base URL of the GitLab instance (default is https://gitlab.com).
  • skipAuthentication — Boolean flag to skip authentication; defaults to false, meaning authentication is used.

Output shape

a JSON object representing the newly created branch, as returned by the GitLab API

Returns the response from the POST /api/v4/projects/{id}/repository/branches endpoint; no pagination applies.

Links

Discussion