Query
query TimeSeriesMetric($name: String!) {
timeSeriesMetric(name: $name) {
timestamps {
unixTimestamp
iso8601
}
series {
values
userId
dimension {
type
value
}
threadIds
}
}
}Variables
{
"name": "string"
}Response
{
"data": {
"timeSeriesMetric": {
"timestamps": [
{
"unixTimestamp": "string",
"iso8601": "string"
}
],
"series": [
{
"values": [
1.5
],
"userId": "id",
"dimension": {
"type": "COMPANY",
"value": "string"
},
"threadIds": [
[
"string"
]
]
}
]
}
}
}Queries
timeSeriesMetric
Fetch a named time-series metric for the workspace, returning data points bucketed over a time range.
Pass a metric name such as threads_created_count or threads_first_response_time__p50 and optional
options to control the date range, grouping dimension, and interval. Requires the metrics:read
permission; agent-specific metric names additionally require metricsAgent:read and the
team_reporting billing feature. The available look-back window is determined by your plan’s
insights_max_days entitlement.
QUERY
timeSeriesMetric(name: String!, options: TimeSeriesMetricOptions): TimeSeriesMetricArguments
name
String!
required
options
Returns
timestamps
[DateTime!]!
Ordered bucket start times for the series data points, one per interval.
series
[TimeSeriesSeries!]!
One series entry per dimension value (or a single entry when no dimension is requested).
Query
query TimeSeriesMetric($name: String!) {
timeSeriesMetric(name: $name) {
timestamps {
unixTimestamp
iso8601
}
series {
values
userId
dimension {
type
value
}
threadIds
}
}
}Variables
{
"name": "string"
}Response
{
"data": {
"timeSeriesMetric": {
"timestamps": [
{
"unixTimestamp": "string",
"iso8601": "string"
}
],
"series": [
{
"values": [
1.5
],
"userId": "id",
"dimension": {
"type": "COMPANY",
"value": "string"
},
"threadIds": [
[
"string"
]
]
}
]
}
}
}Was this page helpful?

