List project branches
$client->projects->branches->list(string project, ?string cursor, ?float limit): Page<BranchListResponse>
GET/v0/projects/{project}/branches
List project branches
<?php
require_once dirname(__DIR__) . '/vendor/autoload.php';
$client = new Client(apiKey: 'My API Key', environment: 'staging');
$page = $client->projects->branches->list(
project: 'project', cursor: 'cursor', limit: 1
);
var_dump($page);{
"data": [
{
"branch": "branch",
"config_commit": {
"repo": {
"branch": "branch",
"host": "host",
"name": "name",
"owner": "owner"
},
"sha": "sha",
"stats": {
"additions": 0,
"deletions": 0,
"total": 0
},
"tree_oid": "tree_oid"
},
"latest_build_id": "latest_build_id",
"object": "project_branch",
"org": "org",
"project": "project"
}
],
"has_more": true,
"next_cursor": "next_cursor"
}Returns Examples
{
"data": [
{
"branch": "branch",
"config_commit": {
"repo": {
"branch": "branch",
"host": "host",
"name": "name",
"owner": "owner"
},
"sha": "sha",
"stats": {
"additions": 0,
"deletions": 0,
"total": 0
},
"tree_oid": "tree_oid"
},
"latest_build_id": "latest_build_id",
"object": "project_branch",
"org": "org",
"project": "project"
}
],
"has_more": true,
"next_cursor": "next_cursor"
}