TOPICS
API

API: Startup Scripts

The script category allows you to manage startup scripts.

Action Required Parameters Optional Parameters
script/list None None
script/get script_id None
script/create name, content None
script/update script_id, name, content None
script/delete script_id None

script/list

Endpoint: script/list

{
    "scripts": [
        {
            "content": "#!/bin/bash\r\napt-get update; apt-get upgrade -y",
            "id": "4",
            "name": "upgrade"
        }
    ]
}

script/get

Required parameters:

  • script_id - the startup script ID.
Endpoint: script/get
script_id=4

{
    "content": "#!/bin/bash\r\napt-get update; apt-get upgrade -y",
    "id": "4",
    "name": "upgrade",
    "success": "yes"
}

script/create

Required parameters:

  • name - a label for this startup script.
  • content - the script contents
Endpoint: script/create
name=upgrade
content=#!/bin/bash%0Aapt-get update; apt-get upgrade -y

{
    "script_id": "1064",
    "success": "yes"
}

script/update

Required parameters:

  • script_id - the startup script ID.
  • name - the new name
  • content - the new script contents
Endpoint: script/update
script_id=1064
content=#!/bin/bash%0Aapt-get update; apt-get dist-upgrade -y

{"success": "yes"}

script/delete

Required parameters:

  • script_id - the startup script ID.
Endpoint: script/delete
script_id=1064

{"success": "yes"}