10.5 API - How APIs can be used in the version 10.5 and above ?

10.5 API - How APIs can be used in the version 10.5 and above ?

Introduction:

REST API acts as a bridge between ServiceDesk Plus MSP and other applications. The communication of information happens via HTTP Request. The REST API authenticates users using Technician Key, thus eliminating the need for the users to separately log into ServiceDesk Plus MSP to carry out the required operations. The operations performed using REST API are based on the HTTP Method, through which the requests are sent.

API Testing:

API syntaxes for various operations are available and can be tested from within the MSP application itself from version 10.5 with an Administrator login (SDAdmin role).
This can be achieved from Admin->API->Documentation. Same Input data can be used from a different application (that supports REST API) to perform an operation.

How to get the same in a URL form when you want to test it in POSTMAN or other reporting tools such as POWER BI ?

1. Copy the URL that is given under Sample Request URL under Admin->API->Documentation->Select any operation from the left pane.



2. Include the below syntax to the URL obtained.
/?TECHNICIAN_KEY=A1B2C3D4-1AA9-45B1-94BA-97ADB6ACAE70&format=json&INPUT_DATA=

3. Generate and use the right Technician Key in the URL next to the TECHNICIAN_KEY= syntax. API Key can be generated from Profile option->API Generation key from the right top when logged in. Preferably Admin login for complete permission.



4. Input data given needs to be encoded before including it in the URL. Data encoding is mandatory in version 10.5. Copy the parameters from Input Data from documentation section and you can use any online encoder to encode the same.





5. Include the encoded input data in the URL. So, the URL finally looks like below,

http://<servername>:<port>/sdpapi/request/?TECHNICIAN_KEY=A1B2C3D4-1AA9-45B1-94BA-97ADB6ACAE70&format=json&INPUT_DATA=%7B%0A%20%20%20%20%22operation%22%3A%20%7B%0A%20%20%20%20%20%20%20%20%22details%22%3A%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%22from%22%3A%20%220%22%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%22limit%22%3A%20%2250%22%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%22filterby%22%3A%20%22All_Requests%22%2C%0A%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%7D%0A%7D


          • Related Articles

          • Add request API Using Postman

            You need to send the technician_key and format in Params and the data in Body. Also, you have to encode the body and send it.  Please refer to the below for your reference which is sent using postman. Example : ...
          • Close a request using API - Postman example

            INPUT_DATA Value as follows {"operation": {"details": { "closeAccepted": "Accepted", "closeComment": "The closing comment" }}} PUT API example ...
          • API to GET Requests in POSTMAN when trying to input data

            When you're using GET method and trying to input data, the JSON data has to be encoded like below: %7B%22operation%22%3A%7B%22details%22%3A%7B%22from%22%3A%220%22%2C%22limit%22%3A%2250%22%2C%22filterby%22%3A%22All_Requests%22%7D%7D%7D The same can be ...
          • Update - CMDB API - using criteria through postman

            Params :  Body - form-data  - Refer to Input_data values from our API documentation in the application (Admin -> API - Documentation) -> CMDP - Update CI {"mode":"full","isActive":false}
          • API to get request based on date criteria like today , last 30 days

            {   "list_info": {     "row_count": 20,     "start_index": 1,     "sort_field": "subject",     "sort_order": "asc",     "get_total_count": true,     "search_criteria": [       {         "field": "last_updated_time",         "condition": "between",   ...