-
Notifications
You must be signed in to change notification settings - Fork 1
Docs (Log)
DanDayne edited this page Nov 24, 2019
·
7 revisions
FUNCTIONALITY: retrieve data from log
ENDPOINT: /log
TYPE: GET
URL ARGUMENTS:
-
?node=x-> return all unseen data from nodex. -
?node=x&time=YYMMDDHHMMSS-> return all data from given time for given nodex
POSSIBLE RESPONSES:
-
200, [data]-> success, returnlog datain a list ordered from oldest to most recent -
400, 'Node_id not provided'-> no node was passed on as an argument in the url (?node_id=x) -
401, 'Invalid Credentials'-> invalid credentials in the auth argument in post request -
500, error message-> error occurred on PBRcontrol, report immediately
Example
import requests
# obtain all data from time stamp '20191014090837'
requests.get('https://localhost:5000/log?node_id=1&time=20191014090837', verify=False, auth=('user', 'passwd'))
# obtain all previously unseen data
requests.get('https://localhost:5000/log?node_id=1', verify=False, auth=('user', 'passwd'))where there has to be running node with ID = 1.