gitlab api pro icon

gitlab api pro

Extended GitLab node

Branch → Delete

AI-generated

Summary

Deletes a specified GitLab branch using the GitLab API.

Inputs

  • Branch (required) — The name of the branch to delete, for example 'feature/login'.
  • Project Locator — Method to identify the project: ID (default) or Path (owner/name).
  • Project ID — Numeric project ID (used when Project Locator is ID).
  • Project Owner — Namespace or owner of the project (used when Project Locator is Path).
  • Project Name — Project slug or name (used when Project Locator is Path).
  • Authentication — Select whether to use saved credentials or custom fields for authentication.
  • GitLab Server — Base URL of your GitLab instance (used when Authentication is Custom).
  • Access Token — Personal access token with API permissions (used when Authentication is Custom).

Output shape

No body — returns an empty execution with success status.

The operation performs a DELETE request to the GitLab API. If successful, it returns an empty execution; if the branch does not exist or lacks permissions, an error is thrown.

Examples

Example 1: Delete a feature branch from a project identified by ID.

Project Locator set to ID with Project ID 12345, Branch set to 'feature/new-ui'.

Example 2: Delete a branch from a project identified by path using custom authentication.

Project Locator set to Path with Owner 'my-org' and Project 'my-app', Branch set to 'old-feature', Authentication set to Custom with provided Server and Access Token.

Links

Discussion