Come join our live training webinar every other Wednesday at 11am PST and hear LogicMonitor experts explain best practices and answer common questions. We understand these are uncertain times, and we are here to help!
LogicMonitor’s RPC API enables you to clone a dashboard widget with the cloneDashboard request.
Note: As with all our API call, authentication is required.
Clone a widget
https://accountName.logicmonitor.com/santaba/rpc/cloneWidget?c=accountName&u=user&p=password&widgetId=widgetId&cloneWidgetName=cloneWidgetName
Request Parameters: You can include the following as query parameters in a cloneWidget requst:
All outputs will be in the format: { [status], [data], [errmsg] }, where status is the status of the response, errmsg is the error message associated with the response, and the data object includes an object for each widget, where the following data is returned for each widget:
curl "https://apiAccount.logicmonitor.com/santaba/rpc/cloneWidget?c=apiAccount&u=apiUser&p=example&widgetId=212&cloneWidgetName=MyClonedWidget"
Response:
{ "status": 200, "data": [{ "id": 264, "description": "", "columnIdx": 2, "lastUpdatedBy": "", "name": "MyClonedWidget", "ord": 2, "params": [ { "id": 2161, "name": "graphid", "value": "123", "widgetId": 264 }, { "id": 2162, "name": "interval", "value": "3", "widgetId": 264 }, { "id": 2163, "name": "timescale", "value": "day", "widgetId": 264 } ], "lastUpdatedOn": 1440609491, "type": "cgraph", "dashboardId": 37 }], "errmsg": "OK" }
In This Article