List project branches
BranchListPage projects().branches().list(BranchListParamsparams = BranchListParams.none(), RequestOptionsrequestOptions = RequestOptions.none())
GET/v0/projects/{project}/branches
List project branches
package com.stainless.api.example;
import com.stainless.api.client.StainlessClient;
import com.stainless.api.client.okhttp.StainlessOkHttpClient;
import com.stainless.api.models.projects.branches.BranchListPage;
import com.stainless.api.models.projects.branches.BranchListParams;
public final class Main {
private Main() {}
public static void main(String[] args) {
StainlessClient client = StainlessOkHttpClient.builder()
.fromEnv()
.project("example-project")
.build();
BranchListPage page = client.projects().branches().list();
}
}{
"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"
}