{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/google-cloud-monitoring/json-schema/google-cloud-monitoring-list-time-series-response-schema.json",
  "title": "ListTimeSeriesResponse",
  "description": "The ListTimeSeries response.",
  "x-generated": "2026-11-11",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/google-cloud-monitoring-folders-api-openapi.yml#/components/schemas/ListTimeSeriesResponse",
  "properties": {
    "timeSeries": {
      "description": "One or more time series that match the filter included in the request.",
      "type": "array",
      "items": {
        "$ref": "#/$defs/TimeSeries"
      }
    },
    "executionErrors": {
      "items": {
        "$ref": "#/$defs/Status"
      },
      "type": "array",
      "description": "Query execution errors that may have caused the time series data returned to be incomplete."
    },
    "nextPageToken": {
      "description": "If there are more results than have been returned, then this field is set to a non-empty value. To see the additional results, use that value as page_token in the next call to this method.",
      "type": "string"
    },
    "unit": {
      "description": "The unit in which all time_series point values are reported. unit follows the UCUM format for units as seen in https://unitsofmeasure.org/ucum.html. If different time_series have different units (for example, because they come from different metric types, or a unit is absent), then unit will be \"{not_a_unit}\".",
      "type": "string"
    },
    "unreachable": {
      "description": "Cloud regions that were unreachable which may have caused incomplete data to be returned.",
      "items": {
        "type": "string"
      },
      "type": "array"
    }
  },
  "type": "object",
  "$defs": {
    "BucketOptions": {
      "type": "object",
      "properties": {
        "linearBuckets": {
          "$ref": "#/$defs/Linear",
          "description": "The linear bucket."
        },
        "explicitBuckets": {
          "$ref": "#/$defs/Explicit",
          "description": "The explicit buckets."
        },
        "exponentialBuckets": {
          "$ref": "#/$defs/Exponential",
          "description": "The exponential buckets."
        }
      },
      "description": "BucketOptions describes the bucket boundaries used to create a histogram for the distribution. The buckets can be in a linear sequence, an exponential sequence, or each bucket can be specified explicitly. BucketOptions does not include the number of values in each bucket.A bucket has an inclusive lower bound and exclusive upper bound for the values that are counted for that bucket. The upper bound of a bucket must be strictly greater than the lower bound. The sequence of N buckets for a distribution consists of an underflow bucket (number 0), zero or more finite buckets (number 1 through N - 2) and an overflow bucket (number N - 1). The buckets are contiguous: the lower bound of bucket i (i > 0) is the same as the upper bound of bucket i - 1. The buckets span the whole range of finite values: lower bound of the underflow bucket is -infinity and the upper bound of the overflow bucket is +infinity. The finite buckets are so-called because both bounds are finite."
    },
    "Distribution": {
      "properties": {
        "count": {
          "format": "int64",
          "description": "The number of values in the population. Must be non-negative. This value must equal the sum of the values in bucket_counts if a histogram is provided.",
          "type": "string"
        },
        "range": {
          "$ref": "#/$defs/Range",
          "description": "If specified, contains the range of the population values. The field must not be present if the count is zero. This field is presently ignored by the Cloud Monitoring API v3."
        },
        "mean": {
          "type": "number",
          "format": "double",
          "description": "The arithmetic mean of the values in the population. If count is zero then this field must be zero."
        },
        "bucketOptions": {
          "$ref": "#/$defs/BucketOptions",
          "description": "Required in the Cloud Monitoring API v3. Defines the histogram bucket boundaries."
        },
        "sumOfSquaredDeviation": {
          "format": "double",
          "type": "number",
          "description": "The sum of squared deviations from the mean of the values in the population. For values x_i this is: Sum[i=1..n]((x_i - mean)^2) Knuth, \"The Art of Computer Programming\", Vol. 2, page 232, 3rd edition describes Welford's method for accumulating this sum in one pass.If count is zero then this field must be zero."
        },
        "exemplars": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/Exemplar"
          },
          "description": "Must be in increasing order of value field."
        },
        "bucketCounts": {
          "description": "Required in the Cloud Monitoring API v3. The values for each bucket specified in bucket_options. The sum of the values in bucketCounts must equal the value in the count field of the Distribution object. The order of the bucket counts follows the numbering schemes described for the three bucket types. The underflow bucket has number 0; the finite buckets, if any, have numbers 1 through N-2; and the overflow bucket has number N-1. The size of bucket_counts must not be greater than N. If the size is less than N, then the remaining buckets are assigned values of zero.",
          "items": {
            "type": "string",
            "format": "int64"
          },
          "type": "array"
        }
      },
      "description": "Distribution contains summary statistics for a population of values. It optionally contains a histogram representing the distribution of those values across a set of buckets.The summary statistics are the count, mean, sum of the squared deviation from the mean, the minimum, and the maximum of the set of population of values. The histogram is based on a sequence of buckets and gives a count of values that fall into each bucket. The boundaries of the buckets are given either explicitly or by formulas for buckets of fixed or exponentially increasing widths.Although it is not forbidden, it is generally a bad idea to include non-finite values (infinities or NaNs) in the population of values, as this will render the mean and sum_of_squared_deviation fields meaningless.",
      "type": "object"
    },
    "Exemplar": {
      "properties": {
        "timestamp": {
          "description": "The observation (sampling) time of the above value.",
          "format": "google-datetime",
          "type": "string"
        },
        "value": {
          "type": "number",
          "format": "double",
          "description": "Value of the exemplar point. This value determines to which bucket the exemplar belongs."
        },
        "attachments": {
          "type": "array",
          "description": "Contextual information about the example value. Examples are:Trace: type.googleapis.com/google.monitoring.v3.SpanContextLiteral string: type.googleapis.com/google.protobuf.StringValueLabels dropped during aggregation: type.googleapis.com/google.monitoring.v3.DroppedLabelsThere may be only a single attachment of any given message type in a single exemplar, and this is enforced by the system.",
          "items": {
            "additionalProperties": {
              "description": "Properties of the object. Contains field @type with type URL."
            },
            "type": "object"
          }
        }
      },
      "description": "Exemplars are example points that may be used to annotate aggregated distribution values. They are metadata that gives information about a particular value added to a Distribution bucket, such as a trace ID that was active when a value was added. They may contain further information, such as a example values and timestamps, origin, etc.",
      "type": "object"
    },
    "Explicit": {
      "description": "Specifies a set of buckets with arbitrary widths.There are size(bounds) + 1 (= N) buckets. Bucket i has the following boundaries:Upper bound (0 <= i < N-1): boundsi Lower bound (1 <= i < N); boundsi - 1The bounds field must contain at least one element. If bounds has only one element, then there are no finite buckets, and that single element is the common boundary of the overflow and underflow buckets.",
      "type": "object",
      "properties": {
        "bounds": {
          "type": "array",
          "description": "The values must be monotonically increasing.",
          "items": {
            "type": "number",
            "format": "double"
          }
        }
      }
    },
    "Exponential": {
      "properties": {
        "numFiniteBuckets": {
          "format": "int32",
          "type": "integer",
          "description": "Must be greater than 0."
        },
        "growthFactor": {
          "format": "double",
          "type": "number",
          "description": "Must be greater than 1."
        },
        "scale": {
          "format": "double",
          "description": "Must be greater than 0.",
          "type": "number"
        }
      },
      "description": "Specifies an exponential sequence of buckets that have a width that is proportional to the value of the lower bound. Each bucket represents a constant relative uncertainty on a specific value in the bucket.There are num_finite_buckets + 2 (= N) buckets. Bucket i has the following boundaries:Upper bound (0 <= i < N-1): scale * (growth_factor ^ i).Lower bound (1 <= i < N): scale * (growth_factor ^ (i - 1)).",
      "type": "object"
    },
    "Linear": {
      "type": "object",
      "properties": {
        "width": {
          "type": "number",
          "description": "Must be greater than 0.",
          "format": "double"
        },
        "numFiniteBuckets": {
          "type": "integer",
          "format": "int32",
          "description": "Must be greater than 0."
        },
        "offset": {
          "type": "number",
          "description": "Lower bound of the first bucket.",
          "format": "double"
        }
      },
      "description": "Specifies a linear sequence of buckets that all have the same width (except overflow and underflow). Each bucket represents a constant absolute uncertainty on the specific value in the bucket.There are num_finite_buckets + 2 (= N) buckets. Bucket i has the following boundaries:Upper bound (0 <= i < N-1): offset + (width * i).Lower bound (1 <= i < N): offset + (width * (i - 1))."
    },
    "Metric": {
      "type": "object",
      "description": "A specific metric, identified by specifying values for all of the labels of a MetricDescriptor.",
      "properties": {
        "type": {
          "description": "An existing metric type, see google.api.MetricDescriptor. For example, custom.googleapis.com/invoice/paid/amount.",
          "type": "string"
        },
        "labels": {
          "type": "object",
          "additionalProperties": {
            "type": "string"
          },
          "description": "The set of label values that uniquely identify this metric. All labels listed in the MetricDescriptor must be assigned values."
        }
      }
    },
    "MonitoredResource": {
      "properties": {
        "type": {
          "type": "string",
          "description": "Required. The monitored resource type. This field must match the type field of a MonitoredResourceDescriptor object. For example, the type of a Compute Engine VM instance is gce_instance. For a list of types, see Monitoring resource types (https://cloud.google.com/monitoring/api/resources) and Logging resource types (https://cloud.google.com/logging/docs/api/v2/resource-list)."
        },
        "labels": {
          "type": "object",
          "description": "Required. Values for all of the labels listed in the associated monitored resource descriptor. For example, Compute Engine VM instances use the labels \"project_id\", \"instance_id\", and \"zone\".",
          "additionalProperties": {
            "type": "string"
          }
        }
      },
      "type": "object",
      "description": "An object representing a resource that can be used for monitoring, logging, billing, or other purposes. Examples include virtual machine instances, databases, and storage devices such as disks. The type field identifies a MonitoredResourceDescriptor object that describes the resource's schema. Information in the labels field identifies the actual resource and its attributes according to the schema. For example, a particular Compute Engine VM instance could be represented by the following object, because the MonitoredResourceDescriptor for \"gce_instance\" has labels \"project_id\", \"instance_id\" and \"zone\": { \"type\": \"gce_instance\", \"labels\": { \"project_id\": \"my-project\", \"instance_id\": \"12345678901234\", \"zone\": \"us-central1-a\" }} "
    },
    "MonitoredResourceMetadata": {
      "type": "object",
      "properties": {
        "systemLabels": {
          "description": "Output only. Values for predefined system metadata labels. System labels are a kind of metadata extracted by Google, including \"machine_image\", \"vpc\", \"subnet_id\", \"security_group\", \"name\", etc. System label values can be only strings, Boolean values, or a list of strings. For example: { \"name\": \"my-test-instance\", \"security_group\": [\"a\", \"b\", \"c\"], \"spot_instance\": false } ",
          "type": "object",
          "additionalProperties": {
            "description": "Properties of the object."
          }
        },
        "userLabels": {
          "additionalProperties": {
            "type": "string"
          },
          "type": "object",
          "description": "Output only. A map of user-defined metadata labels."
        }
      },
      "description": "Auxiliary metadata for a MonitoredResource object. MonitoredResource objects contain the minimum set of information to uniquely identify a monitored resource instance. There is some other useful auxiliary metadata. Monitoring and Logging use an ingestion pipeline to extract metadata for cloud resources of all types, and store the metadata in this message."
    },
    "Point": {
      "description": "A single data point in a time series.",
      "properties": {
        "value": {
          "$ref": "#/$defs/TypedValue",
          "description": "The value of the data point."
        },
        "interval": {
          "$ref": "#/$defs/TimeInterval",
          "description": "The time interval to which the data point applies. For GAUGE metrics, the start time is optional, but if it is supplied, it must equal the end time. For DELTA metrics, the start and end time should specify a non-zero interval, with subsequent points specifying contiguous and non-overlapping intervals. For CUMULATIVE metrics, the start and end time should specify a non-zero interval, with subsequent points specifying the same start time and increasing end times, until an event resets the cumulative value to zero and sets a new start time for the following points."
        }
      },
      "type": "object"
    },
    "Range": {
      "description": "The range of the population values.",
      "properties": {
        "min": {
          "type": "number",
          "description": "The minimum of the population values.",
          "format": "double"
        },
        "max": {
          "type": "number",
          "description": "The maximum of the population values.",
          "format": "double"
        }
      },
      "type": "object"
    },
    "Status": {
      "properties": {
        "details": {
          "description": "A list of messages that carry the error details. There is a common set of message types for APIs to use.",
          "items": {
            "additionalProperties": {
              "description": "Properties of the object. Contains field @type with type URL."
            },
            "type": "object"
          },
          "type": "array"
        },
        "message": {
          "description": "A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client.",
          "type": "string"
        },
        "code": {
          "type": "integer",
          "format": "int32",
          "description": "The status code, which should be an enum value of google.rpc.Code."
        }
      },
      "type": "object",
      "description": "The Status type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by gRPC (https://github.com/grpc). Each Status message contains three pieces of data: error code, error message, and error details.You can find out more about this error model and how to work with it in the API Design Guide (https://cloud.google.com/apis/design/errors)."
    },
    "TimeInterval": {
      "properties": {
        "startTime": {
          "type": "string",
          "description": "Optional. The beginning of the time interval. The default value for the start time is the end time. The start time must not be later than the end time.",
          "format": "google-datetime"
        },
        "endTime": {
          "type": "string",
          "format": "google-datetime",
          "description": "Required. The end of the time interval."
        }
      },
      "description": "Describes a time interval: Reads: A half-open time interval. It includes the end time but excludes the start time: (startTime, endTime]. The start time must be specified, must be earlier than the end time, and should be no older than the data retention period for the metric. Writes: A closed time interval. It extends from the start time to the end time, and includes both: [startTime, endTime]. Valid time intervals depend on the MetricKind (https://cloud.google.com/monitoring/api/ref_v3/rest/v3/projects.metricDescriptors#MetricKind) of the metric value. The end time must not be earlier than the start time, and the end time must not be more than 25 hours in the past or more than five minutes in the future. For GAUGE metrics, the startTime value is technically optional; if no value is specified, the start time defaults to the value of the end time, and the interval represents a single point in time. If both start and end times are specified, they must be identical. Such an interval is valid only for GAUGE metrics, which are point-in-time measurements. The end time of a new interval must be at least a millisecond after the end time of the previous interval. For DELTA metrics, the start time and end time must specify a non-zero interval, with subsequent points specifying contiguous and non-overlapping intervals. For DELTA metrics, the start time of the next interval must be at least a millisecond after the end time of the previous interval. For CUMULATIVE metrics, the start time and end time must specify a non-zero interval, with subsequent points specifying the same start time and increasing end times, until an event resets the cumulative value to zero and sets a new start time for the following points. The new start time must be at least a millisecond after the end time of the previous interval. The start time of a new interval must be at least a millisecond after the end time of the previous interval because intervals are closed. If the start time of a new interval is the same as the end time of the previous interval, then data written at the new start time could overwrite data written at the previous end time.",
      "type": "object"
    },
    "TimeSeries": {
      "properties": {
        "description": {
          "type": "string",
          "description": "Input only. A detailed description of the time series that will be associated with the google.api.MetricDescriptor for the metric. Once set, this field cannot be changed through CreateTimeSeries."
        },
        "valueType": {
          "enum": [
            "VALUE_TYPE_UNSPECIFIED",
            "BOOL",
            "INT64",
            "DOUBLE",
            "STRING",
            "DISTRIBUTION",
            "MONEY"
          ],
          "type": "string",
          "description": "The value type of the time series. When listing time series, this value type might be different from the value type of the associated metric if this time series is an alignment or reduction of other time series.When creating a time series, this field is optional. If present, it must be the same as the type of the data in the points field."
        },
        "unit": {
          "description": "The units in which the metric value is reported. It is only applicable if the value_type is INT64, DOUBLE, or DISTRIBUTION. The unit defines the representation of the stored metric values. This field can only be changed through CreateTimeSeries when it is empty.",
          "type": "string"
        },
        "metric": {
          "$ref": "#/$defs/Metric",
          "description": "The associated metric. A fully-specified metric used to identify the time series."
        },
        "resource": {
          "$ref": "#/$defs/MonitoredResource",
          "description": "The associated monitored resource. Custom metrics can use only certain monitored resource types in their time series data. For more information, see Monitored resources for custom metrics (https://cloud.google.com/monitoring/custom-metrics/creating-metrics#custom-metric-resources)."
        },
        "metricKind": {
          "type": "string",
          "enum": [
            "METRIC_KIND_UNSPECIFIED",
            "GAUGE",
            "DELTA",
            "CUMULATIVE"
          ],
          "description": "The metric kind of the time series. When listing time series, this metric kind might be different from the metric kind of the associated metric if this time series is an alignment or reduction of other time series.When creating a time series, this field is optional. If present, it must be the same as the metric kind of the associated metric. If the associated metric's descriptor must be auto-created, then this field specifies the metric kind of the new descriptor and must be either GAUGE (the default) or CUMULATIVE."
        },
        "points": {
          "items": {
            "$ref": "#/$defs/Point"
          },
          "type": "array",
          "description": "The data points of this time series. When listing time series, points are returned in reverse time order.When creating a time series, this field must contain exactly one point and the point's type must be the same as the value type of the associated metric. If the associated metric's descriptor must be auto-created, then the value type of the descriptor is determined by the point's type, which must be BOOL, INT64, DOUBLE, or DISTRIBUTION."
        },
        "metadata": {
          "$ref": "#/$defs/MonitoredResourceMetadata",
          "description": "Output only. The associated monitored resource metadata. When reading a time series, this field will include metadata labels that are explicitly named in the reduction. When creating a time series, this field is ignored."
        }
      },
      "type": "object",
      "description": "A collection of data points that describes the time-varying values of a metric. A time series is identified by a combination of a fully-specified monitored resource and a fully-specified metric. This type is used for both listing and creating time series."
    },
    "TypedValue": {
      "properties": {
        "boolValue": {
          "type": "boolean",
          "description": "A Boolean value: true or false."
        },
        "stringValue": {
          "description": "A variable-length string value.",
          "type": "string"
        },
        "doubleValue": {
          "format": "double",
          "description": "A 64-bit double-precision floating-point number. Its magnitude is approximately ±10±300 and it has 16 significant digits of precision.",
          "type": "number"
        },
        "int64Value": {
          "description": "A 64-bit integer. Its range is approximately ±9.2x1018.",
          "type": "string",
          "format": "int64"
        },
        "distributionValue": {
          "$ref": "#/$defs/Distribution",
          "description": "A distribution value."
        }
      },
      "description": "A single strongly-typed value.",
      "type": "object"
    }
  }
}