Integrasikan helpdesk dengan aplikasi web Anda.

Salah satu fitur menarik dari ServiceDesk Plus adalah kemudahan integrasi dengan aplikasi web lain yang umumnya telah dimiliki oleh perusahaan.


Ini dapat dilakukan dengan menggunakan modul API



  1. What is the purpose of APIs in ServiceDesk Plus?
  2. What are the types of APIs?
  3. What is the difference between the Servlet API and REST API?
  4. Can the XML Response (output) be edited?
  1. How do I configure additional fields in the API?
  2. I’m unable to close requests via API. What might be the reason?
  3. How do I add associated asset in the request?
  4. I’m unable to create requests from the API. It says Login failed.
  5. I’m unable to delete a request when I provide the login credentials of a requester.
  6. What are the operational commands accepted by the Servlet API?
Top
  1. How does the Rest API operate based on the given parameters?
  2. How is the authentication carried out in Rest API?
  3. How do I generate the API key?
  4. What are the operations supported by the Rest API?
  5. What response would ServiceDesk Plus send back to the third-party tool that is using the REST API for the operation "ADD_REQUEST"?
  6. How do I perform the “Add_Notes” operation in REST API?
  1. Are there any sample VB Script code to add requests in ServiceDesk plus application?
Top

General

  1. What is the purpose of APIs in ServiceDesk Plus?Application Programming Interface (API) is used to integrate various applications and facilitate sharing of data between them. The integration can be achieved with any third party (external) applications or web services that are capable of sending the data via HTTP protocol.Back to Questions
  2. What are the types of APIs?ManageEngine ServiceDesk Plus supports two types of API.
    1. SERVLET API
    2. REST API.
    Both the API methods can be implemented simultaneously in the application, provided the operation is performed with the corresponding syntax definitions.
    Back to Questions
  3. What is the difference between the Servlet API and REST API?
    Servlet APIREST API
    The servlet is a form based input submission by the external applications. While the output is exposed in XML format.The input data is sent as an XML string and the output is exposed as an XML string.
    The http form is submitted to,
    http://<machine_name>:<port_number>/servlets/RequestServlet
    The general form of the api url is,
    http://<servername>:<port number>/sdpapi/<module>
    Authentication is through User Name and Password for every API operation.Authentication is through Technician Key for every API operation.
    Supports operations on features such as Request, Site, Technician, Requester and Assets.Supports operations on Requests alone.
    Back to Questions
  4. Can the XML Response (output) be edited?It is not possible to edit the XML Response as it is the result of the action performed using API.Back to Questions

Servlet API

  1. How do I configure additional fields in the API?You can add and update additional fields using the Alias name.
    Example:
    <tr class="evenRow" valign="top">
    <td>Manager</td>
    <td>:</td>
    <td><input type="text" class="txt" NAME="Manager" style="width:200px;" /></td>
    </tr>
    In the above example, Manager is a user defined field. So the NAME field should also use the Label name of the Additional field to assign using API.
    Back to Questions
  2. I’m unable to close requests via API. What might be the reason?
    The following conditions are mandatory to close a request in ServiceDesk Plus.
    • If you have selected any mandatory fields for closing the request in Request Closing Rules, then those fields should be filled.
    • The login credentials provided in the API form should be of a technician and should have enough permission to close the request.
    Back to Questions
  3. How do I add associated asset in the request?
    Pass the attribute name as “asset” to capture the asset information in the request. Make sure that the asset specified in the API should exist in the ServiceDesk Plus.
    If you are using a Requester login and if “Show workstations associated to requester in Self-Service Portal” is enabled in Admin → Self Service Portal Settings, then only the Assets associated to the requester can be parsed.
    Back to Questions
  4. I’m unable to create requests from the API. It says Login failed.
    If login failed for a correct UserName and password then,
    1. Check if the user is present in the application and has a Login. Also check if the UserName and Password are right.
    2. If the user belongs to Local Authentication, then submit only the username and password to the below link for authentication.
      http://machinename:portname/servlets/RequestServlet
    3. If the user is associated to a Domain, then submit the username and password along with DOMAIN_NAME and logonDomainName to the below link for authentication.
      http://machinename:portname/servlets/RequestServlet
    Back to Questions
  5. I’m unable to delete a request when I provide the login credentials of a requester.
    Requester do not have permission to delete requests. The login permissions provided in ServiceDesk Plus would be applied while using the API.
    Back to Questions
  6. What are the operational commands accepted by the Servlet API?
    The servlet HTTP form submission based API supports operations such as,
    • Adding new request, editing, closing, deleting, viewing existing requests and adding notes for existing requests.
    • Adding new site, editing and deleting the existing site.
    • Adding new technician, editing and deleting the existing technician.
    • Adding new requester, editing and deleting the existing requester.
    • Adding a workstation/server, updating a workstation/server, adding an asset, updating an asset and deleting assets.
    Please refer to the link below regarding the attributes,
    http://www.manageengine.com/products/service-desk/help/adminguide/api/servlet-api.html
    Back to Questions

