Retrieves all branches for a database project. Branches enable isolated development and testing environments with instant point-in-time cloning. Each branch includes the default branch and any custom branches created for staging, testing, or feature development.
curl --request GET \
--url https://api.case.dev/database/v1/projects/{id}/branches \
--header 'Authorization: Bearer <token>'{
"branches": [
{
"id": "branch_main_123",
"name": "main",
"isDefault": true,
"parentBranchId": null,
"status": "active",
"createdAt": "2025-01-10T08:00:00Z",
"updatedAt": "2025-01-15T10:30:00Z"
},
{
"id": "branch_staging_456",
"name": "staging",
"isDefault": false,
"parentBranchId": "branch_main_123",
"status": "active",
"createdAt": "2025-01-12T10:00:00Z",
"updatedAt": "2025-01-15T10:30:00Z"
}
]
}Was this page helpful?
curl --request GET \
--url https://api.case.dev/database/v1/projects/{id}/branches \
--header 'Authorization: Bearer <token>'{
"branches": [
{
"id": "branch_main_123",
"name": "main",
"isDefault": true,
"parentBranchId": null,
"status": "active",
"createdAt": "2025-01-10T08:00:00Z",
"updatedAt": "2025-01-15T10:30:00Z"
},
{
"id": "branch_staging_456",
"name": "staging",
"isDefault": false,
"parentBranchId": "branch_main_123",
"status": "active",
"createdAt": "2025-01-12T10:00:00Z",
"updatedAt": "2025-01-15T10:30:00Z"
}
]
}