Add Edit Controller
API EndPoint : addEditController
This API is used to add a new controller or edit an existing one.
HTTP Method
POST
API URL
http://localhost:8060/api/json/ncmcontrollers/addEditController?apiKey=********&controllerId=10&isEdit=true&protocol=https&ipAddress=192.168.1.100&port=443&controllerTemplate=FORTI_MANAGER&credentialMap=[{name:username,value:admin},{name:password,value:fortiSecret}]&description=Forti%20Manager%20Controller%20edit
Parameters
| Param Name | Description | Data Type | Regex | Is Mandatory |
|---|---|---|---|---|
| apiKey | API Key to access your server. | - | - | Yes |
| controllerId | An unique identifier of the controller that is being edited. This parameter is used only while editing the controller and must be skipped while adding a new controller. ncmcontrollers/listControllers API can be used to check the Controller ID |
long | - | No |
| isEdit | A boolean parameter to mention whether the operation being performed is an add operation or edit operation | boolean | - | No |
| protocol | Specifies the protocol that will be used to communicate with the controller. Allowed values are http and https | - | ^(http|https)$ | No |
| ipAddress | IP Address or Hostname of the Controller | - | ^([p{L}p{N}P{InBasicLatin}s.:-_])+$ | yes |
| port | Specifies any specific port on which the controller can be connected. | int | - | No |
| controllerTemplate | Template of the controller which specifies the Vendor and also helps NCM determine the process to login and communicate with the controller. At the time of this documentation, NCM supports 2 controllers (Arista CVP and Forti Manager) | - | ^(ARISTA_CVP|FORTI_MANAGER)$ | yes |
| credentialMap | A JSON Array of JSON Object with credential details. Each object in the array will contains the name and value of the credential parameter | JSONArray | - | yes |
| description | A short Description for the Controller | - | ^([p{L}p{N}P{InBasicLatin}.!:#$s-_',])+$ | No |
Sample Response
HTTP Code: 200
{"statusMsg":"Device Added Successfully","isSuccess":true}