Skip to content
This repository has been archived by the owner on Mar 17, 2023. It is now read-only.

Latest commit

 

History

History
49 lines (31 loc) · 2.52 KB

FIRST_STEPS.md

File metadata and controls

49 lines (31 loc) · 2.52 KB

First steps

After successful installation the board is reachable via https://localhost/ in your preferred browser. Simply type it into the address bar and hit enter. Now you see the login screen popping up:

Login

Enter the credentials you configured in the Configuration chapter (username: phash-board). With the correct credentials submitted you will be redirected to the board:

Filled_board

As you did not push any monitoring data yet, the board is empty.

To fill the board you make POST requests against http://localhost/api/monitoring/data, either directly or using our API sandbox-

For Example:

curl -sS -D - -X POST "http://localhost/api/monitoring/data" \
-H "accept: application/json" \
-H "Authorization: Bearer pleaseChooseASecretTokenForThePublicAPI" \
-H "Content-Type: application/json" \
-d "{ \"id\": \"My First Monitoringdata\", \"status\": \"ok\", \"payload\": \"This Monitoring is my payload\", \"idleTimeoutInSeconds\": 60, \"priority\": 1, \"date\": \"2018-12-19T13:42:46.790Z\"}"

The Authorization Header consists of the Bearer type and your token which you configured previously in the Configuration chapter. The Content-Type: application/json header is mandatory to make the API work properly. As last part of your request you provide the actual monitoring data in JSON format.

API Sandbox

There is an api sandbox located under https://localhost/api/doc which you can use for testing. When opening the url you will see the api documentation:

api_sandbox_documentation

Authorize yourself by clicking the Authorize Button in the upper right corner. Simply fill in the Bearer type with your configured token (default: pleaseChooseASecretTokenForThePublicAPI) which should look like:

api_sandbox_authorization

Next open the Monitoring tab and click on Try it out to switch to the interactive sandbox. Here you may edit the data you want to send and execute the request.

api_sandbox_authorization

After submitting a few monitorings look at your board, you will see your posted monitorings as tiles with different colors which represent the statuses mentioned earlier.

api_sandbox_authorization