{
  "GlobalSettings": {
    "type": "dynamic",
    "separator": "_"
  },
  "vectors": [
    {
      "URL": "$BaseURL/timeSeries?aggregation.crossSeriesReducer=REDUCE_SUM&filter=metric.type=\"serviceruntime.googleapis.com/quota/rate/net_usage\"&aggregation.perSeriesAligner=ALIGN_RATE&interval.startTime={$start_time}&interval.endTime={$end_time}&aggregation.alignmentPeriod=240s&aggregation.groupByFields=resource.label.\"project_id\"&aggregation.groupByFields=resource.label.\"location\"&aggregation.groupByFields=resource.label.\"service\"&aggregation.groupByFields=metric.label.\"quota_metric\"",
      "URLSetting": {
        "requestType": "get"
      },
      "path": [
        {
          "isPartOfHierarchy": true,
          "query": "$.timeSeries[*].resource.labels.project_id"
        },
        {
          "isPartOfHierarchy": true,
          "query": "$.timeSeries[*].resource.labels.location",
          "replaceVectorKey": "locationKey"
        },
        {
          "isPartOfHierarchy": true,
          "query": "$.timeSeries[*].resource.labels[?(@.location == 'locationKey')].service",
		  "replaceVectorKey":"serviceKey",
        },
	{
          "isPartOfHierarchy": true,
          "query": "$.timeSeries[*].resource.labels[?(@.location == 'locationKey' && @.service == 'serviceKey')].metric.labels.quota_metric",
		  "replaceVectorKey":"quotaKey",
		  "splitChar": "/",
		  "pickIndex": "1"
        }
      ],
      "metrics": [
        {
          "mPath": "$.timeSeries[*][?(@.resource.label.location == 'locationKey' && @.resource.labels.service == 'serviceKey' && @.metric.labels.quota_metric == 'quotaKey')].points[0].value.",
          "operation": "none",
          "attribute": [
            {
              "operation": "none",
              "name": "doubleValue",
              "index": 1,
              "type": 1
            }
          ]
        }
      ]
    }
  ]
}
