Skip to content
This repository has been archived by the owner on May 12, 2021. It is now read-only.

REST API

Eiren Rain edited this page Jan 3, 2019 · 5 revisions

REST API

Slimonitor server offers JSON REST API. Request Content-Type header should be application/json and contain JSON data in body.

POST: /host/register

DESCRIPTION: Registers the host on server

ARGUMENTS:

{name: string, cpuInfo: object}

RESPONSE:

{error: bool, message: string}

message contains hostId for further requests when error is false

POST: /host/data

DESCRIPTION: Sends host messages

ARGUMENTS:

{hostId: string, messages: array of Message}

hostId is id received from /host/register

messages array of Messages containing host's and services' updates

RESPONSE:

{error: bool, message: string}

Clone this wiki locally