REST API - Premwoik/Onitor GitHub Wiki
#REST API
- FRONTEND
GET: /api/front/agents GET: /api/front/agent/{id} GET: /api/front/history/{id}
- AGENT
POST: /api/agent/addInfo
{
"definitions":{},
"$schema":"http://json-schema.org/draft-06/schema#",
"$id":"/api/agent/addInfo",
"type":"object",
"properties":{
"mac":{
"$id":"/properties/mac",
"type":"string"
},
"name":{
"$id":"/properties/name",
"type":"string"
},
"processor":{
"$id":"/properties/processorLoad",
"type":"object",
"properties":{
"system":{
"$id":"/properties/processorLoad/properties/system",
"type":"number"
},
"unused":{
"$id":"/properties/processorLoad/properties/unused",
"type":"integer"
},
"user":{
"$id":"/properties/processorLoad/properties/user",
"type":"number"
}
}
},
"ram":{
"$id":"/properties/ramTaken",
"type":"object",
"properties":{
"total":{
"$id":"/properties/ramTaken/properties/total",
"type":"integer"
},
"used":{
"$id":"/properties/ramTaken/properties/used",
"type":"integer"
}
}
},
"temperature":{
"$id":"/properties/temperature",
"type":"number"
},
"logs":{
"$id":"/properties/errLogs",
"type":"array",
"items":{
"$id":"/properties/errLogs/items",
"type":"object",
"properties":{
"date":{
"$id":"/properties/errLogs/items/properties/date",
"type":"string"
},
"errorDesc":{
"$id":"/properties/errLogs/items/properties/errorDesc",
"type":"string"
},
"process":{
"$id":"/properties/errLogs/items/properties/process",
"type":"string"
}
}
}
},
"discs":{
"$id":"/properties/freeDiskSpace",
"type":"array",
"items":{
"$id":"/properties/freeDiskSpace/items",
"type":"object",
"properties":{
"name":{
"$id":"/properties/freeDiskSpace/items/properties/name",
"type":"string"
},
"total":{
"$id":"/properties/freeDiskSpace/items/properties/total",
"type":"integer"
},
"used":{
"$id":"/properties/freeDiskSpace/items/properties/used",
"type":"integer"
}
}
}
},
"operations":{
"$id":"/properties/iOperSec",
"type":"array",
"items":{
"$id":"/properties/iOperSec/items",
"type":"object",
"properties":{
"name":{
"$id":"/properties/iOperSec/items/properties/name",
"type":"string"
},
"read":{
"$id":"/properties/iOperSec/items/properties/read",
"type":"number"
},
"write":{
"$id":"/properties/iOperSec/items/properties/write",
"type":"number"
}
}
}
},
"ioInterfaces":{
"$id":"/properties/interfaceIO",
"type":"array",
"items":{
"$id":"/properties/interfaceIO/items",
"type":"object",
"properties":{
"name":{
"$id":"/properties/interfaceIO/items/properties/name",
"type":"string"
},
"rec":{
"$id":"/properties/interfaceIO/items/properties/rec",
"type":"integer"
},
"trans":{
"$id":"/properties/interfaceIO/items/properties/trans",
"type":"integer"
}
}
}
}
}
}