You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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 node x.
?node=x&time=YYMMDDHHMMSS -> return all data from given time for given node x
POSSIBLE RESPONSES:
200, [data] -> success, return log data in 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
importrequests# 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 datarequests.get('https://localhost:5000/log?node_id=1', verify=False, auth=('user', 'passwd'))