List the caller's working branches on a project
const url = 'https://api.hydrate.sh/v1/projects/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/branches';const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url https://api.hydrate.sh/v1/projects/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/branches \ --header 'Authorization: Bearer <token>'List your active working branches on this project. The protected main branch is not included. Each branch is a unit of work you can read and apply changes to before merging into main.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”The project to list branches for.
The project to list branches for.
Responses
Section titled “Responses”Successful Response
object
object
Examplegenerated
{ "branches": [ { "base_main_version": 1, "created_at": "example", "id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "is_main": true, "last_active_at": "example", "merged_at": "example", "name": "example", "owner_id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "project_id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "status": "example", "version": 1 } ], "project_id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "version": "example"}No credentials, malformed credentials, or revoked credentials. The envelope is leak-parity (same shape across all 401 paths) so an attacker cannot distinguish revoked vs. unknown via the body.
object
Example
{ "detail": "unauthenticated"}Credentials are valid but lack the scope required for this route, or the principal lacks membership in the target project.
object
object
Examplegenerated
{ "detail": { "code": "example", "message": "example" }}Resource not found OR not accessible to this principal. Leak parity: the response is identical in both cases so an attacker cannot enumerate resources via 404-vs-403 timing.
object
object
Example
{ "detail": { "code": "not_found" }}Validation Error
object
object
object
Examplegenerated
{ "detail": [ { "ctx": {}, "input": "example", "loc": [ "example" ], "msg": "example", "type": "example" } ]}Per-bucket rate limit exceeded. The response carries Retry-After and the standard X-RateLimit-* headers (Limit / Remaining / Reset).
object
Example
{ "detail": "rate_limited"}