Summary:
Lists the ports on an object.
URL:
http(s)://{server hostname}/api/objects/{swID}/ports?includeVirtual=BOOL&includeUnmanaged=BOOL
Methods summary
- GET Method - lists ports on the object.
GET Method detail
This method accepts one of two boolean parameters:
- one that equals "yes", "true", "y", "t" or "1". This is treated as 'true'.
- one that equals any other value, or the absence of a value. This is treated as 'false'.
includeVirtual – controls whether virtual ports should be included in results.
includeUnmanaged – controls whether data for unmanaged ports should be included.
Response:
The list of attributes, with entries according to the following format:
Name | Description |
---|---|
objectId | StormWorks ID of the associated object. |
typeName |
type of the associated object. |
displayName |
display name. |
displayType |
display type. |
hasServiceStatus |
if object has a service status. |
Examples:
INPUT
curl -u admin:admin https://localhost/api/objects/655/ports?includeVirtual=yes&includeUnmanaged=yes&media=json
OUTPUT
{
"items": [ {
"portAttributes": {
"compId": {
"ids": [ 1, 2, 1, 0 ],
"type": 1,
"invalid": false,
"port": true,
"networkPath": false,
"device": false,
"root": false,
"dsObject": false,
"view": false
},
"connectedHostIps": "",
"connectedHostMacs": "",
"connectedHostNames": "",
"connectedHosts": "",
"displayName": " [ Gi0/0 ] to 10.44 lan",
"ifDescr": " [ Gi0/0 ] to 10.44 lan",
"ifIndex": "1",
"ifType": "Ethernet",
"ipAddresses": "10.44.1.59",
"objectId": 691,
"portAdminStatus": "up",
"portAlias": "to 10.44 lan",
"portDescr": "GigabitEthernet0/0",
"portDuplex": "Full Duplex",
"portInSpeed": 100000000,
"portMac": "00:07:0e:34:f4:00",
"portOperationalStatus": "up",
"portOutSpeed": 100000000,
"portShortDescr": "[ Gi0/0 ]",
"portSpare": "No",
"portVipStatus": "Router",
"portVirtualIndicator": "Physical",
"statusEventsEnabled": 1,
"statusFasterPolling": 0,
"timeOfLastChange": 1458210600,
"topoNodeState": 0,
"typeDisplayName": "Router Device",
"typeName": "portEx",
"utilFasterPolling": 0,
"vlans": ""
}
}, {
...removed for brevity...
}, {
"portAttributes": {
"compId": {
"ids": [
1,
2,
12,
0
],
"type": 1,
"invalid": false,
"port": true,
"networkPath": false,
"device": false,
"root": false,
"dsObject": false,
"view": false
},
"connectedHostIps": "",
"connectedHostMacs": "",
"connectedHostNames": "",
"connectedHosts": "",
"displayName": " [ Se0/1/0 ] Serial0/1/0-mpls layer",
...removed for brevity...
"typeDisplayName": "Router Device",
"typeName": "portEx",
"utilFasterPolling": 0,
"vlans": ""
}
} ],
"count": 8
}
INPUT
curl -u admin:admin https://localhost/api/objects/655/ports?includeVirtual=yes&includeUnmanaged=yes&media=xml
OUTPUT
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<items count="8">
<item xsi:type="devicePortInfo" xmlns:xsi="https://www.w3.org/2001/XMLSchema-instance">
<portAttributes>
<compId>
<ids>
<ids>1</ids>
<ids>2</ids>
<ids>1</ids>
<ids>0</ids>
</ids>
</compId>
<connectedHostIps></connectedHostIps>
<connectedHostMacs></connectedHostMacs>
<connectedHostNames></connectedHostNames>
<connectedHosts></connectedHosts>
<displayName> [ Gi0/0 ] to 10.44 lan</displayName>
<ifDescr> [ Gi0/0 ] to 10.44 lan</ifDescr>
<ifIndex>1</ifIndex>
<ifType>Ethernet</ifType>
<ipAddresses>10.44.1.59</ipAddresses>
<objectId>691</objectId>
<portAdminStatus>up</portAdminStatus>
<portAlias>to 10.44 lan</portAlias>
<portDescr>GigabitEthernet0/0</portDescr>
<portDuplex>Full Duplex</portDuplex>
<portInSpeed>100000000</portInSpeed>
<portMac>00:07:0e:34:f4:00</portMac>
<portOperationalStatus>up</portOperationalStatus>
<portOutSpeed>100000000</portOutSpeed>
<portShortDescr>[ Gi0/0 ]</portShortDescr>
<portSpare>No</portSpare>
<portVipStatus>Router</portVipStatus>
<portVirtualIndicator>Physical</portVirtualIndicator>
<statusEventsEnabled>1</statusEventsEnabled>
<statusFasterPolling>0</statusFasterPolling>
<timeOfLastChange>1458210600</timeOfLastChange>
<topoNodeState>0</topoNodeState>
<typeDisplayName>Router Device</typeDisplayName>
<typeName>portEx</typeName>
<utilFasterPolling>0</utilFasterPolling>
<vlans></vlans>
</portAttributes>
</item>
...removed for brevity...
<item xsi:type="devicePortInfo" xmlns:xsi="https://www.w3.org/2001/XMLSchema-instance">
<portAttributes>
<compId>
<ids>
<ids>1</ids>
<ids>2</ids>
<ids>12</ids>
<ids>0</ids>
</ids>
</compId>
<connectedHostIps></connectedHostIps>
<connectedHostMacs></connectedHostMacs>
<connectedHostNames></connectedHostNames>
<connectedHosts></connectedHosts>
<displayName> [ Se0/1/0 ] Serial0/1/0-mpls layer</displayName>
...removed for brevity...
<typeDisplayName>Router Device</typeDisplayName>
<typeName>portEx</typeName>
<utilFasterPolling>0</utilFasterPolling>
<vlans></vlans>
</portAttributes>
</item>
</items>
Comments
0 comments
Please sign in to leave a comment.