API.md
January 11, 2025 ยท View on GitHub
API
GET /api/conf
Get app config
GET /api/exec?name=NAME&type=TYPE&exec=EXEC
Execute a command, where
NAME- Item nameTYPE- Item TypeEXEC- one of the commands: Start, Stop, Restart, Logs, State
Returns:
Ok-trueor, if error occurredfalseOut- command output
Example
curl "http://0.0.0.0:8855/api/exec?name=wyl&type=Docker&exec=Start"
{
"Ok": true,
"Out": "wyl\n"
}โ
GET /api/items
Get all Items with their current states
GET /api/types
Get all Types
POST /api/conf
Save config variable conf. Example: data.set('conf', JSON.stringify(conf))
POST /api/item
Edit Item. Variables:
old- old Itemnew- new Item (empty Name to delete Item)
POST /api/type
Edit Type. Variables:
old- old Typenew- new Type (empty Name to delete Type)