## Retrieve a project branch `projects().branches().retrieve(BranchRetrieveParamsparams = BranchRetrieveParams.none(), RequestOptionsrequestOptions = RequestOptions.none()) : ProjectBranch` **get** `/v0/projects/{project}/branches/{branch}` Retrieve a project branch by name. ### Parameters - `params: BranchRetrieveParams` - `project: Optional` - `branch: Optional` ### Returns - `class ProjectBranch:` A project branch names a line of development for a project. Like a Git branch, it points to a Git commit with a set of config files. In addition, a project branch also points to a set of custom code changes, corresponding to Git branches in the staging repos. - `branch: String` Branch name - `configCommit: ConfigCommit` A Git commit that points to the latest set of config files on a given branch. - `repo: Repo` - `branch: String` - `host: String` - `name: String` - `owner: String` - `sha: String` - `stats: Optional` - `additions: Long` - `deletions: Long` - `total: Long` - `treeOid: Optional` - `latestBuild: Optional` - `id: String` Build ID - `configCommit: String` - `createdAt: LocalDateTime` - `documentedSpec: Optional` - `class UnionMember0:` - `content: String` - `type: Type` - `CONTENT("content")` - `class UnionMember1:` - `expires: LocalDateTime` - `type: Type` - `URL("url")` - `url: String` - `object_: Object` - `BUILD("build")` - `org: String` - `project: String` - `targets: Targets` - `cli: Optional` - `commit: Commit` - `JsonValue;` - `status: JsonValue; "not_started"constant` - `NOT_STARTED("not_started")` - `JsonValue;` - `status: JsonValue; "queued"constant` - `QUEUED("queued")` - `JsonValue;` - `status: JsonValue; "in_progress"constant` - `IN_PROGRESS("in_progress")` - `class Completed:` - `commit: Optional` - `repo: Repo` - `branch: String` - `host: String` - `name: String` - `owner: String` - `sha: String` - `stats: Optional` - `additions: Long` - `deletions: Long` - `total: Long` - `treeOid: Optional` - `completed: InnerCompleted` deprecated - `commit: Optional` - `completedAt: LocalDateTime` - `conclusion: Conclusion` - `ERROR("error")` - `WARNING("warning")` - `NOTE("note")` - `SUCCESS("success")` - `MERGE_CONFLICT("merge_conflict")` - `UPSTREAM_MERGE_CONFLICT("upstream_merge_conflict")` - `FATAL("fatal")` - `PAYMENT_REQUIRED("payment_required")` - `CANCELLED("cancelled")` - `TIMED_OUT("timed_out")` - `NOOP("noop")` - `VERSION_BUMP("version_bump")` - `mergeConflictPr: Optional` - `number: Double` - `repo: Repo` - `host: String` - `name: String` - `owner: String` - `completedAt: LocalDateTime` - `conclusion: Conclusion` - `ERROR("error")` - `WARNING("warning")` - `NOTE("note")` - `SUCCESS("success")` - `MERGE_CONFLICT("merge_conflict")` - `UPSTREAM_MERGE_CONFLICT("upstream_merge_conflict")` - `FATAL("fatal")` - `PAYMENT_REQUIRED("payment_required")` - `CANCELLED("cancelled")` - `TIMED_OUT("timed_out")` - `NOOP("noop")` - `VERSION_BUMP("version_bump")` - `mergeConflictPr: Optional` - `number: Double` - `repo: Repo` - `host: String` - `name: String` - `owner: String` - `status: JsonValue; "completed"constant` - `COMPLETED("completed")` - `installUrl: Optional` - `object_: Object` - `BUILD_TARGET("build_target")` - `status: Status` - `NOT_STARTED("not_started")` - `CODEGEN("codegen")` - `POSTGEN("postgen")` - `COMPLETED("completed")` - `build: Optional` - `JsonValue;` - `status: JsonValue; "not_started"constant` - `NOT_STARTED("not_started")` - `Queued` - `status: JsonValue; "queued"constant` - `QUEUED("queued")` - `url: Optional` - `InProgress` - `status: JsonValue; "in_progress"constant` - `IN_PROGRESS("in_progress")` - `url: Optional` - `Completed` - `completed: InnerCompleted` deprecated - `conclusion: Conclusion` - `SUCCESS("success")` - `FAILURE("failure")` - `SKIPPED("skipped")` - `CANCELLED("cancelled")` - `ACTION_REQUIRED("action_required")` - `NEUTRAL("neutral")` - `TIMED_OUT("timed_out")` - `url: Optional` - `conclusion: Conclusion` - `SUCCESS("success")` - `FAILURE("failure")` - `SKIPPED("skipped")` - `CANCELLED("cancelled")` - `ACTION_REQUIRED("action_required")` - `NEUTRAL("neutral")` - `TIMED_OUT("timed_out")` - `status: JsonValue; "completed"constant` - `COMPLETED("completed")` - `url: Optional` - `lint: Optional` - `test: Optional` - `csharp: Optional` - `go: Optional` - `java: Optional` - `kotlin: Optional` - `node: Optional` - `openAPI: Optional` - `php: Optional` - `python: Optional` - `ruby: Optional` - `sql: Optional` - `terraform: Optional` - `typescript: Optional` - `updatedAt: LocalDateTime` - `object_: Object` - `PROJECT_BRANCH("project_branch")` - `org: String` - `project: String` Project name ### Example ```kotlin 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.BranchRetrieveParams import com.configure_me_stainless_v0.api.models.projects.branches.ProjectBranch fun main() { val client: StainlessClient = StainlessOkHttpClient.builder() .fromEnv() .project("example-project") .build() val projectBranch: ProjectBranch = client.projects().branches().retrieve("branch") } ``` #### Response ```json { "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": "id", "config_commit": "config_commit", "created_at": "2019-12-27T18:11:19.117Z", "documented_spec": { "content": "content", "type": "content" }, "object": "build", "org": "org", "project": "project", "targets": { "cli": { "commit": { "status": "not_started" }, "install_url": "install_url", "object": "build_target", "status": "not_started", "build": { "status": "not_started" }, "lint": { "status": "not_started" }, "test": { "status": "not_started" } }, "csharp": { "commit": { "status": "not_started" }, "install_url": "install_url", "object": "build_target", "status": "not_started", "build": { "status": "not_started" }, "lint": { "status": "not_started" }, "test": { "status": "not_started" } }, "go": { "commit": { "status": "not_started" }, "install_url": "install_url", "object": "build_target", "status": "not_started", "build": { "status": "not_started" }, "lint": { "status": "not_started" }, "test": { "status": "not_started" } }, "java": { "commit": { "status": "not_started" }, "install_url": "install_url", "object": "build_target", "status": "not_started", "build": { "status": "not_started" }, "lint": { "status": "not_started" }, "test": { "status": "not_started" } }, "kotlin": { "commit": { "status": "not_started" }, "install_url": "install_url", "object": "build_target", "status": "not_started", "build": { "status": "not_started" }, "lint": { "status": "not_started" }, "test": { "status": "not_started" } }, "node": { "commit": { "status": "not_started" }, "install_url": "install_url", "object": "build_target", "status": "not_started", "build": { "status": "not_started" }, "lint": { "status": "not_started" }, "test": { "status": "not_started" } }, "openapi": { "commit": { "status": "not_started" }, "install_url": "install_url", "object": "build_target", "status": "not_started", "build": { "status": "not_started" }, "lint": { "status": "not_started" }, "test": { "status": "not_started" } }, "php": { "commit": { "status": "not_started" }, "install_url": "install_url", "object": "build_target", "status": "not_started", "build": { "status": "not_started" }, "lint": { "status": "not_started" }, "test": { "status": "not_started" } }, "python": { "commit": { "status": "not_started" }, "install_url": "install_url", "object": "build_target", "status": "not_started", "build": { "status": "not_started" }, "lint": { "status": "not_started" }, "test": { "status": "not_started" } }, "ruby": { "commit": { "status": "not_started" }, "install_url": "install_url", "object": "build_target", "status": "not_started", "build": { "status": "not_started" }, "lint": { "status": "not_started" }, "test": { "status": "not_started" } }, "sql": { "commit": { "status": "not_started" }, "install_url": "install_url", "object": "build_target", "status": "not_started", "build": { "status": "not_started" }, "lint": { "status": "not_started" }, "test": { "status": "not_started" } }, "terraform": { "commit": { "status": "not_started" }, "install_url": "install_url", "object": "build_target", "status": "not_started", "build": { "status": "not_started" }, "lint": { "status": "not_started" }, "test": { "status": "not_started" } }, "typescript": { "commit": { "status": "not_started" }, "install_url": "install_url", "object": "build_target", "status": "not_started", "build": { "status": "not_started" }, "lint": { "status": "not_started" }, "test": { "status": "not_started" } } }, "updated_at": "2019-12-27T18:11:19.117Z" }, "object": "project_branch", "org": "org", "project": "project" } ```