REST API

  1. How does the Rest API operate based on the given parameters?
    The operations performed with REST API is based on the operation' parameter and is sent to the URL via HTTP POST method. The URL format is as shown below,
    http://<servername>:<port number>/sdpapi/<module>
    Back to Questions
  2. How is the authentication carried out in Rest API?
    Authentication to the ServiceDesk Plus application is key based i.e., an API key is sent along with the URL for every operation. This key is technician based and can be generate for technicians with login privilege. The role given to the technician is also taken into consideration, so the key is valid only for the role given to the technician. Once the key is generated, the key is manually transferred to the integrated application so that the application can use the key for further API operations. If the key is invalid (key is expired or the technician login is disabled), then the operation fails and an error is propagated to the integrated application.
    Back to Questions
  3. How do I generate the API key?
    The authentication between ServiceDesk Plus and integrated application is through an API key. A unique key is generated for a technician with login permission in ServiceDesk Plus application.
    To generate the API Key, click Admin -> Technicians under User block.
    If you want to generate the API key to the existing technician, then click the edit icon beside the technician.
    If you want to generate the API key to a new technician, click Add New Technician link, enter the technician details and provide login permission.
    Click Generate link under the API key details block. You can select a time frame for the key to expire using the calendar icon or simply retain the same key perpetually.
    If a key is already generated for the technician, a Re-generate link appears.
    Back to Questions
  4. What are the operations supported by the Rest API?
    The REST API supports only request related operations such as,
    • Adding new request, editing, closing, deleting and viewing existing requests.
    • Adding new notes to a request, editing, deleting and viewing existing notes.
    • Adding work-log to a request, editing, deleting and viewing existing work-logs.
    Please refer to the link for attributes model for Rest API
    http://www.manageengine.com/products/service-desk/help/adminguide/api/rest-api.html
    Back to Questions
  5. What response would ServiceDesk Plus send back to the third-party tool that is using the REST API for the operation "ADD_REQUEST"?
    The application would send back the Request ID as an XML response.
    Back to Questions
  6. How do I perform the “Add_Notes” operation in REST API?To add notes via REST API, you just need to parse the default Notes fields that is already present in ServiceDesk Plus. You can find those fields under Admin -> API -> RESTAPI -> Notes.Back to Questions

Others

  1. Are there any sample VB Script code to add requests in ServiceDesk plus application?
    Please use the below code to add request using VB script:
    Dim
    fullUrl As String = My.Settings.ServiceDeskURL & "/servlets/RequestServlet"
    Dim oWeb As New System.Net.WebClient()
    Dim Params As New NameValueCollection()
    Params.Add(
    "operation", NewTicket.Operation)
    Params.Add(
    "priority", NewTicket.Priority)
    Params.Add(
    "subject", NewTicket.Subject)
    Params.Add(
    "description", NewTicket.Description)
    Params.Add(
    "category", NewTicket.Category)
    Params.Add(
    "username", NewTicket.Username)
    Params.Add(
    "logonDomainName", NewTicket.LogonDomainName)
    Params.Add(
    "password", NewTicket.Password)
    Params.Add(
    "mode", "System Generated")
    Dim responseArray As Byte() = oWeb.UploadValues(fullUrl, Params)
    MsgBox(System.Text.
    Encoding.ASCII.GetString(responseArray))