Created
October 12, 2022 17:54
-
-
Save nishitpatel01/0b5b4f3a8c6bd7f6bab26dd157f07957 to your computer and use it in GitHub Desktop.
evaluateSlice method sample payload
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
evaluate_slice_payload = { | |
"detectionTime": "2021-08-09T21:31:54+00:00", | |
"pinnedDimensions": [ | |
{ | |
"name": "measure", | |
"stringVal": "LTTH" | |
} | |
], | |
"timeseriesParams": { | |
"forecastHistory": "259200s", | |
"granularity": "1800s", | |
"metric": "temp" | |
}, | |
"forecastParams": { | |
"seasonalityHint": "DAILY" | |
}, | |
} | |
dataset = "sensor-data" | |
query_ds_endpt = f'https://timeseriesinsights.googleapis.com/v1/projects/{PROJECT_ID}/datasets/{dataset}:evaluateSlice' | |
res = query_ts(method="POST", endpoint=query_ds_endpt, data=evaluate_slice_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