# Change Branch

Git deployment in checkout branch.

# HTTP Request:

POST https://api.serveravatar.com/organizations/{organization}/servers/{server}/applications/{application}/git/checkout

# Parameter:

Parameters Required Type Description
branch Yes String Branch name.

# Curl Request Example:

curl --request POST \
  --url "https://api.serveravatar.com/organizations/{organization}/servers/{server}/applications/{application}/git/checkout" \
  --header 'Content-Type: application/json' \
  --header 'Authorization: <YOUR API TOKEN>' \
  --data '{
    "branch":"master"
  }'

# Response:

# Checkout branch

  • 200 (Ok)
{
    "message":"git checkout successfully!"
}

# Another Process Running

  • 500 (Internal Server Error)
{
    "message": "Please wait another git deployment process already running!"
}

# Organization Not Found

  • 404 (Not Found)
{
    "message": "Organization not found!"
}

# Application Not Found

  • 404 (Not Found)
{
    "message": "Application not found!"
}

# Server Not Found

  • 404 (Not Found)
{
    "message": "Server not found!"
}

# Server Error

  • 500 (Internal Server Error)
{
    "message": "Something went really wrong!"
}
Last Updated: 3/1/2023, 3:57:17 PM