Getting Started (For On-Premises)

Patch Manager Plus now facilitates easy integration with your existing infrastructure using REST APIs. You can perform various patching 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.0 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 GET request in the following format to the authentication API.

GET /api/1.3/desktop/authentication

?username=<Username>
&password=<Password base64 encoded>
&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>
      

Generating Base64 encoded password

It is always recommended to generate Base64 encoded password by using Window btoa() method using the steps given below.

  1. Open your browser console, type window.btoa('Password') and press enter.
  2. Now use the obtained Base64 encoded password to generate the auth token.

2. Obtain Auth Token from the response

 
{
"message_response": {
"summary": {
"installation_status_summary": {
"total": 10,
"yet_to_install": 2,
"installed": 3,
"uninstallation_failed": 0,
"uninstalled": 2,
"installation_failed": 3
},
"last_contact_time_summary": {
"4_day_to_7_day": 0,
"16_day_to_30_day": 0,
"greater_30_day": 0,
"8_day_to_15_day": 0,
"equal_3_day": 0
}
}
},
"status": "success",
"message_version": "1.0",
"message_type": "summary"
}

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

- Patch Manager Plus - Cloud

- Patch Manager Plus Cloud - Self-Client