Getting Started

ManageEngine Endpoint Central MSP now facilitates easy integration with your existing infrastructure using REST APIs. You can perform various desktop management activities easily from a single console.You can find the list of modules for which APIs are available in the side bar, if you need more APIs you can contact us with your requirement.

This document describes prerequisites for using the API.

API - URI Structure

All API URI must be structured in the following format,

<Server URL>/api/{Version}/{Entity}/{Operation|Action}/<Resource>/<Filter>/<Page tags>/<Search tags>
  • Tags
  • Optional/Mandatory
  • Description
  • Usage
  • Version
  • Mandatory
  • API Version
  • 1.3 ie current API Version
  • Entity
  • Mandatory
  • The module for API
  • e.g. inventory, som, desktop
  • Operation or Action
  • Mandatory
  • Operation or action in the module
  • e.g. computers, computers/installagents
  • Resource
  • Optional
  • Resource ID for the operation
  • e.g. resid={resourceID}
  • Page tags
  • Optional
  • Page to fetch, and number of objects per page
  • page={page}&pagelimit={PageLimit}

    e.g:
    page=1&pagelimit=50

    Requests for first 50 objects.
  • Search tags
  • Optional
  • Results with specified column matching search string
  • searchtype={resources}&searchcolumn={columnname}&searchvalue={searchvalue}

    e.g.:
    searchtype=domain_name&searchcolumn=domain_name&searchvalue=Zohocorp

    Currently the api requires searchtype to be set same as searchcolumn value.

Authentication

Auth token is required for accessing our API. To obtain auth token follow these steps.

Authentication API Endpoint

/api/1.3/desktop/authentication

1(a). Generate Token through local authentication

Send POST request with HTTP header Content-Type:application/json and following JSON in request body to the authentication API.

 { 
"username":"Username",
"password":"base 64 encoded password",
"auth_type":"local_authentication"
}

1(b). Generate Token through AD Authentication

Domain Names can be fetched fetched from server discover api. Send GET request in the following format to the authentication API.

GET 

/api/1.3/desktop/authentication

?username=<Username>

&password=<Password base64 encoded>

&auth_type=ad_authentication

&domainName=<Domain name>
      

2. Obtain Auth Token from the response

{     "message_response": {         "authentication": {             "user_data": {                 "user_name": "admin",                 "phone_number": null,                 "email": "",                 "auth_type": "Local Authentication",                 "user_id": 1             },             "user_permissions": {                 "admin": ["SOM_Admin", ],                 "write": ["SOM_Write", "Tools_Write"],                 "read": ["SOM_Read", "Tools_Read"]             },             "auth_data": {                 "auth_token": "B42550F3-006D-48EB-8011-F6C7D6323EE7"             }         }     },     "status": "success",     "message_version": "1.3",     "message_type": "authentication" }

3. Set Auth Token to request header

Set the authtoken from to Authorization HTTP header for all requests.

For a token B42550F3-006D-48EB-8011-F6C7D6323EE7 set header as

Authorization:B42550F3-006D-48EB-8011-F6C7D6323EE7

Two factor Authentication

If two factor authentication is enabled, perform the following steps to obtain auth token:

  1. While making a request for Authentication API Endpoint, instead of receiving the above-specified response, the following response will be obtained -
    {
        "message_type": "authentication",
        "message_response": {
            "authentication": {
                "two_factor_data": {
                    "unique_userID": "admin85424",
                    "is_TwoFactor_Enabled": true,
                    "message": "Google authentication already created for this user. Validate OTP",
                    "remember_token_days": 1,
                    "OTP_Validation_Required": true
                }
            }
        },
        "message_version": "1.0",
        "status": "success"
    }
    
  2. You will have to make use of the Unique User ID from this response and make the following request:
    POST api/1.3/desktop/authentication/otpValidate
    
    { 
     "uid":"admin85424", 
     "otp":"761666",
     "rememberme_enabled":"true"
    }   
    
  3. The OTP specified here will be generated either via the Authenticator app you are using or the registered mail address, depending on the mode of authentication enabled for two factor authentication.
  4. Upon execution, the auth token will be generated.
    { "message_type": "authentication", "message_response": {"authentication": { "user_permissions": { "read": ["Common_Read","SOM_Read", "Tools_Read"], "admin": ["Common_Admin","SOM_Admin","Tools_Admin" ], "write": [ "Common_Write","SOM_Write","Tools_Write"] },"user_data": { "auth_type": "Local Authentication", "user_id": 1, "user_name": "admin", "phone_number": null, "email": "" }, "auth_data": { "auth_token": "B42550F3-006D-48EB-8011-F6C7D6323EE7"} } }, "message_version": "1.0", "status": "success" } 

Customer Information

Customer ID is required for accessing our API. To obtain customer ID, follow these steps.

Customer Information API URI

/api/1.3/desktop/customers

2. Obtain customer information from the response

{     "message_type": "customers",     "message_response": {         "customers": [             {                 "updated_time": 1653023933690,                 "country": "--",                 "added_time": 1652082812033,                 "city": "--",                 "customer_logo_path": "..\\webapps\\DesktopCentral\\client-data\\1\\customer-data\\logo\\customer-logo.png",                 "description": "--",                 "is_custom_logo_enable": false,                 "web_url": "--",                 "street": "--",                 "postalcode": "--",                 "customer_email": "mail@mail.com",                 "company_name": "--",                 "door_no": "--",                 "customer_name": "Customer A",                 "state": "--",                 "landline": "",                 "customer_id": 1,                 "landmark": "--",                 "fax": ""             }         ]     },     "message_version": "1.3",     "status": "success" } 

 

3. Set customer ID to API request

Set the customer ID in all the requests, to access any API in Endpoint Central MSP.