- add Piezometer data via json (Gschliegraben)
This commit is contained in:
parent
941d2006a1
commit
095cfdfe24
7 changed files with 145 additions and 22 deletions
|
@ -68,13 +68,13 @@ class MyApi():
|
|||
def getSensorData(self, sensor: string):
|
||||
''' request observations'''
|
||||
try:
|
||||
request = self.session.get('https://api.dgnss-sensors.com/gschliefgraben',
|
||||
request = self.session.get('https://api.dgnss-sensors.com/gschliefgraben?sensors=(\''+sensor+ '\')&start=2022-02-28&end=2022-02-28',
|
||||
headers={
|
||||
'cache-control': 'no-cache',
|
||||
'Content-Type': 'application/x-www-form-urlencoded',
|
||||
'accept': 'application/json'
|
||||
},
|
||||
data="grant_type=client_credentials&scope=gschliefgraben&sensors=('\"inclino1_14'\")"
|
||||
data="grant_type=client_credentials&scope=gschliefgraben"
|
||||
)
|
||||
# optional: raise exception for status code
|
||||
request.raise_for_status()
|
||||
|
|
Loading…
Add table
editor.link_modal.header
Reference in a new issue