Hi,
I am trying to push data from Splunk to StatusPage using PowerShell but I am getting below error. I am new to Statuspage and not sure what should be expected data in Statuspage. I am sending in JSON format already.
OUTPUT:
value : 595
metricId fkyrb18y62b8
updateResponse
StatusPageURL: https://api.statuspage.io/v1/pages/w0jrf19mz1hn/metrics/fkyrb18y62b8/data
Body {
"data": [
{
"timestamp": "1717083400",
"value": "595",
"metric_id": "fkyrb18y62b8"
}
]
}
Write-Error: An error occurred:
{
"error": "data is invalid"
}
Hello Riyazudeen,
Thanks for reaching out about adding metric data. It looks like you're using the "Add data to a Metric" endpoint. This only requires the timestamp and the value since the metric ID is already in the endpoint. If you remove the metric_id element from the body of the JSON, that should fix the issue as long as the metric ID is valid. Please also check out the example in the docs here:
https://developer.statuspage.io/#operation/postPagesPageIdMetricsMetricIdData
Regards,
Jesse
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.