List project branches
BranchListPage projects().branches().list(BranchListParamsparams = BranchListParams.none(), RequestOptionsrequestOptions = RequestOptions.none())
/v0/projects/{project}/branches
Retrieve a project branch by name.
Parameters
Returns
List project branches
package com.configure_me_stainless_v0.api.example;
import com.configure_me_stainless_v0.api.client.StainlessClient;
import com.configure_me_stainless_v0.api.client.okhttp.StainlessOkHttpClient;
import com.configure_me_stainless_v0.api.models.projects.branches.BranchListPage;
import com.configure_me_stainless_v0.api.models.projects.branches.BranchListParams;
public final class Main {
private Main() {}
public static void main(String[] args) {
StainlessClient client = StainlessOkHttpClient.fromEnv();
BranchListPage page = client.projects().branches().list();
}
}
{
"data": [
{
"branch": "branch",
"config_commit": {
"repo": {
"branch": "branch",
"name": "name",
"owner": "owner"
},
"sha": "sha"
},
"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",
"name": "name",
"owner": "owner"
},
"sha": "sha"
},
"latest_build_id": "latest_build_id",
"object": "project_branch",
"org": "org",
"project": "project"
}
],
"has_more": true,
"next_cursor": "next_cursor"
}