{"command":{"effect":"write","timeoutSeconds":30,"inputSchema":{"type":"object","description":"Returns time-bucketed analytics data for a dataset. Includes time slots, each containing the requested stats, group-by dimensions, and resolution-controlled bucket size (e.g. `hour`, `day`).\n","properties":{"path":{"type":"object","properties":{"account_id":{"type":"string","maxLength":32,"pattern":"^[0-9a-f]{32}$","examples":["023e105f4ecef8ad9ca31a8372d0c353"],"description":"Cloudflare account identifier."},"dataset":{"type":"string","examples":["shadow_it"],"description":"Dataset name to query. Examples: `access-logins`, `gateway-http`, `gateway-dns`, `gateway-http`, `shadow-it`.\n"}},"required":["account_id","dataset"],"additionalProperties":false},"body":{"$ref":"#/definitions/art_QueryTimeseries","examples":[{"filters":[{"name":"allowed","op":"eq","values":[true]}],"from":"2024-11-01T00:00:00Z","groupBy":["country","allowed"],"resolution":"day","stats":["attemptsTotal"],"to":"2024-11-08T00:00:00Z"}]}},"required":["path","body"],"additionalProperties":false,"definitions":{"art_QueryTimeseries":{"allOf":[{"$ref":"#/definitions/art_CommonQuery"},{"properties":{"resolution":{"description":"Time bucket size for grouping results. Controls the granularity of the returned time slots.\n","type":"string","examples":["hour"]}},"required":["resolution"],"type":"object"}]},"art_CommonQuery":{"description":"Defines fields that all query types share.","type":"object","properties":{"filters":{"description":"Filters to apply before aggregating results.","type":"array","items":{"$ref":"#/definitions/art_Filter"},"examples":[[]]},"from":{"description":"The start of the query time range (inclusive). RFC3339 format with timezone is required (e.g. `2024-11-05T00:00:00Z`).","type":"string","format":"date-time","examples":["2024-11-05T00:00:00Z"]},"groupBy":{"description":"Specifies the column names to group results by. Requires valid columns for the target dataset.","type":"array","items":{"type":"string"},"examples":[["country","allowed"]]},"stats":{"description":"Specifies the stat names to include in results. Requires valid stats for the target dataset (e.g. `attemptsTotal`, `bytesTotal`).","type":"array","items":{"type":"string"},"examples":[["attemptsTotal"]]},"to":{"description":"Specifies the end of the query time range (exclusive). Requires RFC3339 format with timezone.","type":"string","format":"date-time","examples":["2024-11-06T00:00:00Z"]}},"required":["from","to","groupBy","stats","filters"]},"art_Filter":{"description":"A filter to apply to the query.","type":"object","properties":{"name":{"description":"Specifies the column name to filter on. Requires a valid column for the target dataset (e.g. `country`, `allowed`, `appId`).","type":"string","examples":["country"]},"op":{"description":"Filter operator. Common values: `eq`, `neq`, `in`, `not_in`, `gt`, `lt`, `gte`, `lte`.\n","type":"string","examples":["in"]},"values":{"description":"Values to match against. Type depends on the column.","type":"array","items":{"oneOf":[{"type":"string"},{"type":"boolean"},{"type":"integer"},{"type":"number"}]},"examples":[["US","CA","GB"]]}},"required":["name","op","values"]}}},"name":"Query analytics timeseries","id":"cloudflare.art-analytics-query-timeseries","example":{"path":{"account_id":"023e105f4ecef8ad9ca31a8372d0c353","dataset":"shadow_it"},"body":{"from":"2024-11-05T00:00:00Z","to":"2024-11-06T00:00:00Z","groupBy":["country","allowed"],"stats":["attemptsTotal"],"filters":[],"resolution":"hour"}},"maxRequests":1,"summary":false}}