Setting Up Custom Management Features

Home Support Custom API for Enterprise Subscription Setting Up Custom Management Features

The ITmanager.net API is composed of 2 separate systems. The Management API and the Monitoring API.

Management API

The purpose of the management API is to allow customers to integrate their own custom management features into the ITmanager.net product.  Many features are too small for us to integrate ourselves and could be developed either by a customer themselves, or by a 3rd party who wants to enable remote management of their products using the ITmanager.net app.  Eventually we would love to have an app store of 3rd party integrations.

 

Adding a custom API

To add a custom API:

  1. Select the Add button in the Services tab of ITmanager.net
  2. Select Custom

Note: If not subscribed to the proper plan the error “You must subscribe to the Enterprise Plan to use this feature” will occur.

The Add screen includes the following fields:

  • Display Name
  • API URL  (required)
  • Authentication
  • Private Network

 

GET URL Requests

When the application performs a GET on the API URL, the API will return a json object representing the screen to be displayed. The format of the json object is:

{

“title”: ”the title, only required field”,

“subtitle”: “optional subtitle”,

“icon”: “url of icon 88×88”,

“url”: “url to load this object”,

“search”:true,

“moreurl”:”?start=100”

“fields”: [

{

“name”: ”the name of the field”,

“datatype”: “int,string,email,url,checkbox,list”

“value”: “textvalue”, int, bool

“items”: [“item1”, “item2”],

“editable”: true,

“secure”: false,

“required”: false,

“refresh”:true,

“hint”: “description”,

“regex”:””,

“regexerror”:”You must enter a valid email address”

}

],

“items”: [

// array of objects to show in a list

{

“title”:”the item title”,

“icon”:”the icon of the item”

}

],

“actions”:[

{

“name”:”name of the action”,

“url”:”url the action be sent to”,

“method”: “post,get or delete”,

“status”: “Saving…”,

“confirm”:”Are you sure?”,

“type”:”default,submit,input,password”

“input”:”Please enter a new name:”

}

],

“itemactions”:[

{

“name”:”Delete item”.

“confirm”:”Are you sure you want to delete <title>?”,

“params”:”delete=true”

}

]

}

 

Authentication

Choosing to add saved authentication to a custom API will ensure that all requests will include an Authorization headers with credentials in the Basic format.  Entering “Ask every time”, allows the API to choose to send back a 401 http code to prompt the user.

 

URL Formats

The following url formats are allowed:

  1. Absolute URL’s  (http:// , https://)
  2. Relative URL’s
  3. telnet://  , ssh://, rdp://, vnc://

 

Form Submissions

Clicking on an action with the value “type”:””submit” will cause the application to submit all the editable fields to the server using the specified URL.  The fields are URL Encoded in the POST body as content-type = “application/x-www-form-urlencoded”. If the method of the action is “GET” then the form is sent as query parameters.

 

Action HTTP Responses

An action responding with a 200 was successful, the object is refreshed, and if a previous list contains the object then the object in the list is also refreshed.  An action returning an error code will show the HTTP status message to the user.

The Action Post (as well as Form Submission) can return a document like this as well:

{

“message”: “A confirmation message to show to the user.”,

“refresh”: true,

“close”: true

}

 

Monitoring API

The purpose of the monitoring API  is to allow users to create their own monitoring data sources, beyond the currently supported SNMP APIs. This is achieved through using an HTTP API.

 

Adding a custom API

  1. Using the Monitoring tab, click the Add menu
  2. Select Custom
  3. If the user is not an Enterprise Tier subscriber, an error will occur

 

The Add Custom monitor screen will have the following fields:

  • Display Name
  • URL
  • Private Network

 

GET URL Requests

The monitoring system will perform a GET on the URL every 60 seconds.   The URL will return the following json format:

{

“success”: true,

“value”: 200,

“error”:”message”

}

 

Still have questions?

Send us an email: support@itmanager.net