RPC API Developer's Guide (Deprecated)

RPC API: Clone a widget

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.

 

cloneWidget

Clone a widget

URL:
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:

Parameter

Type

Description

widgetId Integer Required. The Id of the widget you want to clone.
cloneWidgetName String Required. The name of the cloned widget.

 

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:

  • id
  • description
  • columnIdx
  • lastUpdatedBy
  • name
  • ord
  • params
  • lastUpdatedOn
  • type
  • dashboardId

 

Example

Request:
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"
}