Answer the question
In order to leave comments, you need to log in
How to automate requests to the Python3 web interface (RestAPI)?
Good day, colleagues,
There is a need to upload a JSON file with data for a certain period of time from the web interface via RestAPI. The limit of entries in the received file is 100. The file itself contains information about the actions and the time when this action occurred. If there are more than 100 records for the requested period of time, the received response signals this - moreDataAvailable = True. To get the missing data, you need to form a new request and specify the time of the last received event (starttime) in the url and add 1 millisecond to it.
In Python, it was possible to make a request to the Web interface via requests.get ()
>>> import requests
>>> response = requests.get(
... 'https://api.blablabla.com/event/eventstatuses?requestId=1234&datetype=received&starttime=2020-02-10T00%3A00%3A57.001Z&...'
... )
>>> json_response = response.json()
>>> print(json_response)
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question