Quick Scripts
API usage instructions for quick scripts management and executing quick scripts.
GET List Quick Scripts
/api/v1/quick-scripts To list all the quick scripts associated with user account, send a GET request to /api/v1/quick-scripts.
curl -X GET "https://app.cleavr.io/api/v1/quick-scripts" \
-H "Authorization: Bearer cleavr_YOUR_TOKEN" \
-H "Accept: application/json"
POST Create New Quick Script
/api/v1/quick-scripts To create a new quick script, send a POST request to /api/v1/quick-scripts.
curl -X POST "https://app.cleavr.io/api/v1/quick-scripts" \
-H "Authorization: Bearer cleavr_YOUR_TOKEN" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-d '{"label":"API test script","script":"echo hello from api","notes":"created via api"}'
GET Retrieve an Existing Quick Script
/api/v1/quick-scripts/SCRIPT_UUID To retrieve information about an existing quick script, send a GET request to /api/v1/quick-scripts/SCRIPT_UUID.
curl -X GET "https://app.cleavr.io/api/v1/quick-scripts/SCRIPT_UUID" \
-H "Authorization: Bearer cleavr_YOUR_TOKEN" \
-H "Accept: application/json"
PATCH Update Quick Script
/api/v1/quick-scripts/SCRIPT_UUID To update a quick script, send a PATCH request to /api/v1/quick-scripts/SCRIPT_UUID.
curl -X PATCH "https://app.cleavr.io/api/v1/quick-scripts/SCRIPT_UUID" \
-H "Authorization: Bearer cleavr_YOUR_TOKEN" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-d '{"label":"API test script updated","script":"echo hello updated","notes":"updated via curl"}'
POST Run Quick Script
/api/v1/quick-scripts/SCRIPT_UUID/run To run a quick script on a server, send a POST request to /api/v1/quick-scripts/SCRIPT_UUID/run with server uuid in the body.
curl -X POST "https://app.cleavr.io/api/v1/quick-scripts/SCRIPT_UUID/run" \
-H "Authorization: Bearer cleavr_YOUR_TOKEN" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-d '{"server":"SERVER_UUID","runAs":"root","values":{}}'
DELETE Delete Quick Script
/api/v1/quick-scripts/SCRIPT_UUID To delete a quick script, send a delete request to /api/v1/quick-scripts/SCRIPT_UUID.
curl -sS -X DELETE "https://app.cleavr.io/api/v1/quick-scripts/SCRIPT_UUID" \
-H "Authorization: Bearer cleavr_YOUR_TOKEN" \
-H "Accept: application/json"