Summary:
List the configuration management settings of an object, and modify those settings.
URL:
http(s)://{server hostname}/api/objects/{swID}/configManagement
Methods summary
- GET Method - lists configuration management settings of the object.
- PUT Method - modifies configuration management attributes of the object.
GET Method detail
Lists configuration management settings of the object.
Response:
The list of configuration management settings of the object:
- NumberOfConfigsToArchive
- configMonitorRetrievalScript
- configMonitorPolicyRules
- ConfigRetrievalEnabled
- configMonitorTransferMethod
- SNMPChangeDetectionEnabled
- configMonitorExcludedDifference
- cliMethod
- cliUsername.
Every entry will follow the description below:
Name | Description |
---|---|
name |
value of “name” attribute of the device |
displayName |
value of “displayName” attribute of the device. |
userEditable |
if the attribute can be modified by the user. |
userOverriden |
if the attribute is set to polled or a user-defined value. |
values |
list of values for this attribute. |
Example:
INPUT
curl -u admin:admin https://localhost/api/objects/605/ports?includeVirtual=y&includeUnmanaged=y&media=json
OUTPUT
{
"items" : [ {
"portAttributes" : {
"compId" : {
"ids" : [ 1, 2, 1, 0 ],
"type" : 1,
"invalid" : false,
"root" : false,
"networkPath" : false,
"device" : false,
"port" : true,
"view" : false,
"dsObject" : false
},
"connectedHostIps" : "",
"connectedHostMacs" : "",
"connectedHostNames" : "",
"connectedHosts" : "",
"displayName" : " [ Vl1 ] Vlan1",
"ifDescr" : " [ Vl1 ] Vlan1",
"ifIndex" : "1",
"ifType" : "Prop. Virtual/Internal",
"ipAddresses" : "10.44.1.41",
"objectId" : 723,
"portAdminStatus" : "up",
"portAlias" : "",
"portDescr" : "Vlan1",
"portDuplex" : "Unknown",
"portInSpeed" : 0,
"portMac" : "00:19:06:d2:1e:c0",
"portOperationalStatus" : "up",
"portOutSpeed" : 0,
"portShortDescr" : "[ Vl1 ]",
"portSpare" : "No",
"portVipStatus" : " ",
"portVirtualIndicator" : "Virtual",
"statusEventsEnabled" : 0,
"statusFasterPolling" : 0,
"timeOfLastChange" : null,
"topoNodeState" : 292,
"typeDisplayName" : "Switch Device",
"typeName" : "portEx",
"utilFasterPolling" : 0,
"vlans" : ""
}
}, {
...removed for brevity...
}, {
"portAttributes" : {
"compId" : {
"ids" : [ 1, 2, 6, 0 ],
"type" : 1,
"invalid" : false,
"root" : false,
"networkPath" : false,
"device" : false,
"port" : true,
"view" : false,
"dsObject" : false
},
"connectedHostIps" : "",
"connectedHostMacs" : "",
"connectedHostNames" : "",
"connectedHosts" : "",
"displayName" : " [ Fa0/4 ] FastEthernet0/4",
"ifDescr" : " [ Fa0/4 ] FastEthernet0/4",
...removed for brevity...
}
}, {
...removed for brevity...
}, {
"portAttributes" : {
"compId" : {
"ids" : [ 1, 2, 18, 0 ],
"type" : 1,
"invalid" : false,
"root" : false,
"networkPath" : false,
"device" : false,
"port" : true,
"view" : false,
"dsObject" : false
},
"displayName" : " [ Fa0/16 ] FastEthernet0/16",
"objectId" : 18,
"typeName" : "UnmanagedPort"
}
} ],
"count" : 29
}
PUT Method detail
Modifies a single configuration management attribute of the device.
Request:
Name | Description |
---|---|
Name |
name of attribute that is to be modified. The only valid values are:
|
values |
list of values for this attribute |
Response:
An updated attribute:
“OK” if the method succeeded, an error description otherwise.
Examples:
INPUT
curl -u admin:admin https://localhost/api/objects/611/configManagement?media=json -X PUT -H "content-type:application/json" -d \
'{
"name" : "cliMethod",
"values" : [ "ssh" ]
}'
OUTPUT
{
"message" : "OK"
}
INPUT
curl -u admin:admin https://localhost/api/objects/611/configManagement?media=xml -X PUT -H "content-type:application/xml" -d \
'<objectAttribute>
<name>cliMethod</name>
<value>ssh</value>
</objectAttribute>'
OUTPUT
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<statusInfo>
<message>OK</message>
</statusInfo
Comments
0 comments
Please sign in to leave a comment.