Skip to content

Latest commit

 

History

History
61 lines (52 loc) · 963 Bytes

API.md

File metadata and controls

61 lines (52 loc) · 963 Bytes

API

GET /api/conf

Get app config

GET /api/exec?name=NAME&type=TYPE&exec=EXEC

Execute a command, where

  • NAME - Item name
  • TYPE - Item Type
  • EXEC - one of the commands: Start, Stop, Restart, Logs, State

Returns:

  • Ok - true or, if error occurred false
  • Out - 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 Item
  • new - new Item (empty Name to delete Item)
POST /api/type

Edit Type. Variables:

  • old - old Type
  • new - new Type (empty Name to delete Type)