Created
August 24, 2022 20:04
-
-
Save nishitpatel01/878193e5e73a2d1de8b6ce35111b0542 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
new_event_payload = { | |
{ | |
"events": [ | |
{ | |
"groupId":"1324354349507023708", | |
"dimensions":[ | |
{"name":"measure","stringVal":"LTTH"}, | |
{"name":"Humidity","doubleVal":36}, | |
{"name":"Light","doubleVal":99}, | |
{"name":"h2_raw","doubleVal":1041}, | |
{"name":"temp","doubleVal":36.97} | |
], | |
"eventTime":"2022-02-16T15:45:00+00:00" | |
} | |
] | |
} | |
} | |
# append event call | |
query_ds_endpt = f'https://timeseriesinsights.googleapis.com/v1/projects/{PROJECT_ID}/datasets/{dataset}:appendEvents' | |
res = query_ts(method="POST", endpoint=query_ds_endpt, data=new_event_payload, auth_token=token_array[0]) | |
res |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment