Skip to main content

Script endpoints

info

these are endpoints relating to scripts


Getting script info

GET /scripts/:script_id

Parameters

NameTypeDescription
script_idStringThe scripts id

Response

{
"success": true,
"script": {
"id": "SCRIPT_ID",
"name": "SCRIPT_NAME",
"free_for_all": false,
"use_heartbeat": true,
"kick_outdated": false,
"enabled": true,
"total_executions": 0
}
}

Getting executions

GET /scripts/:script_id/executions

Parameters

NameTypeDescription
script_idStringThe scripts id

Response

{
"success": true,
"executions": { "01/01": 0 }
}

Editing a script

POST /scripts/:script_id/edit

Parameters

NameTypeDescription
script_idStringThe scripts id

Body

NameTypeNullableDescription
nameStringName for the script
free_for_allBooleanAllow users to execute without a key
use_heartbeatBooleanContinue to check users after initial verification
kick_outdatedBooleanKick users using old version of the script

Response

{ "success": true }

Deleting a script

POST /scripts/:script_id/remove

Parameters

NameTypeDescription
script_idStringThe scripts id

Response

{ "success": true }

Updating a script

POST /scripts/:script_id/update

Parameters

NameTypeDescription
script_idStringThe scripts id

Body

NameTypeNullableDescription
scriptStringthe source code of the script

Response

{ "success": true }

Toggling a script

POST /scripts/:script_id/toggle

Parameters

NameTypeDescription
script_idStringThe scripts id

Body

NameTypeNullableDescription
stateBooleanscript enabled state

Response

{ "success": true }