API

ChangeAsset

Operations

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

Method Route SDK operation Returns
POST /api/v1/organizations/{org_slug}/repos/{repo_slug}/vcs/changes/assets/{id}/finalize create Available change asset
POST /api/v1/organizations/{org_slug}/repos/{repo_slug}/vcs/changes/assets create Success

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:

created, err := client.ChangeAsset(nil).Create(map[string]any{"organization_id": "example", "repo_id": "example", "alias": "example", "byte_size": 1, "checksum_md5": "example", "checksum_sha256": "example", "content_type": "example", "filename": "example"}, nil)
if err != nil {
    panic(err)
}
fmt.Println(created)

Lua

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

local created, err = client:ChangeAsset():create({ organization_id = "example", repo_id = "example", alias = "example", byte_size = 1, checksum_md5 = "example", checksum_sha256 = "example", content_type = "example", filename = "example" })

PHP

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

$created = $client->ChangeAsset()->create(["organization_id" => "example", "repo_id" => "example", "alias" => "example", "byte_size" => 1, "checksum_md5" => "example", "checksum_sha256" => "example", "content_type" => "example", "filename" => "example"]);

Python

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

created = client.ChangeAsset().create({ "organization_id": "example", "repo_id": "example", "alias": "example", "byte_size": 1, "checksum_md5": "example", "checksum_sha256": "example", "content_type": "example", "filename": "example" })

Ruby

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

created = client.ChangeAsset.create({ "organization_id" => "example", "repo_id" => "example", "alias" => "example", "byte_size" => 1, "checksum_md5" => "example", "checksum_sha256" => "example", "content_type" => "example", "filename" => "example" })

TypeScript

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

const created = await client.ChangeAsset().create({ organization_id: "example", repo_id: "example", alias: "example", byte_size: 1, checksum_md5: "example", checksum_sha256: "example", content_type: "example", filename: "example" })

Fields

Field Type Required Description
alias string Yes Alias
byte_size integer Yes Byte Size
checksum_md5 string Yes Checksum Md5
checksum_sha256 string Yes Checksum Sha256
content_type string Yes Content Type
filename string Yes Filename
id string No Id

create

POST /api/v1/organizations/{org_slug}/repos/{repo_slug}/vcs/changes/assets/{id}/finalize

Operation ID: post_api_v1_organizations_org_slug_repos_repo_slug_vcs_changes_assets_id_finalize.

Authentication: bearer token (bearerAuth).

Parameters

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

Request body

application/json

Property Type Required Description
blob_signed_id string Yes

Responses

200: Available change asset

application/json

Property Type Required Description
asset object Yes
asset.alias string Yes
asset.byte_size integer Yes
asset.content_type string Yes
asset.filename string Yes
asset.id string Yes
asset.status string Yes
401: Unauthorized
403: Forbidden
404: Not found
422: Change submission was invalid

application/json

Property Type Required Description
error string Yes
502: Bad gateway

POST /api/v1/organizations/{org_slug}/repos/{repo_slug}/vcs/changes/assets

Operation ID: api_v1_assets.

Authentication: bearer token (bearerAuth).

Parameters

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

Request body

application/json

Property Type Required Description
alias string Yes
byte_size integer Yes
checksum_md5 string Yes
checksum_sha256 string Yes
content_type string Yes
filename string Yes

Responses

200: Success

application/json

The response is object.

201: Direct upload instructions and a pending asset binding

application/json

Property Type Required Description
asset object Yes
asset.alias string Yes
asset.byte_size integer Yes
asset.content_type string Yes
asset.filename string Yes
asset.id string Yes
asset.status string Yes
upload object Yes
401: Unauthorized
403: Forbidden
404: Not found
422: Change submission was invalid

application/json

Property Type Required Description
error string Yes
502: Bad gateway