Skip to main content
POST
/
v1
/
machines
/
{id}
/
git
/
checkout
Check out a branch, tag, or commit
import requests

url = "https://api.13-215-85-171.sslip.io/v1/machines/{id}/git/checkout"

payload = {
    "path": "<string>",
    "ref": "<string>"
}
headers = {
    "Authorization": "Bearer <token>",
    "Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.text)
{
  "ok": true
}

Authorizations

Authorization
string
header
required

API key passed as Bearer token

Path Parameters

id
string
required

Machine ID (e.g. mch_a1b2c3d4)

Body

application/json
path
string
required
ref
string
required

Branch, tag, or commit-ish to check out.

create
boolean
default:false

Create the branch (git checkout -b).

Response

200 - application/json

Checkout result

ok
boolean
required