It’s potentially possible to write your own workflow for ServiceDesk Plus using external scripts to interact with the ServiceDesk Plus API. There are various scripting languages we could use but, for simplicity, I’m going to use Microsoft PowerShell. PowerShell is widely recognised and should be readily available on Windows servers running ServiceDesk Plus.
Right-click ‘Windows PowerShell’ and choose the ‘Run as administrator’ option to bring up the PowerShell command line. Then enter the command ‘set-executionpolicy unrestricted’; you will be asked to accept the policy change by typing ‘Y’ as shown below:
You can always use a basic text editor to generate a PowerShell script but running the Windows PowerShell Integrated Scripting Environment (ISE) can be very useful as it provides a means to easily write, test and debug PowerShell scripts:
So how do we make an API call to ServiceDesk Plus via a script? If you copy the following code to a script pane in your PowerShell ISE you should be able to run the script with the ‘Play’ button and see the formatted output – note that you’ll have to replace the details of the TECHNICIAN_KEY and RequestID (as shown in red) with values relevant to your own ServiceDesk Plus system (for a reminder see Part 2):
# Powershell HTTP Request
$url =”http://localhost:8888/sdpapi/request/493?TECHNICIAN_KEY=F3DC7E96-56D5-4839-9071-F9A6371241F1&OPERATION_NAME=GET_REQUEST”
$result = (New-Object System.Net.WebClient).DownloadString(“$url”);
write-host $result
![APIPart3_4](https://set3solutions.co.uk/wp-content/uploads/2016/07/APIPart3_4.png)
Thanks for sticking with it and next time we’ll step through a real example.
Enjoy!
This article is relevant to:
Service DeskOther recent articles in the same category
You may be interested in these other recent articles
ManageEngine ServiceDesk Plus Cloud Build Release Information
25 July 2024
Summary details of the current Build Release information for ManageEngine ServiceDesk Plus Cloud Edition. All upgrades are performed by the Zoho Cloud team. Should you…
Read moreManageEngine Analytics Plus Build Release Information
23 July 2024
Summary details of the current build release information for ManageEngine Analytics Plus. Scroll the above to view more release details. Download the latest service packs…
Read moreManageEngine ADSelfService Plus Build Release Information
12 July 2024
The current build release information for ManageEngine ADSelfService Plus is summarised below. Scroll down for more information. You can download the latest service packs here.…
Read moreManageEngine Password Manager Pro Build Release Information
21 June 2024
The current build release information for ManageEngine Password Manager Pro is summarised below. Scroll down for more information. You can download the latest service packs…
Read moreSecurity Advisory – Important Security Fix Released For ManageEngine Solutions
17 June 2024
Product Name Affected Version(s) Fixed Version Fixed on Password Manager Pro 12430 and below 12431 14/06/2024 PAM360 7000 and below 7001 14/06/2024 DetailsAn SQL injection…
Read more