Forum Discussion

Stanley_Horspoo's avatar
7 years ago

getGraphImage REST API call

rpc calls are being phased out. This call is repeatedly failing:

curl --user 'userid:pwd' -X GET "https://icontrol.logicmonitor.com/santaba/rpc/getGraphImage?graphId=34&dataSourceInstanceId=967280"

I have double checked the dataSourceInstanceId and the graphId. Rather than try to fix the rpc call, I'd like to update to /rest calls. But I can not find anything in the documentation that show this call.

To be clear, I want to download the graph image, not the data

8 Replies

Replies have been turned off for this discussion
  • Sarah_Terry's avatar
    Sarah_Terry
    Icon for Product Manager rankProduct Manager

    Hi Stanley -

    There isn't yet a REST replacement for the getGraphImage RPC API call (it isn't very popular), but we'll get one out before we completely phase out the RPC API.  

    Thanks,

    Sarah

  • I need this feature too. The reason being to embed graph/widget images into reports that are then PDF'd to our clients.

    Yes, I can use the REST graph data API, but then I have to build and maintain scripts to extract the right fields and then convert to a graph.

    I note the RPC API's are being deprecated, and not available to new users from end December 2017. When will the REST API be available please?

    Thanks,

    Nick

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

    This should make it into the release after next (v100) :)/emoticons/smile@2x.png 2x" title=":)" width="20">

  • Hi Sarah,

    I see this is now available as a REST call in v101. Thanks.  However ....

    Is there a way to specify the size (width x height) of the image, as it is too small to be meaningful over a long period (e.g. 1 month)?

    Also a meaningful heading for the chart?

    Thanks,

    Nick

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

    Hi @beakynb - We don't currently offer options to specify image size and title, but we can add them.

  • Hi Sarah,

    It would be great if the image looked similar to the dashboard widgets. I've drawn up an example, as per attached.

    Includes graph heading, time period, (major & minor) grid lines, and legend.

    Thanks,

    Nick

  • Hi Sarah,

    The graph image API is looking better, thanks.

    With the Widget graphs, it doesn't seem to work for some, e.g. Big Number, Table, and NOC widgets.

    Will this be possible in a future release?

    Thanks,

    Nick

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

    Hi @beakynb

    It's not currently planned, but we can definitely consider supporting those widget types for the graph image API in a future release.

    Thanks,

    Sarah