Forum Discussion

Soma_Sekhar's avatar
6 years ago

Device graph data

Hi Team,

I used the below link to get graph data for the device (Single Instance) .

https://www.logicmonitor.com/support/rest-api-developers-guide/v1/data/get-graph-data/

Here I used the below Rest API 

/device/devices/{deviceID}/devicedatasources/{deviceDataSourceID}/instances/{instanceID}/graphs/{graphID}/data

Here I have provided all input parameters for this URI.

But I didn't get any data for it. I was getting only "No Data" for it . But that server acutally has data .

outPut:

 

"data" : [ "No Data", "No Data", "No Data", "No Data", "No Data", "No Data", "No Data", "No Data", "No Data", "No Data", "No Data", "No Data", "No Data", "No Data" ]
    }, {
      "colorName" : "green",
      "std" : "NaN",
      "min" : "NaN",
      "max" : "NaN",
      "avg" : "NaN",
      "visible" : true,
      "color" : "89A54E",
      "legend" : "Out Unicast",
      "type" : "Line",
      "useYMax" : false,
      "description" : "",
      "label" : "OUTUNICAST",
      "decimal" : -1,
      "data" : [ "No Data", "No Data", "No Data", "No Data", "No Data", "No Data", "No Data", "No Data", "No Data", "No Data", "No Data", "No Data", "No Data", "No Data" ]
    }, {
      "colorName" : "purple",
      "std" : "NaN",
      "min" : "NaN",
      "max" : "NaN",
      "avg" : "NaN",
      "visible" : true,
      "color" : "80699B",
      "legend" : "In (b/m)cast",
      "type" : "Line",
      "useYMax" : false,
      "description" : "",
      "label" : "INNONUNI",
      "decimal" : -1,
      "data" : [ "No Data", "No Data", "No Data", "No Data", "No Data", "No Data", "No Data", "No Data", "No Data", "No Data", "No Data", "No Data", "No Data", "No Data" ]
    }, {
      "colorName" : "maroon",
      "std" : "NaN",
      "min" : "NaN",
      "max" : "NaN",
      "avg" : "NaN",
      "visible" : true,
      "color" : "800000",
      "legend" : "Out (b/m)cast",
      "type" : "Line",
      "useYMax" : false,
      "description" : "",
      "label" : "OUTNONUNI",
      "decimal" : -1,
      "data" : [ "No Data", "No Data", "No Data", "No Data", "No Data", "No Data", "No Data", "No Data", "No Data", "No Data", "No Data", "No Data", "No Data", "No Data" ]
    } ],
    "missingLines" : [ ],
    "timestamps" : [ 1555975800000, 1555976078000, 1555976378000, 1555976678000, 1555976978000, 1555977278000, 1555977578000, 1555977878000, 1555978178000, 1555978478000, 1555978778000, 1555979078000, 1555979378000, 1555979678000 ],
    "scopes" : [ ],
    "instances" : [ ]
  }
}

  • Sarah_Terry's avatar
    Sarah_Terry
    Icon for Product Manager rankProduct Manager

    @Soma Sekhar can you provide an image of the graph you're trying to get data for? It looks like the request was successful, and that the graph itself just doesn't have data.

  • Sarah_Terry's avatar
    Sarah_Terry
    Icon for Product Manager rankProduct Manager

    @Soma Sekhar I think the issue here is the graph Id - in the API response you included, the graph legends do not match the legends in the image. So the graph Id in the request must not be the right one. You can make a GET request to 

    /device/devices/{deviceID}/devicedatasources/{deviceDataSourceID}

    To see all graph Ids.