-
Notifications
You must be signed in to change notification settings - Fork 19
Description
Description
The POST /projects/{projectId}/git/branches/ API endpoint has been removed.
This endpoint was deprecated in 2023 and disabled by default in early 2024. It was scheduled for hard removal in Q4 2024, and has now been fully removed as of version TODO: add version.
Requests to this endpoint will now return a 404 Not Found response.
If you have any questions please contact our support team. More information on our deprecation plan can be found in our deprecation documentation
Migration Guide
The POST /projects/{projectId}/git/branches/ (V1) endpoint has been removed. Use the V2 replacement:
| Removed endpoint | Replacement |
|---|---|
POST /projects/{projectId}/git/branches/ |
POST /projects/{projectId}/git/branches/v2/ |
The request payload requires a minor change: the CurrentBranchName field has been replaced with BaseGitRef. The value of BaseGitRef should be a fully-qualified git ref.
Examples
Before (removed):
POST /api/Spaces-1/projects/Projects-1/git/branches/
{
"NewBranchName": "my-new-branch",
"CurrentBranchName": "main"
}After (using V2):
POST /api/Spaces-1/projects/Projects-1/git/branches/v2/
{
"NewBranchName": "my-new-branch",
"BaseGitRef": "refs/heads/main"
}Accepted BaseGitRef formats
| Ref type | Example |
|---|---|
| Branch | refs/heads/main |
| Tag | refs/tags/v1.2.3 |
| Commit hash | abc123def456 |