Update script
Update an existing script in your account.
PATCH/api/scripts/{script}
Update a script
Updates an existing script with the specified configuration.
Optional attributes
- Name
label- Type
- string
- Description
The label to recognize the script.
- Name
user- Type
- string
- Description
The user to run the script as (must be either 'ploi' or 'root').
- Name
content- Type
- string
- Description
The content of the script to run.
Request
PATCH
/api/scripts/{script}curl -X PATCH "https://ploi.io/api/scripts/{script}" \
-H "Authorization: Bearer {token}" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d '{
"label": "Echo Script",
"user": "ploi",
"content": "echo 123"
}'
Response
{
"data": {
"id": 1,
"user": "ploi",
"label": "Echo Script",
"content": "echo 123",
"created_at": "2019-08-07 11:21:02"
}
}