Mark a branch an experiment, or land it when ready
PUT
/api/orgs/{org}/projects/{project}/branches/state
const url = 'https://api.wrktr.com/api/orgs/example/projects/example/branches/state';const options = { method: 'PUT', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"branch":"example","experiment":true,"autoLand":true}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request PUT \ --url https://api.wrktr.com/api/orgs/example/projects/example/branches/state \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "branch": "example", "experiment": true, "autoLand": true }'Each field given is changed; the others are left as they are. autoLand lands the branch (as the caller) once checks, the review and threads allow it.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”org
required
string
project
required
string
Request Bodyrequired
Section titled “Request Bodyrequired”Responses
Section titled “Responses”BranchState
Media typeapplication/json
object
branch
required
string
experiment
required
boolean
autoLand
required
overlaps
required
Array<object>
object
branch
required
string
paths
required
Array<string>
Example
{ "autoLand": { "since": "Infinity" }, "landing": { "landedAt": "Infinity" }}Unauthorized
Media typeapplication/json
object
_tag
required
string
message
required
string
Example
{ "_tag": "Unauthorized"}ProjectNotFound | BranchNotFound