- HTTP request
- Path parameters
- Request body
- Response body
- Authorization scopes
- IAM Permissions
- SlicingParams
- Examples
Execute a Timeseries Insights query over a loaded DataSet
.
HTTP request
POST https://timeseriesinsights.googleapis.com/v1/{name=projects/*/locations/*/datasets/*}:query
The URL uses gRPC Transcoding syntax.
Path parameters
Parameters | |
---|---|
name |
Required. Loaded DataSet to be queried in the format of "projects/{project}/locations/{location}/datasets/{dataset}" |
Request body
The request body contains data with the following structure:
JSON representation |
---|
{ "detectionTime": string, "slicingParams": { object ( |
Fields | |
---|---|
detectionTime |
Required. This is the point in time that we want to probe for anomalies. The corresponding NOTE: As with any other time series point, the value is given by aggregating all events in the slice that are in the [detectionTime, detectionTime + granularity) time interval, where the granularity is specified in the A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: |
slicingParams |
Parameters controlling how we will split the dataset into the slices that we will analyze. |
timeseriesParams |
Parameters controlling how we will build the time series used to predict the |
forecastParams |
Parameters that control the time series forecasting models, such as the sensitivity of the anomaly detection. |
returnTimeseries |
If specified, we will return the actual and forecasted time for all returned slices. The time series are returned in the |
numReturnedSlices |
How many slices are returned in The returned slices are tentatively the ones with the highest Reducing this number will improve query performance, both in terms of latency and resource usage. Defaults to 50. |
Response body
Response for a query executed by the system.
If successful, the response body contains data with the following structure:
JSON representation |
---|
{
"name": string,
"slices": [
{
object ( |
Fields | |
---|---|
name |
Loaded DataSet that was queried. |
slices[] |
Slices sorted in descending order by their At most |
Authorization scopes
Requires the following OAuth scope:
https://www.googleapis.com/auth/cloud-platform
For more information, see the Authentication Overview.
IAM Permissions
Requires the following IAM permission on the name
resource:
timeseriesinsights.datasets.query
For more information, see the IAM documentation.
SlicingParams
Parameters that control how we slice the dataset and, optionally, filter slices that have some specific values on some dimensions (pinned dimensions).
JSON representation |
---|
{
"dimensionNames": [
string
],
"pinnedDimensions": [
{
object ( |
Fields | |
---|---|
dimensionNames[] |
Required. Dimensions over which we will group the events in slices. The names specified here come from the Currently only dimensions that hold string values can be specified here. |
pinnedDimensions[] |
Optional. We will only analyze slices for which Example a valid specification:
In the previous example we will slice the dataset by dimensions "d1", "d2", "d3" and "d4", but we will only analyze slices for which "d3=v3" and "d4=v4". The following example is invalid as "d2" is present in both
|