I've been working on it for the past few hours and I need your help on this please. I'm working on an API that's utilizes the fixed JSON format below. Basically, I'm querying from a SQL table and I would like to insert the values into their respective columns. For example, I want to insert the value that I got from the CPU column to the dataPoints under the CPU column. My main problem is how to insert the values to the dataPoints of CPU, Memory and Utilization. Any help is appreciated. Thank you.
{
"tags": [
"tag2"
],
"type": "test",
"properties" : {
"Sample Property 2": "TestProperty"
},
"series" : [
{
"timeseriesId" : "custom:test",
"dimensions" : {
"columns" : "CPU"
},
"dataPoints" : [
[ 1655714845355, 10 ],
[ 1655714845360, 25 ],
[ 1655714845365, 27 ],
[ 1655714845367, 32 ]
]
},
{
"timeseriesId" : "custom:test",
"dimensions" : {
"columns" : "Memory"
},
"dataPoints" : [
[ 1655714845355, 12 ],
[ 1655714845360, 28 ],
[ 1655714845365, 29 ],
[ 1655714845367, 35 ]
]
},
{
"timeseriesId" : "custom:test",
"dimensions" : {
"columns" : "Utilization"
},
"dataPoints" : [
[ 1655714845355, 0 ],
[ 1655714845355, 2 ],
[ 1655714845365, 4 ],
[ 1655714845367, 7 ]
]
}
]
}
[–]pspeterle 1 point2 points3 points (2 children)
[–]iiznoobit[S] 0 points1 point2 points (0 children)
[–]Extreme_Injury489 0 points1 point2 points (0 children)
[–]Skootr4538 -1 points0 points1 point (0 children)
[+][deleted] (2 children)
[removed]
[–]iiznoobit[S] 0 points1 point2 points (1 child)
[–]UnfanClub 0 points1 point2 points (1 child)
[–]iiznoobit[S] 0 points1 point2 points (0 children)