# Projects ## Retrieve project `Project Projects.Retrieve(ProjectRetrieveParamsparameters, CancellationTokencancellationToken = default)` **get** `/v0/projects/{project}` Retrieve a project by name. ### Parameters - `ProjectRetrieveParams parameters` - `required string project` ### Returns - `class Project:` A project is a collection of SDKs generated from the same set of config files. - `required string ConfigRepo` - `required string? DisplayName` - `required Object Object` - `"project"Project` - `required string Org` - `required string Slug` - `required IReadOnlyList Targets` - `"node"Node` - `"typescript"Typescript` - `"python"Python` - `"go"Go` - `"java"Java` - `"kotlin"Kotlin` - `"ruby"Ruby` - `"terraform"Terraform` - `"cli"Cli` - `"php"Php` - `"csharp"Csharp` - `"sql"Sql` - `"openapi"OpenAPI` ### Example ```csharp ProjectRetrieveParams parameters = new() { Project = "project" }; var project = await client.Projects.Retrieve(parameters); Console.WriteLine(project); ``` #### Response ```json { "config_repo": "config_repo", "display_name": "display_name", "object": "project", "org": "org", "slug": "slug", "targets": [ "node" ] } ``` ## Update project `Project Projects.Update(ProjectUpdateParamsparameters, CancellationTokencancellationToken = default)` **patch** `/v0/projects/{project}` Update a project's properties. ### Parameters - `ProjectUpdateParams parameters` - `required string project` Path param - `string? displayName` Body param ### Returns - `class Project:` A project is a collection of SDKs generated from the same set of config files. - `required string ConfigRepo` - `required string? DisplayName` - `required Object Object` - `"project"Project` - `required string Org` - `required string Slug` - `required IReadOnlyList Targets` - `"node"Node` - `"typescript"Typescript` - `"python"Python` - `"go"Go` - `"java"Java` - `"kotlin"Kotlin` - `"ruby"Ruby` - `"terraform"Terraform` - `"cli"Cli` - `"php"Php` - `"csharp"Csharp` - `"sql"Sql` - `"openapi"OpenAPI` ### Example ```csharp ProjectUpdateParams parameters = new() { Project = "project" }; var project = await client.Projects.Update(parameters); Console.WriteLine(project); ``` #### Response ```json { "config_repo": "config_repo", "display_name": "display_name", "object": "project", "org": "org", "slug": "slug", "targets": [ "node" ] } ``` ## List projects `ProjectListPageResponse Projects.List(ProjectListParams?parameters, CancellationTokencancellationToken = default)` **get** `/v0/projects` List projects in an organization, from oldest to newest. ### Parameters - `ProjectListParams parameters` - `string cursor` Pagination cursor from a previous response - `Double limit` Maximum number of projects to return, defaults to 10 (maximum: 100). - `string org` ### Returns - `class ProjectListPageResponse:` - `required IReadOnlyList Data` - `required string ConfigRepo` - `required string? DisplayName` - `required Object Object` - `"project"Project` - `required string Org` - `required string Slug` - `required IReadOnlyList Targets` - `"node"Node` - `"typescript"Typescript` - `"python"Python` - `"go"Go` - `"java"Java` - `"kotlin"Kotlin` - `"ruby"Ruby` - `"terraform"Terraform` - `"cli"Cli` - `"php"Php` - `"csharp"Csharp` - `"sql"Sql` - `"openapi"OpenAPI` - `required Boolean HasMore` - `string NextCursor` ### Example ```csharp ProjectListParams parameters = new(); var page = await client.Projects.List(parameters); await foreach (var item in page.Paginate()) { Console.WriteLine(item); } ``` #### Response ```json { "data": [ { "config_repo": "config_repo", "display_name": "display_name", "object": "project", "org": "org", "slug": "slug", "targets": [ "node" ] } ], "has_more": true, "next_cursor": "next_cursor" } ``` ## Create project `Project Projects.Create(ProjectCreateParamsparameters, CancellationTokencancellationToken = default)` **post** `/v0/projects` Create a new project. ### Parameters - `ProjectCreateParams parameters` - `required string displayName` Human-readable project name - `required string org` Organization name - `required IReadOnlyDictionary revision` File contents to commit - `Content` - `required string Content` File content - `Url` - `required string Url` URL to fetch file content from - `required string slug` Project name/slug - `required IReadOnlyList targets` Targets to generate for - `"node"Node` - `"typescript"Typescript` - `"python"Python` - `"go"Go` - `"java"Java` - `"kotlin"Kotlin` - `"ruby"Ruby` - `"terraform"Terraform` - `"cli"Cli` - `"php"Php` - `"csharp"Csharp` - `"sql"Sql` - `"openapi"OpenAPI` ### Returns - `class Project:` A project is a collection of SDKs generated from the same set of config files. - `required string ConfigRepo` - `required string? DisplayName` - `required Object Object` - `"project"Project` - `required string Org` - `required string Slug` - `required IReadOnlyList Targets` - `"node"Node` - `"typescript"Typescript` - `"python"Python` - `"go"Go` - `"java"Java` - `"kotlin"Kotlin` - `"ruby"Ruby` - `"terraform"Terraform` - `"cli"Cli` - `"php"Php` - `"csharp"Csharp` - `"sql"Sql` - `"openapi"OpenAPI` ### Example ```csharp ProjectCreateParams parameters = new() { DisplayName = "display_name", Org = "org", Revision = new Dictionary() { { "foo", new Content("content") } }, Slug = "slug", Targets = [ Target.Node ], }; var project = await client.Projects.Create(parameters); Console.WriteLine(project); ``` #### Response ```json { "config_repo": "config_repo", "display_name": "display_name", "object": "project", "org": "org", "slug": "slug", "targets": [ "node" ] } ``` ## Generate an AI commit message for a specific SDK `ProjectGenerateCommitMessageResponse Projects.GenerateCommitMessage(ProjectGenerateCommitMessageParamsparameters, CancellationTokencancellationToken = default)` **post** `/v0/projects/{project}/generate_commit_message` Generates an AI commit message by comparing two git refs in the SDK repository. ### Parameters - `ProjectGenerateCommitMessageParams parameters` - `required string project` Path param - `required Target target` Query param: Language target - `"python"Python` - `"node"Node` - `"typescript"Typescript` - `"java"Java` - `"kotlin"Kotlin` - `"go"Go` - `"ruby"Ruby` - `"terraform"Terraform` - `"cli"Cli` - `"csharp"Csharp` - `"php"Php` - `"openapi"OpenAPI` - `"sql"Sql` - `required string baseRef` Body param: Base ref for comparison - `required string headRef` Body param: Head ref for comparison ### Returns - `class ProjectGenerateCommitMessageResponse:` - `required string AICommitMessage` ### Example ```csharp ProjectGenerateCommitMessageParams parameters = new() { Project = "project", Target = Target.Python, BaseRef = "base_ref", HeadRef = "head_ref", }; var response = await client.Projects.GenerateCommitMessage(parameters); Console.WriteLine(response); ``` #### Response ```json { "ai_commit_message": "ai_commit_message" } ``` ## Domain Types ### Project - `class Project:` A project is a collection of SDKs generated from the same set of config files. - `required string ConfigRepo` - `required string? DisplayName` - `required Object Object` - `"project"Project` - `required string Org` - `required string Slug` - `required IReadOnlyList Targets` - `"node"Node` - `"typescript"Typescript` - `"python"Python` - `"go"Go` - `"java"Java` - `"kotlin"Kotlin` - `"ruby"Ruby` - `"terraform"Terraform` - `"cli"Cli` - `"php"Php` - `"csharp"Csharp` - `"sql"Sql` - `"openapi"OpenAPI` # Branches ## Create a new project branch `ProjectBranch Projects.Branches.Create(BranchCreateParamsparameters, CancellationTokencancellationToken = default)` **post** `/v0/projects/{project}/branches` Create a new branch for a project. The branch inherits the config files from the revision pointed to by the `branch_from` parameter. In addition, if the revision is a branch name, the branch will also inherit custom code changes from that branch. ### Parameters - `BranchCreateParams parameters` - `required string project` Path param - `required string branch` Body param: Branch name - `required string branchFrom` Body param: Branch or commit SHA to branch from - `Boolean force` Body param: Whether to throw an error if the branch already exists. Defaults to false. ### 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. - `required string Branch` Branch name - `required ConfigCommit ConfigCommit` A Git commit that points to the latest set of config files on a given branch. - `required Repo Repo` - `required string Branch` - `required string Host` - `required string Name` - `required string Owner` - `required string Sha` - `required Stats? Stats` - `required Long Additions` - `required Long Deletions` - `required Long Total` - `required string? TreeOid` - `required Build? LatestBuild` - `required string ID` Build ID - `required string ConfigCommit` - `required DateTimeOffset CreatedAt` - `required DocumentedSpec? DocumentedSpec` - `class UnionMember0:` - `required string Content` - `required Type Type` - `"content"Content` - `class UnionMember1:` - `required DateTimeOffset Expires` - `required Type Type` - `"url"Url` - `required string Url` - `required Object Object` - `"build"Build` - `required string Org` - `required string Project` - `required Targets Targets` - `BuildTarget Cli` - `required Commit Commit` - `class NotStarted:` - `class Queued:` - `class InProgress:` - `class Completed:` - `required Commit? Commit` - `required Repo Repo` - `required string Branch` - `required string Host` - `required string Name` - `required string Owner` - `required string Sha` - `required Stats? Stats` - `required Long Additions` - `required Long Deletions` - `required Long Total` - `required string? TreeOid` - `required Completed Completed` deprecated - `required Commit? Commit` - `required DateTimeOffset CompletedAt` - `required Conclusion Conclusion` - `"error"Error` - `"warning"Warning` - `"note"Note` - `"success"Success` - `"merge_conflict"MergeConflict` - `"upstream_merge_conflict"UpstreamMergeConflict` - `"fatal"Fatal` - `"payment_required"PaymentRequired` - `"cancelled"Cancelled` - `"timed_out"TimedOut` - `"noop"Noop` - `"version_bump"VersionBump` - `required MergeConflictPr? MergeConflictPr` - `required Double Number` - `required Repo Repo` - `required string Host` - `required string Name` - `required string Owner` - `required DateTimeOffset CompletedAt` - `required Conclusion Conclusion` - `"error"Error` - `"warning"Warning` - `"note"Note` - `"success"Success` - `"merge_conflict"MergeConflict` - `"upstream_merge_conflict"UpstreamMergeConflict` - `"fatal"Fatal` - `"payment_required"PaymentRequired` - `"cancelled"Cancelled` - `"timed_out"TimedOut` - `"noop"Noop` - `"version_bump"VersionBump` - `required MergeConflictPr? MergeConflictPr` - `required Double Number` - `required Repo Repo` - `required string Host` - `required string Name` - `required string Owner` - `JsonElement Status "completed"constant` - `required string? InstallUrl` - `required Object Object` - `"build_target"BuildTarget` - `required Status Status` - `"not_started"NotStarted` - `"codegen"Codegen` - `"postgen"Postgen` - `"completed"Completed` - `CheckStep Build` - `JsonElement` - `Queued` - `JsonElement Status "queued"constant` - `required string? Url` - `InProgress` - `JsonElement Status "in_progress"constant` - `required string? Url` - `Completed` - `required Completed Completed` deprecated - `required Conclusion Conclusion` - `"success"Success` - `"failure"Failure` - `"skipped"Skipped` - `"cancelled"Cancelled` - `"action_required"ActionRequired` - `"neutral"Neutral` - `"timed_out"TimedOut` - `required string? Url` - `required Conclusion Conclusion` - `"success"Success` - `"failure"Failure` - `"skipped"Skipped` - `"cancelled"Cancelled` - `"action_required"ActionRequired` - `"neutral"Neutral` - `"timed_out"TimedOut` - `JsonElement Status "completed"constant` - `required string? Url` - `CheckStep Lint` - `CheckStep Test` - `BuildTarget Csharp` - `BuildTarget Go` - `BuildTarget Java` - `BuildTarget Kotlin` - `BuildTarget Node` - `BuildTarget OpenAPI` - `BuildTarget Php` - `BuildTarget Python` - `BuildTarget Ruby` - `BuildTarget Sql` - `BuildTarget Terraform` - `BuildTarget Typescript` - `required DateTimeOffset UpdatedAt` - `required Object Object` - `"project_branch"ProjectBranch` - `required string Org` - `required string Project` Project name ### Example ```csharp BranchCreateParams parameters = new() { Project = "project", Branch = "branch", BranchFrom = "branch_from", }; var projectBranch = await client.Projects.Branches.Create(parameters); Console.WriteLine(projectBranch); ``` #### 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" } ``` ## Retrieve a project branch `ProjectBranch Projects.Branches.Retrieve(BranchRetrieveParamsparameters, CancellationTokencancellationToken = default)` **get** `/v0/projects/{project}/branches/{branch}` Retrieve a project branch by name. ### Parameters - `BranchRetrieveParams parameters` - `required string project` - `required string branch` ### 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. - `required string Branch` Branch name - `required ConfigCommit ConfigCommit` A Git commit that points to the latest set of config files on a given branch. - `required Repo Repo` - `required string Branch` - `required string Host` - `required string Name` - `required string Owner` - `required string Sha` - `required Stats? Stats` - `required Long Additions` - `required Long Deletions` - `required Long Total` - `required string? TreeOid` - `required Build? LatestBuild` - `required string ID` Build ID - `required string ConfigCommit` - `required DateTimeOffset CreatedAt` - `required DocumentedSpec? DocumentedSpec` - `class UnionMember0:` - `required string Content` - `required Type Type` - `"content"Content` - `class UnionMember1:` - `required DateTimeOffset Expires` - `required Type Type` - `"url"Url` - `required string Url` - `required Object Object` - `"build"Build` - `required string Org` - `required string Project` - `required Targets Targets` - `BuildTarget Cli` - `required Commit Commit` - `class NotStarted:` - `class Queued:` - `class InProgress:` - `class Completed:` - `required Commit? Commit` - `required Repo Repo` - `required string Branch` - `required string Host` - `required string Name` - `required string Owner` - `required string Sha` - `required Stats? Stats` - `required Long Additions` - `required Long Deletions` - `required Long Total` - `required string? TreeOid` - `required Completed Completed` deprecated - `required Commit? Commit` - `required DateTimeOffset CompletedAt` - `required Conclusion Conclusion` - `"error"Error` - `"warning"Warning` - `"note"Note` - `"success"Success` - `"merge_conflict"MergeConflict` - `"upstream_merge_conflict"UpstreamMergeConflict` - `"fatal"Fatal` - `"payment_required"PaymentRequired` - `"cancelled"Cancelled` - `"timed_out"TimedOut` - `"noop"Noop` - `"version_bump"VersionBump` - `required MergeConflictPr? MergeConflictPr` - `required Double Number` - `required Repo Repo` - `required string Host` - `required string Name` - `required string Owner` - `required DateTimeOffset CompletedAt` - `required Conclusion Conclusion` - `"error"Error` - `"warning"Warning` - `"note"Note` - `"success"Success` - `"merge_conflict"MergeConflict` - `"upstream_merge_conflict"UpstreamMergeConflict` - `"fatal"Fatal` - `"payment_required"PaymentRequired` - `"cancelled"Cancelled` - `"timed_out"TimedOut` - `"noop"Noop` - `"version_bump"VersionBump` - `required MergeConflictPr? MergeConflictPr` - `required Double Number` - `required Repo Repo` - `required string Host` - `required string Name` - `required string Owner` - `JsonElement Status "completed"constant` - `required string? InstallUrl` - `required Object Object` - `"build_target"BuildTarget` - `required Status Status` - `"not_started"NotStarted` - `"codegen"Codegen` - `"postgen"Postgen` - `"completed"Completed` - `CheckStep Build` - `JsonElement` - `Queued` - `JsonElement Status "queued"constant` - `required string? Url` - `InProgress` - `JsonElement Status "in_progress"constant` - `required string? Url` - `Completed` - `required Completed Completed` deprecated - `required Conclusion Conclusion` - `"success"Success` - `"failure"Failure` - `"skipped"Skipped` - `"cancelled"Cancelled` - `"action_required"ActionRequired` - `"neutral"Neutral` - `"timed_out"TimedOut` - `required string? Url` - `required Conclusion Conclusion` - `"success"Success` - `"failure"Failure` - `"skipped"Skipped` - `"cancelled"Cancelled` - `"action_required"ActionRequired` - `"neutral"Neutral` - `"timed_out"TimedOut` - `JsonElement Status "completed"constant` - `required string? Url` - `CheckStep Lint` - `CheckStep Test` - `BuildTarget Csharp` - `BuildTarget Go` - `BuildTarget Java` - `BuildTarget Kotlin` - `BuildTarget Node` - `BuildTarget OpenAPI` - `BuildTarget Php` - `BuildTarget Python` - `BuildTarget Ruby` - `BuildTarget Sql` - `BuildTarget Terraform` - `BuildTarget Typescript` - `required DateTimeOffset UpdatedAt` - `required Object Object` - `"project_branch"ProjectBranch` - `required string Org` - `required string Project` Project name ### Example ```csharp BranchRetrieveParams parameters = new() { Project = "project", Branch = "branch", }; var projectBranch = await client.Projects.Branches.Retrieve(parameters); Console.WriteLine(projectBranch); ``` #### 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" } ``` ## List project branches `BranchListPageResponse Projects.Branches.List(BranchListParamsparameters, CancellationTokencancellationToken = default)` **get** `/v0/projects/{project}/branches` Retrieve a project branch by name. ### Parameters - `BranchListParams parameters` - `required string project` Path param - `string cursor` Query param: Pagination cursor from a previous response - `Double limit` Query param: Maximum number of items to return, defaults to 10 (maximum: 100). ### Returns - `class BranchListPageResponse:` - `required IReadOnlyList Data` - `required string Branch` Branch name - `required ConfigCommit ConfigCommit` A Git commit that points to the latest set of config files on a given branch. - `required Repo Repo` - `required string Branch` - `required string Host` - `required string Name` - `required string Owner` - `required string Sha` - `required Stats? Stats` - `required Long Additions` - `required Long Deletions` - `required Long Total` - `required string? TreeOid` - `required string LatestBuildID` - `required Object Object` - `"project_branch"ProjectBranch` - `required string Org` - `required string Project` Project name - `required Boolean HasMore` - `string NextCursor` ### Example ```csharp BranchListParams parameters = new() { Project = "project" }; var page = await client.Projects.Branches.List(parameters); await foreach (var item in page.Paginate()) { Console.WriteLine(item); } ``` #### Response ```json { "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" } ``` ## Delete a project branch `JsonElement Projects.Branches.Delete(BranchDeleteParamsparameters, CancellationTokencancellationToken = default)` **delete** `/v0/projects/{project}/branches/{branch}` Delete a project branch by name. ### Parameters - `BranchDeleteParams parameters` - `required string project` - `required string branch` ### Example ```csharp BranchDeleteParams parameters = new() { Project = "project", Branch = "branch", }; var branch = await client.Projects.Branches.Delete(parameters); Console.WriteLine(branch); ``` #### Response ```json {} ``` ## Rebase a project branch `ProjectBranch Projects.Branches.Rebase(BranchRebaseParamsparameters, CancellationTokencancellationToken = default)` **put** `/v0/projects/{project}/branches/{branch}/rebase` Rebase a project branch. The branch is rebased onto the `base` branch or commit SHA, inheriting any config and custom code changes. ### Parameters - `BranchRebaseParams parameters` - `required string project` Path param - `required string branch` Path param - `string base` Query param: The branch or commit SHA to rebase onto. Defaults to "main". ### 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. - `required string Branch` Branch name - `required ConfigCommit ConfigCommit` A Git commit that points to the latest set of config files on a given branch. - `required Repo Repo` - `required string Branch` - `required string Host` - `required string Name` - `required string Owner` - `required string Sha` - `required Stats? Stats` - `required Long Additions` - `required Long Deletions` - `required Long Total` - `required string? TreeOid` - `required Build? LatestBuild` - `required string ID` Build ID - `required string ConfigCommit` - `required DateTimeOffset CreatedAt` - `required DocumentedSpec? DocumentedSpec` - `class UnionMember0:` - `required string Content` - `required Type Type` - `"content"Content` - `class UnionMember1:` - `required DateTimeOffset Expires` - `required Type Type` - `"url"Url` - `required string Url` - `required Object Object` - `"build"Build` - `required string Org` - `required string Project` - `required Targets Targets` - `BuildTarget Cli` - `required Commit Commit` - `class NotStarted:` - `class Queued:` - `class InProgress:` - `class Completed:` - `required Commit? Commit` - `required Repo Repo` - `required string Branch` - `required string Host` - `required string Name` - `required string Owner` - `required string Sha` - `required Stats? Stats` - `required Long Additions` - `required Long Deletions` - `required Long Total` - `required string? TreeOid` - `required Completed Completed` deprecated - `required Commit? Commit` - `required DateTimeOffset CompletedAt` - `required Conclusion Conclusion` - `"error"Error` - `"warning"Warning` - `"note"Note` - `"success"Success` - `"merge_conflict"MergeConflict` - `"upstream_merge_conflict"UpstreamMergeConflict` - `"fatal"Fatal` - `"payment_required"PaymentRequired` - `"cancelled"Cancelled` - `"timed_out"TimedOut` - `"noop"Noop` - `"version_bump"VersionBump` - `required MergeConflictPr? MergeConflictPr` - `required Double Number` - `required Repo Repo` - `required string Host` - `required string Name` - `required string Owner` - `required DateTimeOffset CompletedAt` - `required Conclusion Conclusion` - `"error"Error` - `"warning"Warning` - `"note"Note` - `"success"Success` - `"merge_conflict"MergeConflict` - `"upstream_merge_conflict"UpstreamMergeConflict` - `"fatal"Fatal` - `"payment_required"PaymentRequired` - `"cancelled"Cancelled` - `"timed_out"TimedOut` - `"noop"Noop` - `"version_bump"VersionBump` - `required MergeConflictPr? MergeConflictPr` - `required Double Number` - `required Repo Repo` - `required string Host` - `required string Name` - `required string Owner` - `JsonElement Status "completed"constant` - `required string? InstallUrl` - `required Object Object` - `"build_target"BuildTarget` - `required Status Status` - `"not_started"NotStarted` - `"codegen"Codegen` - `"postgen"Postgen` - `"completed"Completed` - `CheckStep Build` - `JsonElement` - `Queued` - `JsonElement Status "queued"constant` - `required string? Url` - `InProgress` - `JsonElement Status "in_progress"constant` - `required string? Url` - `Completed` - `required Completed Completed` deprecated - `required Conclusion Conclusion` - `"success"Success` - `"failure"Failure` - `"skipped"Skipped` - `"cancelled"Cancelled` - `"action_required"ActionRequired` - `"neutral"Neutral` - `"timed_out"TimedOut` - `required string? Url` - `required Conclusion Conclusion` - `"success"Success` - `"failure"Failure` - `"skipped"Skipped` - `"cancelled"Cancelled` - `"action_required"ActionRequired` - `"neutral"Neutral` - `"timed_out"TimedOut` - `JsonElement Status "completed"constant` - `required string? Url` - `CheckStep Lint` - `CheckStep Test` - `BuildTarget Csharp` - `BuildTarget Go` - `BuildTarget Java` - `BuildTarget Kotlin` - `BuildTarget Node` - `BuildTarget OpenAPI` - `BuildTarget Php` - `BuildTarget Python` - `BuildTarget Ruby` - `BuildTarget Sql` - `BuildTarget Terraform` - `BuildTarget Typescript` - `required DateTimeOffset UpdatedAt` - `required Object Object` - `"project_branch"ProjectBranch` - `required string Org` - `required string Project` Project name ### Example ```csharp BranchRebaseParams parameters = new() { Project = "project", Branch = "branch", }; var projectBranch = await client.Projects.Branches.Rebase(parameters); Console.WriteLine(projectBranch); ``` #### 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" } ``` ## Reset `ProjectBranch Projects.Branches.Reset(BranchResetParamsparameters, CancellationTokencancellationToken = default)` **put** `/v0/projects/{project}/branches/{branch}/reset` Reset a project branch. If `branch` === `main`, the branch is reset to `target_config_sha`. Otherwise, the branch is reset to `main`. ### Parameters - `BranchResetParams parameters` - `required string project` Path param - `required string branch` Path param - `string targetConfigSha` Query param: The commit SHA to reset the main branch to. Required if resetting the main branch; disallowed otherwise. ### 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. - `required string Branch` Branch name - `required ConfigCommit ConfigCommit` A Git commit that points to the latest set of config files on a given branch. - `required Repo Repo` - `required string Branch` - `required string Host` - `required string Name` - `required string Owner` - `required string Sha` - `required Stats? Stats` - `required Long Additions` - `required Long Deletions` - `required Long Total` - `required string? TreeOid` - `required Build? LatestBuild` - `required string ID` Build ID - `required string ConfigCommit` - `required DateTimeOffset CreatedAt` - `required DocumentedSpec? DocumentedSpec` - `class UnionMember0:` - `required string Content` - `required Type Type` - `"content"Content` - `class UnionMember1:` - `required DateTimeOffset Expires` - `required Type Type` - `"url"Url` - `required string Url` - `required Object Object` - `"build"Build` - `required string Org` - `required string Project` - `required Targets Targets` - `BuildTarget Cli` - `required Commit Commit` - `class NotStarted:` - `class Queued:` - `class InProgress:` - `class Completed:` - `required Commit? Commit` - `required Repo Repo` - `required string Branch` - `required string Host` - `required string Name` - `required string Owner` - `required string Sha` - `required Stats? Stats` - `required Long Additions` - `required Long Deletions` - `required Long Total` - `required string? TreeOid` - `required Completed Completed` deprecated - `required Commit? Commit` - `required DateTimeOffset CompletedAt` - `required Conclusion Conclusion` - `"error"Error` - `"warning"Warning` - `"note"Note` - `"success"Success` - `"merge_conflict"MergeConflict` - `"upstream_merge_conflict"UpstreamMergeConflict` - `"fatal"Fatal` - `"payment_required"PaymentRequired` - `"cancelled"Cancelled` - `"timed_out"TimedOut` - `"noop"Noop` - `"version_bump"VersionBump` - `required MergeConflictPr? MergeConflictPr` - `required Double Number` - `required Repo Repo` - `required string Host` - `required string Name` - `required string Owner` - `required DateTimeOffset CompletedAt` - `required Conclusion Conclusion` - `"error"Error` - `"warning"Warning` - `"note"Note` - `"success"Success` - `"merge_conflict"MergeConflict` - `"upstream_merge_conflict"UpstreamMergeConflict` - `"fatal"Fatal` - `"payment_required"PaymentRequired` - `"cancelled"Cancelled` - `"timed_out"TimedOut` - `"noop"Noop` - `"version_bump"VersionBump` - `required MergeConflictPr? MergeConflictPr` - `required Double Number` - `required Repo Repo` - `required string Host` - `required string Name` - `required string Owner` - `JsonElement Status "completed"constant` - `required string? InstallUrl` - `required Object Object` - `"build_target"BuildTarget` - `required Status Status` - `"not_started"NotStarted` - `"codegen"Codegen` - `"postgen"Postgen` - `"completed"Completed` - `CheckStep Build` - `JsonElement` - `Queued` - `JsonElement Status "queued"constant` - `required string? Url` - `InProgress` - `JsonElement Status "in_progress"constant` - `required string? Url` - `Completed` - `required Completed Completed` deprecated - `required Conclusion Conclusion` - `"success"Success` - `"failure"Failure` - `"skipped"Skipped` - `"cancelled"Cancelled` - `"action_required"ActionRequired` - `"neutral"Neutral` - `"timed_out"TimedOut` - `required string? Url` - `required Conclusion Conclusion` - `"success"Success` - `"failure"Failure` - `"skipped"Skipped` - `"cancelled"Cancelled` - `"action_required"ActionRequired` - `"neutral"Neutral` - `"timed_out"TimedOut` - `JsonElement Status "completed"constant` - `required string? Url` - `CheckStep Lint` - `CheckStep Test` - `BuildTarget Csharp` - `BuildTarget Go` - `BuildTarget Java` - `BuildTarget Kotlin` - `BuildTarget Node` - `BuildTarget OpenAPI` - `BuildTarget Php` - `BuildTarget Python` - `BuildTarget Ruby` - `BuildTarget Sql` - `BuildTarget Terraform` - `BuildTarget Typescript` - `required DateTimeOffset UpdatedAt` - `required Object Object` - `"project_branch"ProjectBranch` - `required string Org` - `required string Project` Project name ### Example ```csharp BranchResetParams parameters = new() { Project = "project", Branch = "branch", }; var projectBranch = await client.Projects.Branches.Reset(parameters); Console.WriteLine(projectBranch); ``` #### 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" } ``` ## Domain Types ### Project Branch - `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. - `required string Branch` Branch name - `required ConfigCommit ConfigCommit` A Git commit that points to the latest set of config files on a given branch. - `required Repo Repo` - `required string Branch` - `required string Host` - `required string Name` - `required string Owner` - `required string Sha` - `required Stats? Stats` - `required Long Additions` - `required Long Deletions` - `required Long Total` - `required string? TreeOid` - `required Build? LatestBuild` - `required string ID` Build ID - `required string ConfigCommit` - `required DateTimeOffset CreatedAt` - `required DocumentedSpec? DocumentedSpec` - `class UnionMember0:` - `required string Content` - `required Type Type` - `"content"Content` - `class UnionMember1:` - `required DateTimeOffset Expires` - `required Type Type` - `"url"Url` - `required string Url` - `required Object Object` - `"build"Build` - `required string Org` - `required string Project` - `required Targets Targets` - `BuildTarget Cli` - `required Commit Commit` - `class NotStarted:` - `class Queued:` - `class InProgress:` - `class Completed:` - `required Commit? Commit` - `required Repo Repo` - `required string Branch` - `required string Host` - `required string Name` - `required string Owner` - `required string Sha` - `required Stats? Stats` - `required Long Additions` - `required Long Deletions` - `required Long Total` - `required string? TreeOid` - `required Completed Completed` deprecated - `required Commit? Commit` - `required DateTimeOffset CompletedAt` - `required Conclusion Conclusion` - `"error"Error` - `"warning"Warning` - `"note"Note` - `"success"Success` - `"merge_conflict"MergeConflict` - `"upstream_merge_conflict"UpstreamMergeConflict` - `"fatal"Fatal` - `"payment_required"PaymentRequired` - `"cancelled"Cancelled` - `"timed_out"TimedOut` - `"noop"Noop` - `"version_bump"VersionBump` - `required MergeConflictPr? MergeConflictPr` - `required Double Number` - `required Repo Repo` - `required string Host` - `required string Name` - `required string Owner` - `required DateTimeOffset CompletedAt` - `required Conclusion Conclusion` - `"error"Error` - `"warning"Warning` - `"note"Note` - `"success"Success` - `"merge_conflict"MergeConflict` - `"upstream_merge_conflict"UpstreamMergeConflict` - `"fatal"Fatal` - `"payment_required"PaymentRequired` - `"cancelled"Cancelled` - `"timed_out"TimedOut` - `"noop"Noop` - `"version_bump"VersionBump` - `required MergeConflictPr? MergeConflictPr` - `required Double Number` - `required Repo Repo` - `required string Host` - `required string Name` - `required string Owner` - `JsonElement Status "completed"constant` - `required string? InstallUrl` - `required Object Object` - `"build_target"BuildTarget` - `required Status Status` - `"not_started"NotStarted` - `"codegen"Codegen` - `"postgen"Postgen` - `"completed"Completed` - `CheckStep Build` - `JsonElement` - `Queued` - `JsonElement Status "queued"constant` - `required string? Url` - `InProgress` - `JsonElement Status "in_progress"constant` - `required string? Url` - `Completed` - `required Completed Completed` deprecated - `required Conclusion Conclusion` - `"success"Success` - `"failure"Failure` - `"skipped"Skipped` - `"cancelled"Cancelled` - `"action_required"ActionRequired` - `"neutral"Neutral` - `"timed_out"TimedOut` - `required string? Url` - `required Conclusion Conclusion` - `"success"Success` - `"failure"Failure` - `"skipped"Skipped` - `"cancelled"Cancelled` - `"action_required"ActionRequired` - `"neutral"Neutral` - `"timed_out"TimedOut` - `JsonElement Status "completed"constant` - `required string? Url` - `CheckStep Lint` - `CheckStep Test` - `BuildTarget Csharp` - `BuildTarget Go` - `BuildTarget Java` - `BuildTarget Kotlin` - `BuildTarget Node` - `BuildTarget OpenAPI` - `BuildTarget Php` - `BuildTarget Python` - `BuildTarget Ruby` - `BuildTarget Sql` - `BuildTarget Terraform` - `BuildTarget Typescript` - `required DateTimeOffset UpdatedAt` - `required Object Object` - `"project_branch"ProjectBranch` - `required string Org` - `required string Project` Project name # Configs ## Retrieve configuration files `IReadOnlyDictionary Projects.Configs.Retrieve(ConfigRetrieveParamsparameters, CancellationTokencancellationToken = default)` **get** `/v0/projects/{project}/configs` Retrieve the configuration files for a given project. ### Parameters - `ConfigRetrieveParams parameters` - `required string project` Path param - `string branch` Query param: Branch name, defaults to "main". - `string include` Query param ### Example ```csharp ConfigRetrieveParams parameters = new() { Project = "project" }; var config = await client.Projects.Configs.Retrieve(parameters); Console.WriteLine(config); ``` #### Response ```json { "foo": { "content": "content" } } ``` ## Generate config suggestions `IReadOnlyDictionary Projects.Configs.Guess(ConfigGuessParamsparameters, CancellationTokencancellationToken = default)` **post** `/v0/projects/{project}/configs/guess` Generate suggestions for changes to config files based on an OpenAPI spec. ### Parameters - `ConfigGuessParams parameters` - `required string project` Path param - `required string spec` Body param: OpenAPI spec - `string branch` Body param: Branch name ### Example ```csharp ConfigGuessParams parameters = new() { Project = "project", Spec = "spec", }; var response = await client.Projects.Configs.Guess(parameters); Console.WriteLine(response); ``` #### Response ```json { "foo": { "content": "content" } } ```