query accountMetrics ( $timeFrame:TimeFrame! $groupInterfaces:Boolean $groupDevices:Boolean $siteIDs:[ID!] $toRate:Boolean $buckets:Int $labels:[TimeseriesMetricType!] $perSecond:Boolean $withMissingData:Boolean $useDefaultSizeBucket:Boolean $types:[String!] $userIDs:[ID!]) {
	accountMetrics ( timeFrame:$timeFrame groupInterfaces:$groupInterfaces groupDevices:$groupDevices ) {
		id
		from
		to
		granularity
		sites ( siteIDs:$siteIDs  )  {
			id
			interfaces {
				metrics ( toRate:$toRate  )  {
					duration
					granularity
					bytesDownstream
					bytesUpstream
					bytesTotal
					lostDownstream
					lostDownstreamPcnt
					lostUpstream
					lostUpstreamPcnt
					packetsDownstream
					packetsUpstream
					jitterUpstream
					jitterDownstream
					packetsDiscardedDownstream
					packetsDiscardedUpstream
					rtt
					hostCount
					hostLimit
					flowCount
				}
				name
				timeseries ( buckets:$buckets  labels:$labels  )  {
					data ( perSecond:$perSecond  withMissingData:$withMissingData  useDefaultSizeBucket:$useDefaultSizeBucket   )
					label
					dimensions {
						label
						value
					}
					key {
						measureFieldName
						dimensions {
							fieldName
							value
						}
					}
					sum
					units
					info
				}
				annotations ( types:$types  )  {
					time
					label
					shortLabel
					type
				}
				periods {
					duration
					title
					type
				}
				remoteIPInfo {
					ip
					countryCode
					countryName
					city
					state
					provider
					latitude
					longitude
				}
				remoteIP
				socketInfo {
					id
					serial
					isPrimary
					platform
					version
					versionUpdateTime
				}
				ipsecInfo {
					isPrimary
					catoIP
					remoteIP
					ikeVersion
					tunnelConfig {
						tunnelId
						tunnelRemoteIdentifier
						localId
					}
				}
				interfaceInfo {
					id
					name
					upstreamBandwidth
					downstreamBandwidth
					upstreamBandwidthMbpsPrecision
					downstreamBandwidthMbpsPrecision
					destType
					wanRole
				}
			}
			metrics ( toRate:$toRate   ) {
				duration
				granularity
				bytesDownstream
				bytesUpstream
				bytesTotal
				lostDownstream
				lostDownstreamPcnt
				lostUpstream
				lostUpstreamPcnt
				packetsDownstream
				packetsUpstream
				jitterUpstream
				jitterDownstream
				packetsDiscardedDownstream
				packetsDiscardedUpstream
				rtt
				hostCount
				hostLimit
				flowCount
			}
			name
			info {
				name
				type
				description
				countryCode
				region
				countryName
				countryStateName
				cityName
				address
				isHA
				connType
				creationTime
				interfaces {
					id
					name
					upstreamBandwidth
					downstreamBandwidth
					upstreamBandwidthMbpsPrecision
					downstreamBandwidthMbpsPrecision
					destType
					wanRole
				}
				sockets {
					id
					serial
					isPrimary
					platform
					version
					versionUpdateTime
				}
				ipsec {
					isPrimary
					catoIP
					remoteIP
					ikeVersion
					tunnelConfig {
						tunnelId
						tunnelRemoteIdentifier
						localId
					}
				}
			}
			hostCount {
				data ( perSecond:$perSecond  withMissingData:$withMissingData  useDefaultSizeBucket:$useDefaultSizeBucket  ) 
				label
				dimensions {
					label
					value
				}
				key {
					measureFieldName
					dimensions {
						fieldName
						value
					}
				}
				sum
				units
				info
			}
			flowCount {
				data ( perSecond:$perSecond  withMissingData:$withMissingData  useDefaultSizeBucket:$useDefaultSizeBucket  ) 
				label
				dimensions {
					label
					value
				}
				key {
					measureFieldName
					dimensions {
						fieldName
						value
					}
				}
				sum
				units
				info
			}
			hostLimit {
				data ( perSecond:$perSecond  withMissingData:$withMissingData  useDefaultSizeBucket:$useDefaultSizeBucket  ) 
				label
				dimensions {
					label
					value
				}
				key {
					measureFieldName
					dimensions {
						fieldName
						value
					}
				}
				sum
				units
				info
			}
			samples
		}
		users ( userIDs:$userIDs  )  {
			id
			interfaces {
				metrics ( toRate:$toRate  )  {
					duration
					granularity
					bytesDownstream
					bytesUpstream
					bytesTotal
					lostDownstream
					lostDownstreamPcnt
					lostUpstream
					lostUpstreamPcnt
					packetsDownstream
					packetsUpstream
					jitterUpstream
					jitterDownstream
					packetsDiscardedDownstream
					packetsDiscardedUpstream
					rtt
					hostCount
					hostLimit
					flowCount
				}
				name
				timeseries ( buckets:$buckets  labels:$labels  )  {
					data ( perSecond:$perSecond  withMissingData:$withMissingData  useDefaultSizeBucket:$useDefaultSizeBucket   )
					label
					dimensions {
						label
						value
					}
					key {
						measureFieldName
						dimensions {
							fieldName
							value
						}
					}
					sum
					units
					info
				}
				annotations ( types:$types  )  {
					time
					label
					shortLabel
					type
				}
				periods {
					duration
					title
					type
				}
				remoteIPInfo {
					ip
					countryCode
					countryName
					city
					state
					provider
					latitude
					longitude
				}
				remoteIP
				socketInfo {
					id
					serial
					isPrimary
					platform
					version
					versionUpdateTime
				}
				ipsecInfo {
					isPrimary
					catoIP
					remoteIP
					ikeVersion
					tunnelConfig {
						tunnelId
						tunnelRemoteIdentifier
						localId
					}
				}
				interfaceInfo {
					id
					name
					upstreamBandwidth
					downstreamBandwidth
					upstreamBandwidthMbpsPrecision
					downstreamBandwidthMbpsPrecision
					destType
					wanRole
				}
			}
			metrics ( toRate:$toRate   ) {
				duration
				granularity
				bytesDownstream
				bytesUpstream
				bytesTotal
				lostDownstream
				lostDownstreamPcnt
				lostUpstream
				lostUpstreamPcnt
				packetsDownstream
				packetsUpstream
				jitterUpstream
				jitterDownstream
				packetsDiscardedDownstream
				packetsDiscardedUpstream
				rtt
				hostCount
				hostLimit
				flowCount
			}
			name
			info {
				name
				type
				description
				countryCode
				region
				countryName
				countryStateName
				cityName
				address
				isHA
				connType
				creationTime
				interfaces {
					id
					name
					upstreamBandwidth
					downstreamBandwidth
					upstreamBandwidthMbpsPrecision
					downstreamBandwidthMbpsPrecision
					destType
					wanRole
				}
				sockets {
					id
					serial
					isPrimary
					platform
					version
					versionUpdateTime
				}
				ipsec {
					isPrimary
					catoIP
					remoteIP
					ikeVersion
					tunnelConfig {
						tunnelId
						tunnelRemoteIdentifier
						localId
					}
				}
			}
			hostCount {
				data ( perSecond:$perSecond  withMissingData:$withMissingData  useDefaultSizeBucket:$useDefaultSizeBucket  ) 
				label
				dimensions {
					label
					value
				}
				key {
					measureFieldName
					dimensions {
						fieldName
						value
					}
				}
				sum
				units
				info
			}
			flowCount {
				data ( perSecond:$perSecond  withMissingData:$withMissingData  useDefaultSizeBucket:$useDefaultSizeBucket  ) 
				label
				dimensions {
					label
					value
				}
				key {
					measureFieldName
					dimensions {
						fieldName
						value
					}
				}
				sum
				units
				info
			}
			hostLimit {
				data ( perSecond:$perSecond  withMissingData:$withMissingData  useDefaultSizeBucket:$useDefaultSizeBucket  ) 
				label
				dimensions {
					label
					value
				}
				key {
					measureFieldName
					dimensions {
						fieldName
						value
					}
				}
				sum
				units
				info
			}
			samples
		}
		timeseries ( labels:$labels  buckets:$buckets  )  {
			data ( perSecond:$perSecond  withMissingData:$withMissingData  useDefaultSizeBucket:$useDefaultSizeBucket   )
			label
			dimensions {
				label
				value
			}
			key {
				measureFieldName
				dimensions {
					fieldName
					value
				}
			}
			sum
			units
			info
		}
	}	
}