Ploi API
Ploi API

Update script

Create a script

PATCH api/scripts

Parameters

Parameter Type Status Description
label string optional The label to recognize the script
user string optional The user to run the script as (must be either 'ploi' or 'root')
content string optional The content of the script to run

Example request:

curl -X PATCH "https://ploi.io/api/scripts/{id}" \
-H "Authorization: Bearer {token}" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
   --data '{"label":"Echo Script", "user":"ploi", "content": "echo 123"}'

Example response:

HTTP/1.1 200 OK
Content-Type: application/json

{
    "data": {
        "id": 1,
        "user": "ploi",
        "label": "Echo Script",
        "content": "echo 123",
        "created_at": "2019-08-07 11:21:02"
    }
}