JS Software Development Kit
JS Software Development Kit
Overview JS APIs are JS functions to include various ServiceDesk Plus MSP Cloud functionalities into the custom widget you create. Add this JavaScript file to all the HTML/widget pages to access the JavaScript APIs from the application: ...
Manage Custom Widgets
SDP.openWidget(options) Opens a new widget as a pop-up within the custom widget. Parameters: Name Type Description options* Object Object which contains API details. Property Type Description id* Long Indicates the ID of the widget to be opened. ...
Add/Edit/Delete Service Desk Data
SDP.get(options) Fetch the widget data such as URLs, or any input data in the custom widget from the server. You can also perform a cross portal call from the custom widget using this function. Note that only SDP V3 APIs can be invoked using this ...
Fetch Custom Widget/User Details
SDP.getCurrentInstance(); Fetches the details of the instance where the custom widget is loaded. Returns: Object – Returns instance details object. Syntax: var instanceDetails = SDP.getCurrentInstance(); Sample Response: { appdisplayname: "IT Desk" ...
Manage Variables/Connection in Custom Widget
SDP.getVariables() Fetches all the variables associated with the custom widget. Returns: Promise - Resolved with Success or Rejected with Failure. Syntax: SDP.getVariables().then(function(response) { console.log(response); }).catch(function(response) ...
APIs exclusive to Add/Edit Request Form
SDP.showWidget() Displays the widgets that are hidden by default in the request form right panel. You can call this API as per as your requirements. Returns: Promise - Resolved with Success or Rejected with Failure. Syntax: ...
Event Listeners
Event Listeners are functions that are called when a specific event occurs. They are initialized when the widget is loaded. The following event listeners are invoked to all widget in ServiceDesk Plus MSP Cloud when the DRE connection is authorized or ...