API

VcStack

Operations

Every route this entity exposes. Each route links to its own reference on this page.

Method Route SDK operation Returns
GET /api/v1/organizations/{org_slug}/repos/{repo_slug}/vcs/stacks list Active stacks with their member changes ordered from tip to root
GET /api/v1/organizations/{org_slug}/repos/{repo_slug}/vcs/stacks/{code} load Active stack with member changes ordered from tip to root
PATCH /api/v1/organizations/{org_slug}/repos/{repo_slug}/vcs/stacks/{code}/name update The renamed active stack

Examples

One example per SDK, generated from the API model. The argument names are the parameters and fields of this entity, and the values are placeholders. The examples are not compiled or executed.

Golang

Construct client as shown in the Golang setup, then call the operations:

vc_stacks, err := client.VcStack(nil).List(map[string]any{"organization_id": "example", "repo_id": "example"}, nil)
if err != nil {
    panic(err)
}
fmt.Println(vc_stacks)
vc_stack, err := client.VcStack(nil).Load(map[string]any{"id": "example_id", "organization_id": "example", "repo_id": "example"}, nil)
if err != nil {
    panic(err)
}
fmt.Println(vc_stack)

Lua

Construct client as shown in the Lua setup, then call the operations:

local vc_stacks, err = client:VcStack():list({ organization_id = "example", repo_id = "example" })
local vc_stack, err = client:VcStack():load({ id = "example_id", organization_id = "example", repo_id = "example" })

PHP

Construct client as shown in the PHP setup, then call the operations:

$vc_stacks = $client->VcStack()->list(["organization_id" => "example", "repo_id" => "example"]);
$vc_stack = $client->VcStack()->load(["id" => "example_id", "organization_id" => "example", "repo_id" => "example"]);

Python

Construct client as shown in the Python setup, then call the operations:

vc_stacks = client.VcStack().list({"organization_id": "example", "repo_id": "example"})
vc_stack = client.VcStack().load({"id": "example_id", "organization_id": "example", "repo_id": "example"})

Ruby

Construct client as shown in the Ruby setup, then call the operations:

vc_stacks = client.VcStack.list({ "organization_id" => "example", "repo_id" => "example" })
vc_stack = client.VcStack.load({ "id" => "example_id", "organization_id" => "example", "repo_id" => "example" })

TypeScript

Construct client as shown in the TypeScript setup, then call the operations:

const vc_stacks = await client.VcStack().list({ organization_id: "example", repo_id: "example" })
const vc_stack = await client.VcStack().load({ id: "example_id", organization_id: "example", repo_id: "example" })

Fields

Field Type Required Description
alias_ref_name one,string,null Yes Alias Ref Name
changes array Yes Changes
code string Yes Code
id string No Id
landing object No Compact landing state for the Stack CLI.
member_count integer Yes Member Count
name one,string,null Yes Name
ref_name string Yes Ref Name
status string Yes Status
tip_change_number one,integer,null Yes Tip Change Number
updated_at string Yes Updated At
updated_at_label string Yes Updated At Label

list

GET /api/v1/organizations/{org_slug}/repos/{repo_slug}/vcs/stacks

Operation ID: get_api_v1_organizations_org_slug_repos_repo_slug_vcs_stacks.

Authentication: bearer token (bearerAuth).

Parameters

Parameter In Type Required Description
org_slug path string Yes
repo_slug path string Yes

Responses

200: Active stacks with their member changes ordered from tip to root

application/json

Property Type Required Description
stacks array of object and object Yes
401: Unauthorized
403: Forbidden
404: Not found
422: Unprocessable entity
502: Bad gateway

load

GET /api/v1/organizations/{org_slug}/repos/{repo_slug}/vcs/stacks/{code}

Operation ID: get_api_v1_organizations_org_slug_repos_repo_slug_vcs_stacks_code_.

Authentication: bearer token (bearerAuth).

Parameters

Parameter In Type Required Description
org_slug path string Yes
repo_slug path string Yes
code path string Yes

Responses

200: Active stack with member changes ordered from tip to root

application/json

Property Type Required Description
stack object and object Yes
401: Unauthorized
403: Forbidden
404: Not found
422: Unprocessable entity
502: Bad gateway

update

PATCH /api/v1/organizations/{org_slug}/repos/{repo_slug}/vcs/stacks/{code}/name

Operation ID: patch_api_v1_organizations_org_slug_repos_repo_slug_vcs_stacks_code_name.

Authentication: bearer token (bearerAuth).

Parameters

Parameter In Type Required Description
org_slug path string Yes
repo_slug path string Yes
code path string Yes

Request body

application/json

Property Type Required Description
name string Yes

Responses

200: The renamed active stack

application/json

Property Type Required Description
stack object and object Yes
401: Unauthorized
403: Forbidden
404: Not found
409: The alias collides with a bookmark, another stack, or a concurrent alias update

application/json

Property Type Required Description
code enum: bookmark_taken, stack_name_taken, concurrent_update, stack_archived Yes
error string Yes
422: Change submission was invalid

application/json

Property Type Required Description
error string Yes
502: Bad gateway