Skip to Content
SeyloDocs
API referenceGit credentials

List a git repository's branches

GET
/api/v1/git.branches

Checks access to a git URL (with a stored credential for private repos, like git ls-remote) and lists its branches with the default one. Used to validate a generic git source before saving it.

Needs services.create on the project. Available to MCP clients and the assistant.

Authorization

cookieseylo_session<token>

Query Parameters

projectId*string

Panel-issued id.

Match^[a-z0-9]{16}$
url*string
Match^(https://|ssh://|git@)\S+$
Length1 <= length <= 500
credentialId?string

Panel-issued id.

Match^[a-z0-9]{16}$

Response Body

Success.

application/json
  1. response
branches*array<string>
defaultBranch*string|null
Example Request
curl -X GET 'https://example.com/api/v1/git.branches?projectId=string&url=string'
Example Response
{  "branches": [    "string"  ],  "defaultBranch": "string"}