# Script

# Create

Use this method to create a git deployment script.

# HTTP Request:

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

# Curl Request example:

curl --request POST \
  --url "https://api.serveravatar.com/organizations/{organization}/servers/{server}/applications/{application}/git/script" \
  --header 'Content-Type: application/json' \
  --header 'Authorization: <YOUR API TOKEN>' \
  --data '{
    "script":"composer dump-autoload\ncomposer update"
  }'

# Response:

# Create a script

  • 200 (Ok)
{
  "message":"Deployment script store successfully!"
}

# Git Deployment Not found

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

# 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!"
}

# Show

Use this method to get a git deployment script.

# HTTP Request:

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

# Curl Request example:

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

# Response:

# Script

  • 200 (Ok)
{
    "vars": {
        "{PHP70}": "\/usr\/bin\/php7.0",
        "{PHP71}": "\/usr\/bin\/php7.1",
        "{PHP72}": "\/usr\/bin\/php7.2",
        "{PHP73}": "\/usr\/bin\/php7.3",
        "{PHP74}": "\/usr\/bin\/php7.4",
        "{PHP80}": "\/usr\/bin\/php8.0",
        "{PHP81}": "\/usr\/bin\/php8.1"
    },
    "deploymentScript": "composer install --no-dev --optimize-autoloader\nphp artisan key:generate"
}

# 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