fbpx
POSThttps://api.spotinst.io/spectrum/metrics/metricData?accountId={ACCOUNT_ID}

Publishes metric data points to Spotinst Spectrum

URL Parameters

Parameter Type Description
ACCOUNT_ID String

Account ID from Spotinst console

Example: act-12345
Request

Headers
{
  	"Content-Type": "application/json",
    "Authorization": "Bearer ${TOKEN}"
}
Body
Copied!
Downloaded!
{
	"metricData": [{
		"namespace": "myNamespace",
		"dimensions": [{
			"name": "dimensionName",
			"value": "dimensionValue"
		}],
		"metrics": [{
			"name": "metricName",
			"value": 1,
			"unit": "metricUnit"
		}]
	}]
}

Body Attributes


  • metricData.namespace * String
    The name of the namespace.
  • metricData.dimensions * Array
    (at least one required) The dimension(s) to query on, associated with the metric.
  • metricData.dimensions.name * String
    The name of the dimension.
  • metricData.dimensions.value * String
    The value representing the dimension.
  • metricData.metrics.name * String
    The name of the metric
  • metricData.metrics.value * Integer
    The value of the metric.
  • metricData.metrics.unit * String
    The unit of the metric using one of the following Units: Seconds | Microseconds | Milliseconds | Bytes | Kilobytes | Megabytes | Gigabytes | Terabytes | Bits | Kilobits | Megabits | Gigabits | Terabits | Percent | Count | Bytes/Second | Kilobytes/Second | Megabytes/Second | Gigabytes/Second | Terabytes/Second | Bits/Second | Kilobits/Second | Megabits/Second | Gigabits/Second | Terabits/Second | Count/Second | Custom
Response - 200

Headers
{
  "Content-Type": "application/json"
}
Body
Copied!
Downloaded!
{
  "request": {
    "id": "cb6509c2-84a9-4e1e-a6b4-5b91fa5f2450",
    "url": "/spectrum/metrics/metricData",
    "method": "POST",
    "timestamp": "1970-01-01T01:00:00.000+0000"
  },
  "response": {
    "status": {
      "code": 200,
      "message": "OK"
    },
    "kind": "spotinst:spectrum:metricData",
    "items": [],
    "count": 0
  }
}