HP Intelligent Management Center Extended API Guide Abstract This manual provides detailed information about the HP Intelligent Management Center Extended API (eAPI), which enables users to customize their installation of IMC. It is designed for network administrators and programmers experienced with Java development environments and XML. The information presented in this manual was up-to-date at publication time. The most current collection of IMC eAPI help and support files is available at http://www.hp.
© Copyright 2012, Hewlett-Packard Development Company, L.P. Confidential computer software. Valid license from HP required for possession, use or copying. Consistent with FAR 12.211 and 12.212, Commercial Computer Software, Computer Software Documentation, and Technical Data for Commercial Items are licensed to the U.S. Government under vendor's standard commercial license. The information contained herein is subject to change without notice.
Contents 1 Quick Start..............................................................................................22 Welcome to iMC RESTful Web Services ....................................................................................22 The First iMC-RS Client............................................................................................................22 Preparations......................................................................................................................
Example...........................................................................................................................40 Modify Operators...................................................................................................................41 Interface URI.....................................................................................................................41 Access Method...................................................................................................
Access Method..................................................................................................................65 Returned Result..................................................................................................................65 Example...........................................................................................................................66 Query Vendor Information List........................................................................................
Returned Result..................................................................................................................87 Example...........................................................................................................................87 Modify Device Label...............................................................................................................88 Interface URI.....................................................................................................
Returned Result................................................................................................................110 Example.........................................................................................................................111 Modify Service Monitoring Information....................................................................................112 Interface URI...............................................................................................................
Interface URI...................................................................................................................131 Access Method................................................................................................................131 Returned Result................................................................................................................131 Example.................................................................................................................
Interface URI...................................................................................................................151 Access Method................................................................................................................151 Returned Result................................................................................................................151 Example.................................................................................................................
Interface URI...................................................................................................................173 Access Method................................................................................................................173 Returned Result................................................................................................................173 Example.................................................................................................................
Returned Result................................................................................................................197 Example.........................................................................................................................197 Delete User Additional Information Definition...........................................................................198 Interface URI................................................................................................................
Modify IP Segment...............................................................................................................225 Interface URI...................................................................................................................225 Access Method................................................................................................................225 Returned Result........................................................................................................
Example 2......................................................................................................................246 Modify Terminal Access Binding.............................................................................................247 Interface URI...................................................................................................................247 Access Method.............................................................................................................
Returned Result................................................................................................................266 Example.........................................................................................................................267 Add IP-to-MAC Address Binding.............................................................................................268 Interface URI..............................................................................................................
Interface URI...................................................................................................................291 Access Method................................................................................................................291 Returned Result................................................................................................................291 Example.................................................................................................................
Access Method................................................................................................................310 Returned Result................................................................................................................310 Example.........................................................................................................................310 Register Send-Alarm-to-Server Event.....................................................................................
Example.........................................................................................................................332 Query Single-Index Multi-Device Performance Summary Data.....................................................333 Interface URI...................................................................................................................333 Access Method................................................................................................................
Interface URI...................................................................................................................356 Access Method................................................................................................................356 Returned Result................................................................................................................357 Example.................................................................................................................
Example.........................................................................................................................380 Query Hybrid Ports...............................................................................................................381 Interface URI...................................................................................................................381 Access Method......................................................................................................
Example.........................................................................................................................402 Delete VLAN Interface...........................................................................................................403 Interface URI...................................................................................................................403 Access Method.......................................................................................................
Access Method................................................................................................................429 Returned Result................................................................................................................430 Example.........................................................................................................................430 Delete ACL Time Range from a Device.....................................................................................
1 Quick Start This guide provides overview and reference information for the iMC extended API, a set of commands and support files that enables you to customize your iMC experience. Welcome to iMC RESTful Web Services iMC provides web services based on open service-oriented architecture (SOA). Web services are primarily implemented using these methods: REST, SOAP, and XML-RPC. Compared with the other two methods, the REST-style web services feature clearness and simplicity.
1. 2. 3. Enter "http://imc_host:port/imcrs/application.wadl" in the address bar of your browser (Firefox is recommended), where imc_host is the hostname or IP address of the iMC server, and port is the service port number (8080 by default). In the identity authentication dialog box that appears, enter "admin" as the username and password, and click OK. If the browser displays an XML document with "" as the root node, iMC-RS is ready for you to use.
The output indicates that you have successfully accessed the device query interface and get the first ten device entries in XML format. iMC-RS Security Mechanism The iMC-RS framework allows you to access iMC resources and services in secure mode. It features in the following: • Identity authentication: iMC-RS offers a simple and effective identify authentication mode called HTTP digest authentication (see RFC 2617).
operator must successfully log in to iMC with the new password, and then can pass iMC-RS authentication. • By default, an operator can use all RESTful services offered by iMC-RS, regardless of the operation rights restricted by the group to which the operator belongs. • An operator can access all iMC-RS resources, regardless of the access restrictions of the device and user groups. Once iMC is installed, you can directly access iMC-RS with "admin" as the username and password.
2 Client Access The IMC Extended API (eAPI) provides a number of Java test code examples based on common web services: • Apache Commons HTTP Client 3.x • Apache HTTP Client 4.x • SpringFramework 3.0 • Jersey Client • Android SDK These Java test code examples are located in the rest_en\manual\client folder in your eAPI package. Access iMC-RS Resources with Apache Commons HTTP Client 3.x For more information, see the Test Code Example: CommonsClientTest.java.
3 R&D References This section provides information about the following topics: • Interface categories • Real-time event registration and receipt • Conventions and constraints • Error codes • Frequently-asked questions (FAQ) Interface Categories The interfaces of the iMC-RS framework can be classified into two categories, one for accessing iMC resources, and the other for registering and receiving real-time events.
Notes: 1. The strings "imc_host" and "8080" represent the iMC server address and port number. The "type_code" string represents the message type of the registration. For more information about message types, see the related API references. 2. The "accept" message header defines the format of notification messages. The valid message formats include XML (application/xml) and JSON (application/json). 3.
1. 2. 3. Event messages are separated with a blank line. Once the server reads a blank line, it decides that it has read a complete event and should process the event. After complete processing the event, the server continues to read subsequent events. The server sends a heartbeat message "#HEART_BEAT" every minute, which can be ignored by the client The received events are represented in strings, which can be converted into class entities with JAXB or other libraries as needed.
HTTP methods The iMC-RS interfaces use GET, POST, PUT, and DELETE to query (or read), add, modify (or configure), and delete iMC resources. These HTTP methods comply with the recommendations in RESTful web services. In addition, you can query the methods supported by each URI with the OPTIONS method. The HEAD method is also supported, which is identical to GET except that the server returns the status code and message header only, but does not return a message body in the response.
• Prohibited or unauthorized operation of the user: 403 (Forbidden). • iMC server error: 500 (Internal Server Error). Check whether or not the iMC server works normally (for example, whether or not the web page can be normally accessed), or contact the technical support.
Table 1 Error codes and descriptions (continued) Query Parameters 2014 The device already exists. 2015 Unknown device. 2024 The device cannot be pinged. 2032 The number of devices exceeds the limit set in the license. 2033 Failed to obtain the limit of the device number from the license. 2038 Domain name resolution or reverse domain name resolution failure. 2041 The parent symbol has been deleted. 2046 The SNMP template has been deleted. 2047 The Telnet template has been deleted.
4 System Management This section provides eAPI commands that enable you to manage the users who can operate your IMC system.
Query All Operators Query and list all operators. Interface URI /plat/operator Access Method HTTP GET Parameters Query parameters start The position where the first returned record is located in the whole returned result. Integer type. Optional. The default value is 0. If a negative value is uploaded, the default value is used. size The total number of returned records. Integer type. Optional. The default value is 10. If a negative value is uploaded, the default value is used.
Message body 1 admin admin 0 Super administrator that has all privileges. . . .
Elements For meanings of the fields in the message body, see “Query All Operators” (page 34). Example Query and list all operators. Request GET http://imc_host:8080/imcrs/plat/operator accept: application/xml . . . Response HTTP/q.
Query Individual Operators Query an operator with certain ID. Interface URI /plat/operator/{id} Access Method HTTP GET Parameters Path parameters id Operator ID. Long integer type. Required. No default value. Returned Result Status codes • 200 (OK): Success. Message header HTTP/1.1 200 OK Message body 1 admin admin Super admin who has all the privileges.
Operator elements authType Authentication type. Integer type. 0: simple password authentication. 1: RADUIS authentication. 2:LDAP authentication. It is required when you add or modify an operator. password Operator password. String type. It is required when you add or modify an operator if the authentication type is 0. sessionTimeout Idle timeout. Integer type, in the range of 1 to 9999999. When you add or modify an operator without setting this parameter, the system parameter will take affect.
Example Query the operator whose ID is 1. Request GET http://imc_host:8080/imcrs/plat/operator/1 accept: application/xml . . . Response HTTP/1.1 200 OK Content-Type: application/html . . . 1 1 admin admin O Super administrator that has all privileges.
Add Operator Add an operator with specified information. Interface URI /plat/operator Access Method HTTP POST Message body cccc cccc 0 cccc 10 1 cccc 0 10.153.89.1 10.153.89.2 0 allow 10.153.89.1–10.153.89.
Example Add an operator. Request POST http://imic_host:8080/imcrs/plat/operator accept: application/xml Content-Type: application/xml; charset=UTF-8 . . . cccc cccc 0 cccc 10 1 cccc 0 10.153.89.1 10.153.89.2 e0 allow 10.
Modify Operators Modify an operator with certain ID. Interface URI /plat/operator/{id} Access Method HTTP PUT Parameters Path parameters id Operator ID. Long integer type. Required. No default value. Message body cccccc 1 20 2 cccccc 1 10.153.89.5 10.153.89.
Example Modify the operator whose ID is 2. Request PUT http://imc_host:8080/imcrs/plat/operator/2 accept: application/xml . . . cccccc 1 20 2 cccccc 1 10.153.89.5 10.153.89.6 0 allow 10.153.89.5–10.153.89.
Delete Operator Delete an operator with the specified ID. Make sure that the operator to be deleted is offline. Otherwise, the login operator will be unavailable. Interface URI /plat/operator/{id} Access Method HTTP DELETE Parameters Path parameters id Operator ID. Long integer type. Required. No default value. Returned Result Status codes • 204 (No Content): Success. • 410 (Gone): No data is found with the specified ID. • 409 (Conflict): Failure. See “Error Codes.” Message header HTTP/1.
Query Operator Groups Query and list operator groups. Interface URI /plat/operatorGroup Access Method HTTP GET Parameters Query parameters start The position where the first returned record is located in the whole returned result. Integer type. Optional. The default value is 0. If a negative value is uploaded, the default value is used. size The total number of returned records. Integer type. Optional. The default value is 10. If a negative value is uploaded, the default value is used.
Message body 1 Administrator group The group of operators that have the administrative rights. Administrator . . .
Elements For meanings of the fields in the message body, see “Query All Operators” (page 34). Example Query and list operator groups.
Query Operator Group Details Query detailed information about an operator group with the specified ID. Interface URI /plat/operatorGroup/{id} Access Method HTTP GET Path parameters id Operator ID. Long integer type. Required. No default value. Returned Result Status codes • 200 (OK): Success. Message header HTTP/1.1 200 OK Message body 1 Administrator group The group of operators that have the administrative rights.
operatorGroup sub-elements Long integer type. This element is required when you add or modify an operator group. operatePrivilegeList List of operator privileges. This element is optional when you add or modify an operator group. operatePrivilege Operator privilege. The id suboption represents the operator privilege ID. String type. Required. The desc suboption represents the privilege description. String type. Optional. The level suboption represents the privilege level.
Add Operator Group Add an operator group with specified information.
Example Add an operator group. Request POST http://imc_host:8080/imcrs/plat/operatorGroup accept: application/xml Content-Type: application/xml; charset+UTF-8 . . .
Modify Operator Group Modify an operator group with the specified ID. Interface URI /plat/operatorGroup/{id} Access Method HTTP PUT Parameters Path parameters id Operator ID. Long integer type. Required. No default value.
Example Modify the operator group with ID 4. Request PUT http://imc_host:8080/imcrs/plat/operatorGroup/4 accept: application/xml . . .
Delete Operator Group Delete an operator group with the specified ID. Interface URI /plat/operatorGroup/{id} Access Method HTTP DELETE Parameters Path parameters id Operator ID. Long integer type. Required. No default value. Returned Result Status codes • 204 (No Content): Success. • 410 (Gone): No data is found with the specified ID. • 409 (Conflict): Failure. See “Error Codes.” Message header HTTP/1.1 204 No Content . . . Example Delete the operator group with ID 4.
5 Network Resource Management This section provides eAPI commands that enable you to control your devices and other network resources.
• Query Automatically Discovered Devices • Query Device Interface Information • Query Interface Details • Bring Up an Interface • Shut Down an Interface • Query Custom View List • Query Custom View Information • Add Custom View • Modify Custom View • Delete Custom View • Query Interface Views • Query Interface View Information • Add Interface View • Modify Interface View • Delete Interface View • Query IP Views • Query IP View • Export Topology in Visio Format • Quer
Query Device Information List Query device information based on predefined criteria. Interface URI /plat/res/device Access Method HTTP GET Parameters Query parameter resPrivilegeFilter Filter resources by access right. Boolean type. Optional. The default value is false. category Device type. Integer type. Optional. No default value. Valid values can be obtained through SNMP Template Query Interfaces. label Device label. String type. Wildcards are supported. Optional. No default value.
Query parameter Boolean type. Optional. The default value is false. It is valid only when the orderBy parameter is specified. total Only records that match the sort criteria are returned. Boolean type. Optional. The default value is false. When the value is true, the start and size attributes are invalid, the returned message body is empty, and the Message Header field gives the records that match the sort criteria. Returned Result Status codes • 200 (OK): Success.
Query Device Information Query device basic information based on device ID. Besides device basic information, the method for accessing device extended information and access interface for device-related operations are also returned. Interface URI /plat/res/device/{id} Access Method HTTP GET Path parameter id Device ID. Long integer type. Required. No default value. Returned Result Status codes • 200 (OK): Success.
Message body 2 10.153.89.1. 255.255.255.0 1 Normal H3C Hangzhou H3C Technologies Co., Ltd. Hangzhou, China 1.3.6.1.4.1.25506.1.
device sub-elements String type. status Device status. Integer type. See “Device status description.” sysName System name. String type. contact Contact. String type. location Location. String type. sysOid sysOID. String type. runtime Running time. String type. lastPoll Last poll. String type, in the format of yyyy-MM-dd HH:mm:ss. loginType Login method. 0: None. 1: Telnet. 2: SSH. Integer type. sysDescription System description. String type. categoryId Device type ID. Integer type.
device sub-elements symbolId Device symbol ID. Integer type. symbolName Device symbol name. String type. symbolType Device symbol type. Integer type. symbolDesc Device symbol description. String type. symbolLevel Device symbol level. Integer type. parentId Device parent symbol ID. Integer type. typeName Device type name. String type. parentId Device parent symbol ID. Integer type. viewType View type. Integer type. iconFileName Icon corresponding to the symbol. String type.
device sub-elements vergeNet Edge subnet identifier. Integer type. phyName Physical name. String type. phyCreateTime Created at. String type. phyCreator Creator. String type. appendUnicode Attached unicode. String type. snmpTmpl SNMP template URI. String type. telnetTmpl Telnet template URI. String type. sshTmpl SSH template URI. String type. series Device Series URI. String type. model Device Model URI. String type. interfaces Device Interfaces URI. String type.
Response HTTP/1.1. 200 OK Content-Type: application/xml Link: ;rel=synchronize;op=”PUT” Link: ;rel=manage;op=”PUT” Link: 2 10.153.89.1. 255.255.255.
Query Device Types Query device types based on predefined criteria. Interface URI /plat/res/category Access Method HTTP GET Parameters Query parameter name Type name. String type. Wildcards are supported. Optional. No default value. start Location of the first returned record in the query result. Integer type. Optional. The default value is 0. If the input parameter is smaller than 0, the parameter is automatically changed to 0. size Total returned records. Integer type. Optional.
Message body 0 Router true . . . For the description on each field of the returned value, see the API document for Query Device Type. Example Query all device types.
Query Device Type Query device type based on device ID. Interface URI /plat/res/category/{id} Access Method HTTP GET Parameters Path parameter id Device type ID. Integer type. Required. No default value. Returned Result Status codes • 200 (OK): Success. Message body 0 Router true Element description deviceCategory sub-elements id Device type Id, which uniquely identifies a device type. Integer type.
Example Query device type with the ID 0. Request Get http://imc_host:8080/imcrs/plat/res/category/0 accept: application/xml . . . Response HTTP/1.1 200 OK Content-Type: application/xml . . .
Query Vendor Information List Query device vendor information list. Interface URI /plat/res/vendor Access Method HTTP GET Parameters Query parameter name Vendor name. String type. Wildcards are supported. Optional. No default value. start Location of the first returned record in the query result. Integer type. Optional. The default value is 0. If the input parameter is smaller than 0, the parameter is automatically changed to 0. size Total returned records. Integer type. Optional.
Message body 1 H3C true . . .
For the description on each field of the returned value, see the API document for Query Device Vendor Information. Example Query device vendor starting with H.
Query Vendor Information Query vendor information based on vendor ID. Interface URI /plat/res/vendor/{id} Access Method HTTP GET Parameters Query parameter id Device vendor ID. Integer type. Required. No default value. Status codes • 200 (OK): Success.
Example Query device vendor with the ID 1. Request GET http://imc_host:8080/imcrs/plat/res/vendor/1 accept: application/xml . . . Response HTTP/1.1 200 OK Content-Type: application/xml . . .
Query Device Series Information List Query device series information list based on predefined criteria. Interface URI /plat/res/series Access Method HTTP GET Parameters Query parameter seriesName Device series name. String type. Wildcards are supported. Optional. No default value. vendorName Vendor name. String type. Wildcard is supported. Optional. No default value. managedOnly Only devices managed by iMC can be found. Boolean type. Optional. The default value is false.
Returned Result Status codes • 200 (OK): Success. Message header If the total parameter is true, the Total field gives all the records that match the sort criteria. No message body is included. HTTP/1.1 200 OK Total: 41 Message body 1 H3C AR18–2x true . . .
Example Query the first 100 device series of H3C. Request GET http://imc_host:8080/imcrs/palt/res/series?vendorName=H3C&start=0&size=100 accept: application/xml . . . Response HTTP/1.1 200 OK Content-Type: application/xml . . .
Query Device Series Information Query device series information based on device ID. > Interface URI /plat/res/series/{id} Access Method HTTP GET Parameters Path parameter id Device series ID. Integer type. Required. No default value. Returned Result Status codes • 200 (OK): Success.
Example Query device series with the ID 1. Request GET http://imc_host:8080/imcrs/plat/res/series/1 accept: application/xml ... Response HTTP/1.1 200 OK Content-Type: application/xml ...
Query Device Model Information List Query device information based on predefined criteria. Interface URI /plat/res/model Access Method HTTP GET Parameters Query parameter name Model name. String type. Wildcards are supported. Optional. No default value. sysOid Model sysOID. String type. Wildcards are supported. Optional. No default value. vendor Vendor. Integer type. Optional. No default value. Valid values can be obtained through Vendor Query Interface. series Device series. Integer type.
Returned Result Status codes • 200 (OK): Success. Message header If the total parameter is true, the Total field gives all the records that match the sort criteria. No message body is included. HTTP/1.1 200 OK Total: 512 Message body 1 3Com OSR3720 1.3.6.1.4.1.43.1.16.4.2.34 true ...
Example Query device model information about all routers. Request GET http://imc_host:8080/imcrs/plat/res/model?category=0&start=0&size=1000 accept: application/xml ... Response HTTP/1.1 200 OK Content-Type: application/xml ... 1 3Com OSR3720 1.3.6.1.4.1.43.1.16.4.2.
Query Device Model Information Query device model based on device ID. Interface URI /plat/res/model/{id} Access Method HTTP GET Parameters Path parameter id Device model ID. Integer type. Required. No default value. Returned Result Status codes • 200 (OK): Success. Message body 1 3Com OSR3720 1.3.6.1.4.1.43.1.16.4.2.
deviceModel sub-elements String type. series Vendor information URI. Boolean type. category Device Type URI. String type. Example Query device model with the ID 1. Request GET http://imc_host:8080/imcrs/plat/res/model/1 accept: application/xml ... Response HTTP/1.1 200 OK Content-Type: application/xml ... 1 3Com OSR3720 1.3.6.1.4.1.43.1.16.4.2.
Add Device Add a device to iMC. Interface URI /plat/res/device Access Method HTTP POST Message body 192.168.1.100 1 true true false false 10 11 12 ...... ......
device sub-elements Boolean type. Optional. The default value is false. loopbackAsMgrIp Use the loopback address as the management IP address. Boolean type. Optional. The default value is false. snmpTmplId SNMP template ID. Integer type. Required. No default value. Valid values can be obtained through SNMP Template Query Interfaces. If both snmpTmplId and snmpParameter exist, snmpTmplId is preferred, and snmpParameter is omitted. telnetTmplId Telnet template ID. Integer type. Required.
Example Add a device with the IP address 192.168.1.100. Request POST http://imc_host:8080/imcrs/plat/res/device accept: application/xml Content-Type: application/xml; charset=UTF-8 ... 192.168.1.
Synchronize Device Synchronize a device based on device ID. Interface URI /plat/res/device/{id}/synchronize Access Method HTTP PUT Parameters Path parameter id Device ID. Long integer type. Required. No default value. Returned Result Status codes • 204 (No Content): Success. • 404 (Not Found): No data is found with the ID. • 409 (Conflict): Failure. See “Error Codes.” Message header HTTP/1.1 204 No Content ... Example Synchronize the device with the ID 2.
Manage Device Manage a device based on device ID. Interface URI /plat/res/device/{id}/manage Access Method HTTP PUT Parameters Path parameter id Device ID. Long integer type. Required. No default value. Returned Result Status codes • 204 (No Content): Success. • 404 (Not Found): No data is found with the ID. • 409 (Conflict): Failure. See “Error Codes.” Message header HTTP/1.1 204 No Content ... Example Manage the device with the ID 2.
Unmanage Device Unmanage a device based on device ID. Interface URI /plat/res/device/{id}/unmanage Access Method HTTP PUT Parameters Path parameter id Device ID. Long integer type. Required. No default value. Returned Result Status codes • 204 (No Content): Success. • 404 (Not Found): No data is found with the ID. • 409 (Conflict): Failure. See “Error Codes.” Message header HTTP/1.1 204 No Content ... Example Unmanage a device with the ID 2.
Delete Device Delete a device based on device ID. Interface URI /plat/res/device/{id}/delete Access Method HTTP DELETE Parameters Path parameter id Device ID. Long integer type. Required. No default value. Returned Result Status codes • 204 (No Content): Success. • 410 (Gone): The data with the specified ID does not exist. • 409 (Conflict): Failure. See “Error Codes.” Message header HTTP/1.1 204 No Content ... Example Delete a device with the ID 2.
Modify Device Label Modify device label based on device ID. Interface URI /plat/res/device/{id}/updateLabel Access Method HTTP PUT Parameters Path parameter id Device ID. Long integer type. Required. No default value. Message body Element description device sub-elements label Device label. String type. Optional. If the element does not exist, the value is not changed. If the element exists, the value cannot be null.
Example Change the device label for the device with the ID 2 to Dev Label2. Request PUT http://imc_host:8080/imcrs/plat/res/device/2/updateLabel accept: application/xml ... Response HTTP/1.1 204 No Content ...
Modify System Information Modify the system information for a device based on device ID. Interface URI /plat/res/device/{id}/updateSysGrpAttr Access Method HTTP PUT Parameters Path parameter id Device ID. Long integer type. Required. No default value. Message body H3C Hangzhou H3C Technologies Co., Ltd. Hangzhou, China Element description device sub-elements sysName System name. String type. Optional.
Example Change the system information for the device with the ID 10. Request PUT http://imc_host:8080/imcrs/plat/res/device/10/updateSysGrpAttr accept: application/xml ... H3Cx Hangzhou H3C Technologies Co., Ltd. Hangzhou, China Response HTTP/1.1 204 No Content ...
Modify Login Method Modify login method for a device based on device ID. Interface URI /plat/res/device/{id}/updateLoginType Access Method HTTP PUT Parameters Path parameter id Device ID. Long integer type. Required. No default value. Message body 2 Element description device sub-elements loginType Login method. 0: None. 1: Telnet. 2: SSH. Integer type. Optional. If the element does not exist, the value is not changed.
Example Change the login method for the device with the ID 10 to 2. Request PUT http://imc_host:8080/imcrs/plat/res/device/10/updateLoginType accept: application/xml ... 2 Response HTTP/1.1 204 No Content ...
Modify Device Group Modify a device group based on device ID and device group. Interface URI /plat/res/device/{id}/updateCategory Access Method HTTP PUT Parameters Path parameter id Device ID. Long integer type. Required. No default value. Message body 1 Element description device sub-elements categoryId Device type ID. Integer type. Optional. If the element does not exist, the value is not changed. If the element exists, the value cannot be null.
Example Change the device group for the device with the ID 1 to 1. Request PUT http://imc_host:8080/imcrs/plat/res/device/2/updateCategory accept: application/xml ... 1 Response HTTP/1.1 204 No Content ...
Modify SNMP Settings Modify SNMP settings for a device based on device ID. Interface URI /plat/res/device/{id}/updateSnmp Access Method HTTP PUT Parameters Path parameter id Device ID. Long integer type. Required. No default value.
snmpParameter sub-elements rwCommunity Read-write community string. String type. Optional. If the element does not exist, the value is not changed. If the element exists, the value cannot be null. timeout Timeout time. Long integer type. Optional. If the element does not exist, the value is not changed. If the element exists, the value cannot be null. retries Number of retries. Long integer type. Optional. If the element does not exist, the value is not changed.
Example Change the SNMP settings for the device with the ID 10. Request PUT http://imc_host:8080/imcrs/plat/res/device/10/updateSnmp accept: application/xml ... SNMPv1 public private 10 10 Response HTTP/1.1 204 No Content ...
Modify Telnet Settings Modify Telnet settings for a device based on device ID. Interface URI /plat/res/device/{id}/updateTelnet Access Method HTTP PUT Parameters Path parameter id Device ID. Long integer type. Required. No default value.
telnetParameter sub-elements userPassword Password. String type. Optional. If the element does not exist, the value is not changed. If the element exists, the value cannot be null. superPassword Super password. String type. Optional. If the element does not exist, the value is not changed. If the element exists, the value cannot be null. timeout Timeout time. Long integer type. Optional. If the element does not exist, the value is not changed. If the element exists, the value cannot be null.
Modify SSH Settings Modify SSH settings for a device based on device ID. Interface URI /plat/res/device/{id}/updateSsh Access Method HTTP PUT Parameters Path parameter id Device ID. Long integer type. Required. No default value.
sshParameter sub-elements String type. Optional. If the element does not exist, the value is not changed. If the element exists, the value cannot be null. port Port. Integer type. Optional. If the element does not exist, the value is not changed. If the element exists, the value cannot be null. timeout Timeout time. Integer type. Optional. If the element does not exist, the value is not changed. If the element exists, the value cannot be null. retries Number of retries. Integer type. Optional.
Example Change the SSH settings for the device with the ID 10. Request PUT http://imc_host:8080/imcrs/plat/res/device/10/updateSsh accept: application/xml ... 0 admin admin 22 5 5 Response HTTP/1.1 204 No Content ...
Modify Polling Interval Modify polling interval for a device based on device ID. Interface URI /plat/res/device/{id}/updatePollInterval Access Method HTTP PUT Parameters Path parameter id Device ID. Long integer type. Required. No default value. Message body 1800 100 Element description device sub-elements configPollTime Set polling interval. Integer type, in minutes. Optional.
Example Change the polling interval for the device with the ID 1 to 1. Request PUT http://imc_host:8080/imcrs/plat/res/device/10/updatePollInterval accept: application/xml ... 1800 100 Response HTTP/1.1 204 No Content ...
Modify Ping Parameters Modify ping parameters for a device based on device ID. Interface URI /plat/res/device/{id}/updatePingParam Access Method HTTP PUT Parameters Path parameter id Device ID. Long integer type. Required. No default value. Message body false Element description device sub-elements supportPing Support for the ping operation. Boolean type. Optional. If the element does not exist, the value is not changed.
Example Change the ping parameters for the device with the ID 10. The device does not support the ping operation. Request PUT http://imc_host:8080/imcrs/plat/res/device/10/updatePingParam accept: application/xml ... false Response HTTP/1.1 204 No Content ...
Modify Web Network Management Parameters Modify web network management settings for a device based on device ID. Interface URI /plat/res/device/{id}/updateWebMgrParam Access Method HTTP PUT Parameters Path parameter id Device ID. Long integer type. Required. No default value. Message body HTTP 80 Element description device sub-elements webMgrProtocol Protocol used by a lower-level network management String type. Optional.
Example Change the web network management parameters for the device with the ID 10. Request PUT http://imc_host:8080/imcrs/plat/res/device/10/updateWebMgrParam accept: application/xml ... HTTP 80 Response HTTP/1.1 204 No Content ...
Query Service Monitoring Information List Query device service monitoring information based on predefined criteria. Interface URI /plat/res/device/service Access Method HTTP GET Parameters Query parameter deviceId Device ID. Long integer type. Required. No default value. total Only records that match the sort criteria are returned. Boolean type. Optional. The default value is false.
Element description deviceService sub-elements deviceId Device ID. Long integer type. serviceBit Service bits. Integer type. name Name. String type. port Port. Integer type. type Type. 0: No monitoring. 1: TCP. 2: UDP. Integer type. status Service running status: 0: Not running. 1: Running. Integer type. Example Query service monitoring about the device with the ID 10. Request GET http://imc_host:8080/imcrs/plat/res/device/service?deviceId=10 accept: application/xml ... Response HTTP/1.
Modify Service Monitoring Information Modify service monitoring information for a device based on device ID. Interface URI /plat/res/device/service/{id} Access Method HTTP PUT Parameters Path parameter id Device ID. Long integer type. Required. No default value.
deviceService sub-elements Integer type. Required. No default value. monitor Monitor services. Boolean type. Optional. The default value is true. Returned Result Status codes • 204 (No Content): Success. • 404 (Not Found): No data is found with the ID. • 409 (Conflict): Failure. See “Error Codes.” Message header HTTP/1.1 204 No Content ... Example Change the service monitoring information for the device with the ID 10.
Ping Ping a device based on device ID. Interface URI /plat/res/device/{id}/ping Access Method HTTP GET Parameters Path parameter id Device ID. Long integer type. Required. No default value. Returned Result Status codes • 200 (OK): Success. Message body ping -l 32 -n 5 10.153.89.12 Pinging 10.153.89.12 with 32 bytes of data: Reply from 10.153.89.12: bytes=32 time=9ms TTL=251 Reply from 10.153.89.12: bytes=32 time=2ms TTL=251 Reply from 10.153.89.
Example Ping the device with the ID 10. Request GET http://imc_host:8080/imcrs/plat/device/10/ping accept: application/xml ... Response HTTP/1.1 200 OK Content-Type: application/xml ... ping -l 32 -n 5 10.153.89.12 Pinging 10.153.89.12 with 32 bytes of data: Reply from 10.153.89.12: bytes=32 time=9ms TTL=251 Reply from 10.153.89.12: bytes=32 time=2ms TTL=251 Reply from 10.153.89.12: bytes=32 time=2ms TTL=251 Reply from 10.153.89.12: bytes=32 time=2ms TTL=251 Reply from 10.153.89.
Tracert Tracert a device based on device ID. Interface URI /plat/res/device/{id}/tracert Access Method HTTP GET Parameters Path parameter id Device ID. Long integer type. Required. No default value. Returned Result Status codes • 200 (OK): Success. Message body tracert 10.153.89.12 Tracing route to 10.153.89.12 over a maximum of 30 hops 1 * * * Request timed out. 2 * * * Request timed out. 3 * * * Request timed out. 4 5 ms 9 ms 2 ms 10.153.89.12 Trace complete.
Example Tracert the device with the ID 10. Request GET http://imc_host:8080/imcrs/plat/device/10/tracert accept: application/xml ... Response HTTP/1.1 200 OK Content-Type: application/xml ... tracert 10.153.89.12 Tracing route to 10.153.89.12 over a maximum of 30 hops 1 * * * Request timed out. 2 * * * Request timed out. 3 * * * Request timed out. 4 5 ms 9 ms 2 ms 10.153.89.12 Trace complete.
Query Links Query device links based on predefined criteria. Interface URI /plat/res/link Access Method HTTP GET Parameters Query parameter topoId Topology ID, or custom view ID. See the API document in Query Custom Views. Long integer type. Required. No default value. total Only records that match the sort criteria are returned. Boolean type. Optional. The default value is false.
Example Query device links with the topology ID 1027. Request GET http://imc_host:8080/imcrs/plat/res/link?topoId=1027 accept: application/xml ... Response HTTP/1.1 200 OK Content-Type: application/xml ... 80 0 1092 Ethernet1/0/2 1029 GigabitEthernet4/0/15 1 100000000 ...
Query Link Information Query device link information based on topology and link ID. Interface URI /plat/res/link/{id} Access Method HTTP GET Path parameter Path parameter id Link ID. Long integer type. Required. No default value. Query parameter Query parameter topoId Topology ID, or view ID. To obtain it, query the view list. Long integer type. Required. No default value. Returned Result Status codes • 200 (OK): Success. Message header HTTP/1.
deviceLink sub-elements Long integer type. type Link type. Integer type. leftSymbolId Link left node ID. Long integer type. leftIfDesc Link left interface description. String type. rightSymbolId Link right node ID. Long integer type. rightIfDesc Link right interface description. String type status Link state. 0: Unknown. 1: Normal. 2: Down. 3: Urgent. 4: Important. 5: Minor. 6: Warning. 7: Event. 8: Virtual. Integer type. bandWidth Link bandwidth. String type.
Start Automatic Discovery This function helps you discover manageable devices and add them to the network management system. Automatic discovery can be in simple or advanced mode. Interface URI /plat/res/autodiscover/start Access Method HTTP POST Message body 0 10.153.88.20 10.153.88.30 true Element description autoDiscoverConfig sub-elements mode Automatic discovery modes.
autoDiscoverConfig sub-elements telnetParameter Telnet parameters. For Telnet parameters, see Telnet Parameter Description. Optional. No default value. If both telnetTmplId and telnetParameter exist, telnetTmplId is preferred, and telnetParameter is omitted. sshParameter SSH parameters. For SSH parameters, see SSH Parameter Description. Optional. No default value. If both sshTmplId and sshParameter exist, sshTmplId is preferred, and sshParameter is omitted. snmpTmplId SNMP template ID. Integer type.
Example 2 Use the routing mode to automatically discover devices. Request POST http://imc_host:8080/imcrs/plat/res/autodiscover/start accept: application/xml Content-Type: application/xml; charset=UTF-8 ... 1 2 false true false true 10.153.89.199 Response HTTP/1.
Stop Automatic Discovery Stop automatic discovery. Interface URI /plat/res/autodiscover/stop Access Method HTTP GET Parameters None Returned Result Status codes • 200 (OK): Success. Message body If the operation succeeds, the message body is returned. 4 Element description See “Query Automatic Discovery Status.” Example Stop the running automatic discovery.
Query Automatic Discovery Status Query automatic discovery status. Interface URI /plat/res/autodiscover/status Access Method HTTP GET Parameters None Returned Result Status codes • 200 (OK): Success. Message body 1 Element description autoDiscoverStatus sub-elements status Automatic discovery status. 1: Stopped. 2: Running. 3: Periodic automatic discovery is running (not supported). 4: Stopping. Integer type.
Query Automatic Device Discovery Results Query automatic device discovery results. Interface URI /plat/res/autodiscover/result Access Method HTTP GET Parameters None Returned Result Status codes • 200 (OK): Success. Message body 3 4 Automatic discovery has finished. finished Six devices have been discovered, where five are SNMP devices, and one is an ICMP device.
Example Query automatic device discovery results. Request GET http://imc_host:8080/imcrs/plat/res/autodiscover/result accept: application/xml ... Response HTTP/1.1 200 OK Content-Type: application/xml ... 3 4 Automatic discovery has finished. finished Six devices have been discovered, where five are SNMP devices, and one is an ICMP device. 0 devices are added.
Query Automatically Discovered Devices Query automatically discovered devices. Interface URI /plat/res/autodiscover Access Method HTTP GET Parameters None Returned Result Status codes • 200 (OK): Success. Message body 2011-07-01 10:59:42 106 10.153.89.3 MyDev.
Example Query automatically discovered devices. Request GET http://imc_host:8080/imcrs/plat/res/autodiscover accept: application/xml ... Response HTTP/1.1 200 OK Content-Type: application/xml ... 2011-07-01 10:59:42 106 10.153.89.3 MyDev.
Query Device Interface Information Query device interface information based on predefined criteria. Interface URI /plat/res/device/{deviceId}/interface Access Method HTTP GET Path parameter Path parameter deviceId Device ID. Long integer type. Required. No default value. Query parameters Query parameter start Location of the first returned record in the query result. Integer type. Optional. The default value is 0. If the input parameter is smaller than 0, the default value 0 is used.
Message body 2 6 ETHERNETCSMACD GigabitEthernet1/1 1 Up 2 Down 1000000000 -1 00:12:00:40:a2:c0 1500 0 days 0 hours 0 minutes 35 seconds 100 millisecon
Query Interface Details Query interface details based on interface index and device ID. Interface URI /plat/res/device/{deviceId}/interface/{ifIndex} Access Method HTTP GET Parameters Path parameter deviceId Device ID. Long integer type. Required. No default value. ifIndex Interface index. Long integer type. Required. No default value. Returned Result Status codes • 200 (OK): Success. Message header HTTP/1.
Element description interface sub-elements ifIndex Interface index. Long integer type. ifType Interface type. Integer type. ifTypeDesc Interface type description. String type. ifDescription Interface description. String type. adminStatus Management status. 1: Up. 2: Down. Integer type. adminStatusDesc Management status description. String type. operationStatus Operation status. 1: Up. 2: Down. 3: Testing. 4: Unknown. 5: Dormant. 6: Not present. 7: LowerLayerDown. Integer type.
Example Query information about the interface with the index 1 and device ID 2. Request GET http://imc_host:8080/imcrs/plat/res/device/2/interface/1 accept: application/xml ... Response HTTP/1.1 200 OK Content-Type: application/xml ...
Bring Up an Interface Bring up an interface on a device based on device ID and interface index. Interface URI /plat/res/device/{deviceId}/interface/{ifIndex}/up Access Method HTTP PUT Parameters Path parameter deviceId Device ID. Long integer type. Required. No default value. ifIndex Interface index. Long integer type. Required. No default value. Returned Result Status codes • 204 (No Content): Success. • 404 (Not Found): No data is found with the ID. • 409 (Conflict): Failure. See “Error Codes.
Shut Down an Interface Shut down an interface on a device based on device ID. Interface URI /plat/res/device/{deviceId}/interface/{ifIndex}/down Access Method HTTP PUT Parameters Path parameter deviceId Device ID. Long integer type. Required. No default value. ifIndex Interface index. Long integer type. Required. No default value. Returned Result Status codes • 204 (No Content): Success. • 404 (Not Found): No data is found with the ID. • 409 (Conflict): Failure. See “Error Codes.
Query Custom View List Query custom view list. Interface URI /plat/res/view/custom Access Method HTTP GET Parameters Query parameter resPrivilegeFilter Filter resources by access right. Boolean type. Optional. The default value is false. desc Sort records in descending order. Boolean type. Optional. The default value is false. Interface index is used to sort interfaces by default. total Only records that match the sort criteria are returned. Boolean type. Optional. The default value is false.
Element description customView sub-elements symbolId Custom view ID. Long integer type. name Custom view name. String type. runStatus Operation status. Integer type. statusImgSrc Running picture. String type. statusDesc Operation status description. String type. Example Query custom view information list. Request GET http://imc_host:8080/imcrs/plat/res/view/custom accept: application/xml ... Response HTTP/1.1 200 OK Content-Type: application/xml ...
Query Custom View Information Query custom view information based on custom view ID. Interface URI /plat/res/view/custom/{id} Access Method HTTP GET Path parameter Path parameter id Custom view ID. Long integer type. Required. No default value. Query parameter Query parameter start Location of the first returned record in the query result. Integer type. Optional. The default value is 0. If the input value is smaller than 0, the default value is used. size Total returned records. Integer type.
Message body 69 10.153.89.164 255.255.255.0 1 pc iconpc 9 ......
Add Custom View Add a custom view to iMC. Interface URI /plat/res/view/custom Access Method HTTP POST Message body myView 1 2 Element description customView sub-elements name Custom view name. String type. Required. No default value. device Devices added to the custom view. Element type. Optional. No default value. Multiple elements are supported. device/id IDs of the devices added to the custom view.
Example Add a custom view named myView. Devices with IDs 1 and 2 are added to the custom view. Request POST http://imc_host:8080/imcrs/plat/res/view/custom accept: application/xml Content-Type: application/xml; charset=UTF-8 ... myView 1 2 Response HTTP/1.
Modify Custom View Modify a custom view based on custom view ID. Interface URI /plat/res/view/custom/{id} Access Method HTTP PUT Parameters Path parameter id Custom view ID. Long integer type. Required. No default value. Message body myView 0 false 10.153.88.1 10.153.88.
customView sub-elements device Devices added to the custom view. Element type. Optional. No default value. device/id IDs of the devices added to the custom view. Long integer type. Required. No default value. Returned Result Status codes • 204 (No Content): Success. • 404 (Not Found): No data is found with the ID. • 409 (Conflict): Failure. See “Error Codes.” Example Modify information about the custom view with the ID 1154.
Delete Custom View Delete a custom view based on custom view ID. Interface URI /plat/res/view/custom/{id} Access Method HTTP DELETE Parameters Path parameter id Custom view ID. Long integer type. Required. No default value. Returned Result Status codes • 204 (No Content): Success. • 410 (Gone): The data specified with the ID does not exist. • 409 (Conflict): Failure. See “Error Codes.” Message header HTTP/1.1 204 No Content ... Example Delete a custom view with the ID 1154.
Query Interface Views Query interface view list based on predefined criteria. Interface URI /plat/res/view/interface Access Method HTTP GET Parameters Query parameter resPrivilegeFilter Filter resources by access right. Boolean type. Optional. The default value is false. desc Sort records in descending order. Boolean type. Optional. The default value is false. Interface view name is used to sort interface views by default. total Only records that match the sort criteria are returned. Boolean type.
Message body 1 myIfView my interface view admin 2011-06-17T16:51:04.582+08:00 ...
Element description interfaceView sub-elements id Interface view ID. Long integer type. name Interface view name. String type. desc Interface view description. String type. createBy Creator. String type. createDate Created at. Date type. Example Query interface view list.
Query Interface View Information Query an interface view based on interface view ID. Interface URI /plat/res/view/interface/{id} Access Method HTTP GET Path parameter Path parameter id Interface view ID. Long integer type. Required. No default value. Query parameter Query parameter resPrivilegeFilter Filter resources by access right. Boolean type. Optional. The default value is false. total Only records that match the sort criteria are returned. Boolean type. Optional. The default value is false.
Message body 61 4 6 Ethernet1/0/4 1 2 100000000 -1 Ethernet1/0/4 Interface 00:e0:fc:00:35:00 1552 0 days 0 hours 0 minutes 20 seconds 930 milliseconds ...
Add Interface View Add an interface view to iMC. Interface URI /plat/res/view/interface Access Method HTTP POST Message body yourIfView yourIfView 55 1 55 3 Element description interfaceView sub-elements name Interface view name. String type. Required. No default value. desc Interface view description. String type. Optional.
Message header If the operation succeeds, the Location field gives the URI of the new resource. The message body is empty. HTTP/1.1 201 Created Location: http://localhost:8080/imcrs/plat/res/view/interface/3 Example Add an interface view named yourIfView. The device with ID 5 and interface indexes 1 and 3 is added to the interface view. Request POST http://imc_host:8080/imcrs/plat/res/view/interface accept: application/xml Content-Type: application/xml; charset=UTF-8 ...
Modify Interface View Modify interface view based on interface view ID. Interface URI /plat/res/view/interface/{id} Access Method HTTP PUT Parameters Path parameter id Interface view ID. Long integer type. Required. No default value.
Returned Result Status codes • 204 (No Content): Success. • 404 (Not Found): No data is found with the ID. • 409 (Conflict): Failure. See “Error Codes.” Example Modify interface view with the ID 3. Request PUT http://imc_host:8080/imcrs/plat/res/view/interface/3 accept: application/xml ...
Delete Interface View Delete an interface view based on interface view ID. Interface URI /plat/res/view/interface/{id} Access Method HTTP DELETE Parameters Path parameter id Interface view ID. Long integer type. Required. No default value. Returned Result Status codes • 204 (No Content): Success. • 410 (Gone): The data specified with the ID does not exist. • 409 (Conflict): Failure. See “Error Codes.” Message header HTTP/1.1 204 No Content ... Example Delete an interface view with the ID 2.
Query IP Views Query IP views based on predefined criteria. Interface URI /plat/res/view/ip Access Method HTTP GET Parameters Query parameter resPrivilegeFilter Filter resources by access right. Boolean type. Optional. The default value is false. desc Sort records in descending order. Boolean type. Optional. The default value is false. IP view name is used to sort IP views by default. total Only records that match the sort criteria are returned. Boolean type. Optional. The default value is false.
Message body 1041 10.153.0.0/24 5 /res/images/subnet-critical.gif Warning ...
Element description ipView sub-elements symbolId IP view symbol ID. Long integer type. name IP view name. String type. runStatus Operation status. Integer type. statusImgSrc Running picture. String type. statusDesc Operation status description. String type.
Query IP View Query IP views based on IP view ID. Interface URI /plat/res/view/ip/{id} Access Method HTTP GET Path parameter Path parameter id IP view ID. Long integer type. Required. No default value. Query parameter Query parameter resPrivilegeFilter Filter resources by access right. Boolean type. Optional. The default value is false. desc Sort records in descending order. Boolean type. Optional. The default value is false. Interface index is used to sort interfaces by default.
Message body 22 10.153.0.17 255.255.255.0 1 pc iconpc 9 ...
Export Topology in Visio Format Export topology in visio format. Interface URI /plat/res/topo/export/visio Access Method HTTP GET Query parameter Query parameter topoId Topology ID. Long integer type. Required. No default value. Returned Result Status codes • 200 (OK): Success. Message header HTTP/1.1 200 OK Message body ... Element description For the description on the fields of the returned value, see the Visio help.
Example Export topology information with the topology ID 1027 in Visio format. Request GET http://imc_host:8080/imcrs/plat/res/topo/export/visio?topoId=1027 accept: application/x-visio ... Response HTTP/1.1 200 OK Content-Type: application/x-visio ... ...
Query SNMP Template Information List Query SNMP template information list based on predefined criteria. Interface URI /plat/res/snmp Access Method HTTP GET Parameters Query parameter start Location of the first returned record in the query result. Integer type. Optional. The default value is 0. If the input parameter is smaller than 0, the parameter is automatically changed to 0. size Total returned records. Integer type. Optional. The default value is 10.
Message body 1 default SNMPv1 public private 4 3 1 0 0 161 ...
Query SNMP Template Information Query SNMP template information based on device ID. Interface URI /plat/res/snmp/{id} Access Method HTTP GET Parameters Path parameter id SNMP template ID. Integer type. Required. No default value. Returned Result Status codes • 200 (OK): Success.
snmpParamTemplate sub-elements paraType Parameter type. String type roCommunity Read-only community name. String type. rwCommunity Read-write community string. String type. timeout Timeout time. Long integer type. retries Number of retries. Long integer type. contextName SNMPv3 context. String type. securityName Security name. String type. authScheme Authorization mode. Integer type. authPassword Authorization password. String type. privScheme Encryption mode. Integer type.
Example Query SNMP template information with the template ID 1. Request GET http://imc_host:8080/imcrs/plat/res/snmp/1 accept: application/xml ... Response HTTP/1.1 200 OK Content-Type: application/xml ...
Query Telnet Template Information List Query Telnet template information list based on predefined criteria. Interface URI /plat/res/telnet Access Method HTTP GET Parameters Query parameter start Location of the first returned record in the query result. Integer type. Optional. The default value is 0. If the input parameter is smaller than 0, the parameter is automatically changed to 0. size Total returned records. Integer type. Optional. The default value is 10.
Message body 1 0 default 5 No username, no password 4 1 23 1 ...
Query Telnet Template Information Query Telnet template information based on device ID. Interface URI /plat/res/telnet/{id} Access Method HTTP GET Parameters Path parameter id Telnet template ID. Long integer type. Required. No default value. Returned Result Status codes • 200 (OK): Success.
telnetParamTemplate sub-elements userName Username. String type. userPassword User password. String type. superPassword Super password. String type. authTypeStr Authentication mode. String type. timeout Timeout time. Long integer type. retries Number of retries. Long integer type. port Port. Long integer type. type Template type. Integer type. Example Query Telnet template information with the template ID 1. Request GET http://imc_host:8080/imcrs/plat/res/telnet/1 accept: application/xml ..
Query SSH Template Information List Query SSH template information list based on predefined criteria. Interface URI /plat/res/ssh Access Method HTTP GET Parameters Query parameter start Location of the first returned record in the query result. Integer type. Optional. The default value is 0. If the input parameter is smaller than 0, the parameter is automatically changed to 0. size Total returned records. Integer type. Optional. The default value is 10.
Message body 101 2 101 0 Password admin 22 10 3 ...
Query SSH Template Information Query SSH template information based on device ID. Interface URI /plat/res/ssh/{id} Access Method HTTP GET Parameters Path parameter id SSH template ID. Long integer type. Required. No default value. Returned Result Status codes • 200 (OK): Success.
sshParamTemplate sub-elements authTypeStr Authentication mode description. String type. userName Username. String type. timeout Timeout time. Integer type. retries Number of retries. Integer type. password Password. String type. port Port. Integer type. keyFileName Key file name for key authentication. String type. keyPhrase Key phrase for key authentication. String type. superPassword Super password. String type. Example Query SSH template information with the template ID 101.
Query SQL Statements Query database based on component ID and SQL statement. Interface URI /sql Access Method HTTP GET Parameters Query parameter componentId Component ID. String type. Required. No default value. sql Query SQL statements. String type. Required. No default value. Returned Result Status codes • 200 (OK): Success. Message header HTTP/1.1 200 OK Total: 7 Message body 1.0.8802.1.1.2.0.6.1 1.0.8802.1.1.2.
Element description sqlResult sub-elements and attributes @total Total records. Long integer type. record Result records. Element type. record/@type Field type. String type. The value can only be string. record/value Field value. String type. Example Query the component iMC-NME-FAULT and SQL statement SELECT * FROM tbl_trap_conf in the database. Request GET http://localhost:8080/imcrs/sql?componentId=iMC-NME-FAULT&sql=SELECT * FROM tbl_trap_conf accept: application/xml ... Response HTTP/1.
6 User Management The User Management category provides multiple commands for managing, modifying, and querying user records in your IMC system.
Query Users Query users with certain criteria. Interface URI /user Access Method HTTP GET Parameters Query parameters userName userName String type, supporting wildcard characters. Optional. No default value. certification Identity number. String type, supporting wildcard characters. Optional. No default value. address Contact address. String type, supporting wildcard characters. Optional. No default value. phone Telephone number. String type, supporting wildcard characters. Optional.
Returned Result Status codes • 200 (OK): Success. Message header When the total parameter takes true, the Total attribute returns the total number of records that meet the requirements. The message body is empty. HTTP/1.1 200 OK Total: 2 Message body 2 lisi lisi002 Tianjin 13810561010 lisi@h3c.
Example Query and list users. Request GET http://imc_host:8080/imcrs/user accept: application/xml ... Response HTTP/1.1 200 OK Content-Type: application/xml ... 2 lisi lisi002 Tianjin 13810561010 lisi@h3c.
Query User Information Query information about a user with the specified ID. Interface URI /user/{id} Access Method HTTP GET Parameters Path parameters id User ID. Long integer type. Required. No default value. Returned Result Status codes • 200 (OK): Success. Message header HTTP/1.1 200 OK Message body 1 zhangsan zhangsan001 Bejing 01088101023 zhangsan@h3c.
user sub-elements phone Telephone number. String type. email Email address. String type. ssType Activate self-service account or not. 1 for active. 2 for inactive. Integer type. Example Query information about the user with ID 1. Request GET http://imc_host:8080/imcrs/user/1 accept: application/xml ... Response HTTP/1.1 200 OK Content-Type: application/xml ...
Add User Add a user with specified information. Interface URI /user Access Method HTTP POST Message body wanger wanger001 Shanghai 02088784567 wanger@h3c.com 1 1 Element description user sub-elements userName User name. String type. Required. No default value. certification Identity number. String type. Required. No default value.
Example Add a user. Request POST http://imc_host:8080/imcrs/user accept: application/xml Content-Type: application/xml; charset=UTF-8 ... wanger wanger001 Shanghai 02088784567 wanger@h3c.com Response HTTP/1.
Modify User Modify information about a user with the specified ID. Interface URI /user/{id} Access Method HTTP PUT Parameters Path parameters id User ID. Long integer type. Required. No default value. Message body wanger wanger001 Shanghai 02088784567 wanger@h3c.com Element description Path parameters userName User name. Optional. If the element does not exist, the value is not changed.
Returned Result Status codes • 204 (No Content): Success. • 404 (Not Found): No data is found with the ID. • 409 (Conflict): Failure. See “Error Codes.” Example Modify information about the user with ID 2. Request PUT http://imc_host:8080/imcrs/user/2 accept: application/xml ... wanger wanger001 Shanghai 02088784567 wanger@h3c.
Delete User Delete a user with the specified ID. Interface URI /user{id} Access Method HTTP DELETE Parameters Path parameters id User ID. Long integer type. Required. No default value. Returned Result Status codes • 204 (No Content): Success. • 410 (Gone): No data is found with the specified ID. • 409 (Conflict): Failure. See “Error Codes.” Message header HTTP/1.1 204 No Content ... Example Delete the user with ID 4. Request DELETE http://imc_host:8080/imcrs/user/4 accept: application/xml ...
Query User Additional Information Definitions Query user additional information definitions with certain criteria. Interface URI /user/additionalInfo Access Method HTTP GET Parameters Query parameters total Only the number of records that meet the requirements is returned. Boolean type. Optional. The default value is false. When the value is true, the returned message body is empty, and the Total attribute of the message header returns the number of records that meet the requirements.
Example Query and list user additional information definitions. Request GET http://imc_host:8080/imcrs/user/additionalInfo accept: application/xml ... Response HTTP/1.1 200 OK Content-Type: application/xml ...
Query User Additional Information Definition Query the user additional information definition of a specified ID. Interface URI /user/additionalInfo/{id} Access Method HTTP GET Parameters Path parameters id ID of a user additional information definition. Long integer type. Required. No default value. Returned Result Status codes • 200 (OK): Success. Message header HTTP/1.
userAdditionalInfo sub-elements Boolean type. fieldType Field type. 1 for integer. 2 for decimal. 3 for alphanumeric character. 4 for any character. 5 for option. Integer type. fieldLen Maximum field length. Integer type. fieldMax Maximum field value. String type. fieldMin Minimum field value. String type. defaultValue Default value. String type. priority The display priority of a field. Integer type. showForPreRegisterUser Display pre-registered users or not. Boolean type.
Example Query the user additional information definition with ID 2. Request GET http://imc_host:8080/imcrs/user/additionalInfo/2 accept: application/xml ... Response HTTP/1.1 200 OK Content-Type: application/xml ...
Add User Additional Information Definition Add a user additional information definition with specified information.
Query parameters options Option elements. Element type. Required when fieldType is 5. No default value. options/id Option ID. Long integer type. Required. No default value. options/optionsValue Option value. String type. Required. No default value. Returned Result Status codes • 201 (Created): Success. • 409 (Conflict): Failure. See “Error Codes.” Message header If the operation succeeds, the Location field gives the URI of the new resource. The message body is empty. HTTP/1.
Example 2 Add a user additional information definition of the integer type. Request POST http://localhost:8080/imcrs/user/additionalInfo accept: application/xml Content-Type: application/xml; charset=UTF-8 ...
Modify User Additional Information Definition Modify a user additional information definition with the specified ID. Interface URI /user/additionalInfo/{id} Access Method HTTP PUT Parameters Path parameters id ID of a user additional information definition. Long integer type. Required. No default value.
userAdditionalInfo sub-elements String type. Optional. If the element does not exist, the value is not changed. If the element exists, the value cannot be null. showForPreRegisterUser Display pre-registered users or not. Boolean type. Optional. If the element does not exist, the value is not changed. If the element exists, the value cannot be null. options Option elements. Element type. Required when fieldType is 5. No default value. options/id Option ID. Long integer type. Required. No default value.
Delete User Additional Information Definition Delete the user additional information definition of a specified ID. Interface URI /user/additionalInfo/{id} Access Method HTTP DELETE Parameters Path parameters id ID of a user additional information definition. Long integer type. Required. No default value. Returned Result Status codes • 204 (No Content): Success. • 410 (Gone): No data is found with the specified ID. • 409 (Conflict): Failure. See “Error Codes.” Message header HTTP/1.
7 Terminal Access Management These commands provides tools for managing network access, and include the following: • Query Unauthorized Access Attempts • Query Unauthorized Access Logs • Query Access Log Histories • Query Current Accesses • Query Real-Time Locations • Query All IP Segments • Query IP Segment • Add IP Segment • Add Child IP Segment • Modify IP Segment • Release IP Segment • Automatically Scan IP Segment • Automatically Scan Assigned IP Segment • Query IP Addresses
• Modify Conflict and Unauthorized Access Policy • Modify Unknown Access Policy 200 Terminal Access Management
Query Unauthorized Access Attempts Query unauthorized access attempts with certain criteria. Interface URI /res/access/unauthorizedAccess Access Method HTTP GET Parameters Query Parameters resPrivilegeFilter Whether or not to filter the rights for resources. Boolean type. Optional. The default value is false. terminalIp Terminal IP address. String type, supporting wildcard characters. Optional. No default value. terminalMac Terminal MAC address. String type, supporting wildcard characters. Optional.
Returned Result Status codes • 200 (OK): Success. Message header When the total parameter takes true, the Total attribute returns the total number of records that meet the requirements. The message body is empty. HTTP/1.1 200 OK Total: 4 Message body -6750808576775831498 17 Quidway 10.153.89.
Example Query and list information about unauthorized access attempts. Request GET http://localhost:8080/imcrs/res/access/unauthorizedAccess accept: application/xml ... Response HTTP/1.1 200 OK Content-Type: application/xml ... -6750808576775831498 17 Quidway 10.153.89.
Query Unauthorized Access Logs Query unauthorized access logs with certain criteria. Interface URI /res/access/unauthorizedAccessLog Access Method HTTP GET Parameters Query Parameters resPrivilegeFilter Whether or not to filter the rights for resources. Boolean type. Optional. The default value is false. terminalIp Terminal IP address. String type, supporting wildcard characters. Optional. No default value. terminalMac Terminal MAC address. String type, supporting wildcard characters. Optional.
Query Parameters Boolean type. Optional. The default value is false. When the value is true, the start and size attributes are invalid, the returned message body is empty, and the Total attribute of the message header returns the number of records that meet the requirements. conflictType Conflict type. Integer type. Optional. Returned Result Status codes • 200 (OK): Success.
unauthorizedAccessLog sub-elements deviceLabel Device label. String type. deviceIp Device IP address. String type. ifDesc Interface description. String type. conflictType Conflict type. 1 for terminal access conflict. 2 for switch access conflict. 3 for switch and terminal access conflict. 4 for access binding not configured. Integer type. conflictFindTime Time when the conflict was detected. Long integer type. conflictFindTimeDesc Conflict type. String type. conflictDesc Conflict description.
Query Access Log Histories Query access log histories with certain criteria. Interface URI /res/access/historyAccessLog Access Method HTTP GET Parameters Query Parameters resPrivilegeFilter Whether or not to filter the rights for resources. Boolean type. Optional. The default value is false. terminalIp Terminal IP address. String type, supporting wildcard characters. Optional. No default value. terminalMac Terminal MAC address. String type, supporting wildcard characters. Optional. No default value.
Query Parameters Boolean type. Optional. The default value is false. When the value is true, the start and size attributes are invalid, the returned message body is empty, and the Total attribute of the message header returns the number of records that meet the requirements. Returned Result Status codes • 200 (OK): Success. Message header When the total parameter takes true, the Total attribute returns the total number of records that meet the requirements. The message body is empty. HTTP/1.
unauthorizedAccessLog sub-elements ifDesc Interface description. String type. vlanId VLAN ID. Integer type. upLineTime Time when the user logged on. Long integer type. downLineTime Time when the user logged off. Long integer type. Example Query and list access log histories. Request GET http://localhost:8080/imcrs/res/access/historyAccessLog accept: application/xml ... Response HTTP/1.1 200 OK Content-Type: application/xml ... -8132800096806244989 10.
Query Current Accesses Query current accesses on a device with certain criteria. Interface URI /res/access/ipMacLearn/{deviceId} Access Method HTTP GET Path parameters Path parameters deviceId Device ID. Long integer type. Required. No default value. Query parameters Query parameters deviceId Device ID. Long integer type. Required. No default value. mac Learned MAC address. String type. Optional. total Only the number of records that meet the requirements is returned. Boolean type. Optional.
Returned Result Status codes • 200 (OK): Success. Message header When the total parameter takes true, the Total attribute returns the total number of records that meet the requirements. The message body is empty. HTTP/1.1 200 OK Total: 51 Message body 2 10.153.89.1 33 GigabitEthernet4/0/3 2 10.153.88.
ipMacLearnResult sub-elements String type. Example Query and list current accesses on the device whose ID is 10. Request GET http://localhost:8080/imcrs/res/access/ipMacLearn/10 accept: application/xml ... Response HTTP/1.1 200 OK Content-Type: application/xml ... 2 10.153.89.1 33 GigabitEthernet4/0/3 2 10.153.88.
Query Real-Time Locations Query real-time locations with certain criteria. Interface URI /res/access/realtimeLocate Access Method HTTP GET Parameters Query parameters type Location type. 1 for MAC address. 2 for IP address. Integer type. Required. The default value is 2. value Location address. String type. Required. The default value is an empty string. total Only the number of records that meet the requirements is returned. Boolean type. Optional. The default value is false.
Elements realtimeLocation sub-elements locateIp Location address. String type. deviceIp Device IP address. String type. ifDesc Interface description. String type. Example Query and list real-time locations. Request GET http://imc_host:8080/imcrs/asset/access/realtimeLocate accept: application/xml ... Response HTTP/1.1 200 OK Content-Type: application/xml ... 10.153.89.1 10.153.89.77 Ethernet0/6 .
Query All IP Segments Query information about all IP segments. Interface URI /res/access/assignedIpScope Access Method HTTP GET Path parameters None Returned Result Status codes • 200 (OK): Success. Message header HTTP/1.1 200 OK Message body 0.0 -299 System default IP segment Administrator. Does not belong to any set of assigned IP addresses in the assigned IP segment range.
Elements assignedIpScope sub-elements id IP segment ID. Long integer type. ip IP segment. String type. startIp Start IP address. String type. endIp End IP address. String type. name Owner. String type. description Description. String type. parentId Parent IP segment ID. Long integer type. percent Ratio of the assigned IP address number to the total number of IP addresses in the IP segment, expressed in a percentage value. Double-precision floating-point type.
Example Query information about all IP segments. Request GET http://localhost:8080/imcrs/asset/access/assignedIpScope accept: application/xml ... Response HTTP/1.1 200 OK Content-Type: application/xml ... 0.0 -299 System default IP segment Administrator. Does not belong to any set of assigned IP addresses in the assigned IP segment range. -300 0.
Query IP Segment Query information about an IP segment with the specified ID. Interface URI /res/access/assignedIpScope/{id} Access Method HTTP GET Path parameters Path parameters id IP segment ID. Long integer type. Required. No default value. Returned Result Status codes • 200 (OK): Success. Message header HTTP/1.1 200 OK Message body 1 10.153.89.1-10.153.89.10 10.153.89.1 10.153.89.10 1to10 10.153.89.
Elements assignedIpScope sub-elements id IP segment ID. Long integer type. ip IP segment. String type. startIp Start IP address. String type. endIp End IP address. String type. name Owner. String type. description Description. String type. parentId Parent IP segment ID. Long integer type. percent Ratio of the assigned IP address number to the total number of IP addresses in the IP segment, expressed in a percentage value. Double-precision floating-point type.
Example Query information about the IP segment with ID 1. Request GET http://localhost:8080/imcrs/res/access/assignedIpScope/1 accept: application/xml ... Response HTTP/1.1 200 OK Content-Type: application/xml ... 1 10.153.89.1-10.153.89.10 10.153.89.1 10.153.89.10 1to10 10.153.89.1 to 10.153.89.10 -300 0.
Add IP Segment Add an IP segment. Interface URI /res/access/assignedIpScope Access Method HTTP POST Message body 10.153.89.21 10.153.89.30 21to30 10.153.89.21 to 10.153.89.30 Elements assignedIpScope sub-elements startIp Start IP address. String type. Required. No default value. endIp End IP address. String type. Required. No default value. name Owner. String type. Required.
Example 1 Add an IP segment ranging from 10.153.89.21 to 10.153.89.30 and grant rights to the IP segment to the default operator groups. Request POST http://localhost:8080/imcrs/res/access/assignedIpScope accept: application/xml Content-Type: application/xml; charset=UTF-8 ... 10.153.89.21 10.153.89.30 21to30 10.153.89.21 to 10.153.89.30 Response HTTP/1.
Add Child IP Segment Add a child IP segment. Interface URI /res/access/assignedIpScope/{id} Access Method HTTP POST Parameters Path parameters id IP segment ID. Long integer type. Required. No default value. Message body 10.153.89.21 10.153.89.25 21to25 10.153.89.21 to 10.153.89.25 Elements assignedIpScope sub-elements startIp Start IP address. String type. Required. No default value.
Message header If the operation succeeds, the Location field gives the URI of the new resource. The message body is empty. HTTP/1.1 201 Created Location: http://localhost:8080/imcrs/res/access/assignedIpScope/8 Example Add a child IP segment ranging from 10.153.89.21 to 10.153.89.25 for the IP segment with ID 7. Request POST http://localhost:8080/imcrs/res/access/assignedIpScope/7 accept: application/xml Content-Type: application/xml; charset=UTF-8 ... 10.153.89.
Modify IP Segment Modify an IP segment with the specified ID. Interface URI /res/access/assignedIpScope/{id} Access Method HTTP PUT Parameters Path parameters id IP segment ID. Long integer type. Required. No default value. Message body 21to30 update 10.153.89.21 to 10.153.89.30 update Elements assignedIpScope sub-elements name Owner. String type. Optional. If the element does not exist, the value is not changed.
Example Modify the IP segment with ID 13. Request PUT http://imc_host:8080/imcrs/asset/access/assignedIpScope/13 accept: application/xml ... 21to30 update 10.153.89.21 to 10.153.89.30 update Response HTTP/1.1 204 No Content ...
Release IP Segment Release an IP segment with the specified ID. Interface URI /res/access/assignedIpScope/{id} Access Method HTTP DELETE Parameters Path parameters id IP segment ID. Long integer type. Required. No default value. Returned Result Status codes • 204 (No Content): Success. • 410 (Gone): No data is found with the specified ID. • 409 (Conflict): Failure. See “Error Codes.” Message header HTTP/1.1 204 No Content ... Example Release the IP segment with ID 13.
Automatically Scan IP Segment Automatically scan an IP segment with the specified start and end IP addresses. Interface URI /res/access/assignedIpScope/autoScan Access Method HTTP GET Query parameters Query parameters startIp Start IP address. String type. Required. No default value. endIp End IP address. String type. Required. No default value. total Only the number of records that meet the requirements is returned. Boolean type. Optional. The default value is false.
Message body 10.153.89.1 H3C 10.153.89.10 10.153.89.13 ...
Elements assignedIpInfo sub-elements id ID of the IP address. Long integer type. ip IP address. String type. name Owner. String type. description Description. String type.
Example Automatically scan the IP segment with start IP address 10.153.89.1 and end IP address 10.153.89.20. Request GET http://localhost:8080/imcrs/res/access/assignedIpScope/autoScan?startIp=10.153.89.1&endIP=10.153.89.20 accept: application/xml ... Response HTTP/1.1 200 OK Content-Type: application/xml ... 10.153.89.1 H3C 10.153.89.10 10.153.89.13 ...
Automatically Scan Assigned IP Segment Automatically scan an IP segment with the specified ID. Interface URI /res/access/assignedIpScope/autoScan/{id} Access Method HTTP GET Parameters Path parameters id IP segment ID. Long integer type. Required. No default value. Returned Result Status codes • 200 (OK): Success. Message header When the total parameter takes true, the Total attribute returns the total number of records that meet the requirements. The message body is empty. HTTP/1.
assignedIpInfo sub-elements String type. description Description. String type. Example Automatically scan the IP segment with ID 2. Request GET http://localhost:8080/imcrs/res/access/assignedIpScope/autoScan/2 accept: application/xml ... Response HTTP/1.1 200 OK Content-Type: application/xml ... 10.153.89.1 H3C 10.153.89.10 ...
Query IP Addresses Query the assigned IP addresses with the specified IP segment ID. Interface URI /res/access/assignedIpScope/ip Access Method HTTP GET Query parameters Query parameters ipScopeId ID of the IP address segment. Long integer type. Required. No default value. total Only the number of records that meet the requirements is returned. Boolean type. Optional. The default value is false.
Returned Result Status codes • 200 (OK): Success. Message header When the total parameter takes true, the Total attribute returns the total number of records that meet the requirements. The message body is empty. HTTP/1.1 200 OK Total: 3 Message body 4 10.153.89.12 2 5 10.153.89.2 3 ...
Example Query and list the assigned IP addresses that belong to the IP segment with ID 1. Request GET http://localhost:8080/imcrs/res/access/assignedIpScope/ip?ipScopeId=1 accept: application/xml ... Response HTTP/1.1 200 OK Content-Type: application/xml ... 2 5 10.153.89.2 3 ...
Assign IP Address Assign an IP address. Interface URI /res/access/assignedIpScope/ip Access Method HTTP POST Query parameters Query parameters ipScopeId IP segment ID. Long integer type. Required. No default value. Message body 10.153.89.8 H3C111 10.153.89.8 rest Elements assignedIpInfo sub-elements ip IP address. String type. Required. No default value. name Owner. String type. Required. No default value.
Example Assign IP address 10.153.89.8 to the IP segment with ID 1. Request POST http://imc_host:8080/imcrs/asset/access/assignedIpScope/ip?ipScopeId=1 accept: application/xml Content-Type: application/xml; charset=UTF-8 ... 10.153.89.8 H3C111 10.153.89.8 rest Response HTTP/1.
Release Assigned IP Address Release an assigned IP address with specific ID. Interface URI /res/access/assignedIpScope/ip/{id} Access Method HTTP DELETE Parameters Path parameters id ID of the IP address. Long integer type. Required. No default value. Returned Result Status codes • 204 (No Content): Success. • 410 (Gone): No data is found with the specified ID. • 409 (Conflict): Failure. See “Error Codes.” Message header HTTP/1.1 204 No Content ... Example Release the IP segment with ID 13.
Query Terminal Access Bindings Query terminal access bindings with certain criteria. Interface URI /res/access/macAccessBind Access Method HTTP GET Parameters Query parameters resPrivilegeFilter Whether or not to filter the rights for resources. Boolean type. Optional. The default value is false. terminalIp Terminal IP address. String type, supporting wildcard characters. Optional. No default value. terminalMac Terminal MAC address. String type, supporting wildcard characters. Optional.
Returned Result Status codes • 200 (OK): Success. Message header When the total parameter takes true, the Total attribute returns the total number of records that meet the requirements. The message body is empty. HTTP/1.
Query Terminal Access Binding Query information about a terminal access binding with the specified ID. Interface URI /res/access/macAccessBind/{id} Access Method HTTP GET Parameters Path parameters id Terminal access binding ID. Long integer type.Required. No default value. Returned Result Status codes • 200 (OK): Success. Message header HTTP/1.1 200 OK Message body 1 2 H3C 10.153.89.
macAccessBind sub-elements terminalName Terminal name. String type. deviceId Device ID. Long integer type. deviceLabel Device label. String type. deviceIp Device IP address. String type. ifDesc Interface description. String type. bindType Binding type. 1 for no authentication. 2 for MAC-to-interface binding. Integer type. device URI of the device link. String type. Example Query information about the terminal access binding with ID 1.
Automatically Scan Terminal Access Bindings Automatically scan the terminal access bindings with certain criteria. Interface URI /res/access/macAccessBind/autoScan Access Method HTTP GET Parameters Query parameters deviceId Device ID. Long integer type. Required, supporting multiple query elements. No default value. total Only the number of records that meet the requirements is returned. Boolean type. Optional. The default value is false.
Example Automatically scan the terminal access bindings on the device whose ID is 2. Request GET http://localhost:8080/imcrs/res/access/macAccessBind/autoScan?deviceId=2 accept: application/xml ... Response HTTP/1.1 200 OK Content-Type: application/xml ... 515 2 H3C 10.153.89.1 GigabitEthernet4/0/17 00:00:00:11:11:01 10.153.
Add Terminal Access Binding Add a terminal access binding. Interface URI /res/access/macAccessBind Access Method HTTP POST Message body 1a:2a:3a:4c:1c:2c a1 2 2 1 Elements macAccessBind sub-elements terminalMac Terminal MAC address. String type. Required. No default value. terminalName Terminal name. String type. Optional.
Message header If the operation succeeds, the Location field gives the URI of the new resource. The message body is empty. HTTP/1.1 201 Created Location: http://localhost:8080/imcrs/res/access/macAccessBind/4 Example 1 Add a terminal access binding, which maps MAC address 1a:2a:3a:4c:1c:2c to the interface whose index is 1 on device whose ID is 2. Request POST http://localhost:8080/imcrs/res/access/macAccessBind accept: application/xml Content-Type: application/xml; charset=UTF-8 ...
Modify Terminal Access Binding Modify a terminal access binding with the specified ID. Interface URI /res/access/macAccessBind/{id} Access Method HTTP PUT Parameters Path parameters id Terminal access binding ID. ID. Long integer type. Required. No default value.
Example Modify the terminal access binding with ID 2. Request PUT http://localhost:8080/imcrs/res/access/macAccessBind/2 accept: application/xml ... a1 2 5 1 Response HTTP/1.1 204 No Content ...
Delete Terminal Access Binding Delete a terminal access binding with the specified ID. Interface URI /res/access/macAccessBind/{id} Access Method HTTP DELETE Parameters Path parameters id Terminal access binding ID. Long integer type.Required. No default value. Returned Result Status codes • 204 (No Content): Success. • 410 (Gone): No data is found with the specified ID. • 409 (Conflict): Failure. See “Error Codes.” Message header HTTP/1.1 204 No Content ...
Query Switch Access Bindings Query switch access bindings with certain criteria. Interface URI /res/access/ifAccessBind Access Method HTTP GET Parameters Query parameters resPrivilegeFilter Whether or not to filter the rights for resources. Boolean type. Optional. The default value is false. terminalIp Terminal IP address. String type, supporting wildcard characters. Optional. No default value. terminalMac Terminal MAC address. String type, supporting wildcard characters. Optional. No default value.
Returned Result Status codes • 200 (OK): Success. Message header When the total parameter takes true, the Total attribute returns the total number of records that meet the requirements. The message body is empty. HTTP/1.1 200 OK Total: 2 Message body 1 5 10.153.89.
Example Query switch access bindings. Request GET http://localhost:8080/imcrs/res/access/ifAccessBind accept: application/xml ... Response HTTP/1.1 200 OK Content-Type: application/xml ... 1 5 10.153.89.
Query Switch Access Binding Query information about a switch access binding with the specified ID. Interface URI /res/access/ifAccessBind/{id} Access Method HTTP GET Parameters Path parameters id Switch access binding ID. Long integer type. Required. No default value. Returned Result Status codes • 200 (OK): Success. Message header HTTP/1.1 200 OK Message body 1 5 10.153.89.
ifAccessBind sub-elements terminalName Terminal name. String type. deviceId Device ID. Long integer type. deviceName Device label. String type. deviceIp Device IP address. String type. ifDesc Interface description. String type. bindType Binding type. 1 for MAC-to-interface binding. 2 for no authentication. Integer type. terminalMaintainer Maintainer. String type device URI of the device link. String type. Example Query information about the switch access binding with ID 1.
Automatically Scan Switch Access Bindings Automatically scan the terminal access bindings with certain criteria. Interface URI /res/access/macAccessBind/autoScan Access Method HTTP GET Parameters Query parameters deviceId Device ID. Long integer type. Required, supporting multiple elements. No default value. Returned Result Status codes • 200 (OK): Success. Message header When the total parameter takes true, the Total attribute returns the total number of records that meet the requirements.
Example Automatically scan the terminal access bindings on the device whose ID is 2. Request GET http://localhost:8080/imcrs/res/access/macAccessBind/autoScan?deviceId=2 accept: application/xml ... Response HTTP/1.1 200 OK Content-Type: application/xml ... 515 2 H3C 10.153.89.1 GigabitEthernet4/0/17 00:00:00:11:11:01 10.153.
Add Switch Access Binding Add a switch access binding. Interface URI /res/access/ifAccessBind Access Method HTTP POST Message body 18:28:38:47:17:26 a2 1 5 29 Elements ifAccessBind sub-elements terminalMac Terminal MAC address. String type. Required when bindType takes 1. terminalName Terminal name. String type. bindType Binding type.
Message header If the operation succeeds, the Location field gives the URI of the new resource. The message body is empty. HTTP/1.1 201 Created Location: http://localhost:8080/imcrs/res/access/ifAccessBind/4 Example 1 Add a switch access binding, which maps the interface (index 29) of the device (ID 5) to MAC address 8:28:38:47:17:26. Request POST http://imc_host:8080/imcrs/asset/access/ifAccessBind accept: application/xml Content-Type: application/xml; charset=UTF-8 ...
Modify Switch Access Binding Modify a switch access binding with the specified ID. Interface URI /res/access/ifAccessBind/{id} Access Method HTTP PUT Parameters Path parameters id Switch access binding ID. Long integer type. Required. No default value.
Example Modify the switch access binding with ID 5. Request PUT http://localhost:8080/imcrs/res/access/ifAccessBind/5 accept: application/xml ... 11:21:31:41:11:21 a1 tm1 1 Response HTTP/1.1 204 No Content ...
Delete Switch Access Binding Delete a switch access binding with the specified ID. Interface URI /res/access/ifAccessBind/{id} Access Method HTTP DELETE Parameters Path parameters id Switch access binding ID. Long integer type. Required. No default value. Returned Result Status codes • 204 (No Content): Success. • 410 (Gone): No data is found with the specified ID. • 409 (Conflict): Failure. See “Error Codes.” Message header HTTP/1.1 204 No Content ...
Query IP-to-MAC Address Bindings Query the IP-to-MAC address bindings with certain criteria. Interface URI /res/access/ipMacBind Access Method HTTP GET Parameters Query parameters resPrivilegeFilter Whether or not to filter the rights for resources. Boolean type. Optional. The default value is false. ip IP address. String type, supporting wildcard characters. Optional. No default value. mac MAC address. String type, supporting wildcard characters. Optional. No default value. name Owner.
Message body 1 10.153.89.1 00:11:22:33:44:55 H3C 9 ...
Elements For meanings of the fields in the message body, see “Query IP-to-MAC Address Binding.” Example Query and list IP-to-MAC address bindings. Request GET http://imc_host:8080/imcrs/res/access/ipMacBind accept: application/xml ... Response HTTP/1.
Query IP-to-MAC Address Binding Query information about an IP-to-MAC address binding with the specified ID. Interface URI /res/access/ipMacBind/{id} Access Method HTTP GET Parameters Path parameters id IP-to-MAC address binding ID. Long integer type. Required. No default value. Returned Result Status codes • 200 (OK): Success. Message header HTTP/1.1 200 OK Message body 1 10.153.89.
Example Query information about the IP-to-MAC address binding with ID 1. Request GET http://localhost:8080/imcrs/res/access/ipMacBind/1 accept: application/xml ... Response HTTP/1.1 200 OK Content-Type: application/xml ... 1 10.153.89.
Automatically Scan IP-to-MAC Address Bindings Automatically scan the IP-to-MAC address bindings with certain criteria. Interface URI /res/access/ipMacBind/autoScan Access Method HTTP GET Parameters Query parameters startIp Start IP address. String type. Required. No default value. endIp End IP address. String type. Required. No default value. Returned Result Status codes • 200 (OK): Success.
Example Automatically scan the IP-to-MAC address bindings on the IP segment with start IP address 10.153.89.1 and end IP address 10.153.89.20. Request GET http://imc_host:8080/imcrs/res/access/ipMacBind/autoScan?startIp=10.153.89.1&endIp=10.153.89.2 accept: application/xml ... Response HTTP/1.1 200 OK Content-Type: application/xml ... 16 10.153.89.1 00:0f:e2:e1:ca:be H3C 9 ...
Add IP-to-MAC Address Binding Add an IP-to-MAC address binding. Interface URI /res/access/ipMacBind Access Method HTTP POST Message body 10.153.89.1 00:0f:e2:e1:ca:be Elements ipMacBind sub-elements ip IP address. String type. Required. No default value. mac MAC address. String type. Required. No default value. Returned Result Status codes • 201 (Created): Success. • 409 (Conflict): Failure. See “Error Codes.
Example Add an IP-to-MAC address binding, which maps the IP address 10.153.89.1 to the MAC address 00:0f:e2:e1:ca:be Request POST http://localhost:8080/imcrs/res/access/ipMacBind accept: application/xml Content-Type: application/xml; charset=UTF-8 ... 10.153.89.1 00:0f:e2:e1:ca:be Response HTTP/1.
Delete IP-to-MAC Address Binding Delete an IP-to-MAC address binding with the specified ID. Interface URI /res/access/ipMacBind/{id} Access Method HTTP DELETE Parameters Path parameters id IP-to-MAC address binding ID. Long integer type. Required. No default value. Returned Result Status codes • 204 (No Content): Success. • 410 (Gone): No data is found with the specified ID. • 409 (Conflict): Failure. See “Error Codes.” Message header HTTP/1.1 204 No Content ...
Query Conflict and Unauthorized Access Policy Query information about the conflict and unauthorized access policy. Interface URI /res/access/strategy/conflict Access Method HTTP GET Parameters None Returned Result Status codes • 200 (OK): Success. Message header HTTP/1.
Example Query information about the conflict and unauthorized access policy. Request GET http://localhost:8080/imcrs/res/access/strategy/conflict accept: application/xml ... Response HTTP/1.1 200 OK Content-Type: application/xml ...
Query Unknown Access Policy Query information about the unknown access policy. Interface URI /res/access/strategy/unknown Access Method HTTP GET Parameters None Returned Result Status codes • 200 (OK): Success. Message header HTTP/1.
Example Query information about the unknown access policy. Request GET http://localhost:8080/imcrs/res/access/strategy/unknown accept: application/xml ... Response HTTP/1.1 200 OK Content-Type: application/xml ...
Modify Conflict and Unauthorized Access Policy Modify the conflict and unauthorized access policy. Interface URI /res/access/strategy/conflict Access Method HTTP PUT Parameters None Message body 1 2 1 180 180 Elements accessStrategy sub-elements sendFaultType Whether or not to send alarms. 0 for no. 1 for yes. Integer type.
Example Modify the conflict and unauthorized access policy. Request PUT http://imc_host:8080/imcrs/asset/access/strategy/conflict accept: application/xml ... 0 1 2 1 180 180 Response HTTP/1.1 204 No Content ...
Modify Unknown Access Policy Modify the unknown access policy. Interface URI /res/access/strategy/unknown Access Method HTTP PUT Parameters None Message body 0 1 2 1 180 180 Elements accessStrategy sub-elements sendFaultType Whether or not to send alarms. 0 for no. 1 for yes. Integer type. Optional.
Returned Result Status codes • 204 (No Content): Success. • 404 (Not Found): No data is found with the ID. • 409 (Conflict): Failure. See “Error Codes.” Example Modify the unknown access policy. Request PUT http://localhost:8080/imcrs/res/access/strategy/unknown accept: application/xml ...
8 Network Alarm Management This set of API commands provides tools for managing alarm conditions on your network.
Query Alarms Query alarms with certain criteria. Interface URI /fault/alarm Access Method HTTP GET Parameters Query parameters alarmLevel Alarm level. Integer type, supporting multiple elements. Optional. No default value. For the valid values, see Query Alarm Levels. recStatus Alarm recovery status. Integer type. Optional. No default. For valid values, see Query Alarm Recovery Status. ackStatus Alarm acknowledgement status. Integer type. Optional. No default.
Query parameters faultOid Alarm event OID. String type, supporting multiple elements. Optional. No default value. originalType Alarm source type. Integer type. Optional. No default value. For the valid values, see Query Alarm Sources. start The position where the first returned record is located in the whole returned result. Integer type. Optional. The default value is 0. If a negative value is uploaded, the default value is used. size The total number of returned records. Integer type. Optional.
Example Query and list the level-4 alarms from the 10th to the 20th entries. Request GET http://imc_host:8080/imcrs/fault/alarm?alarmLevel=4&start=10&size=10 accept: application/xml ... Response HTTP/1.1 200 OK Content-Type: application/xml ... 3655 1.3.6.1.4.1.2011.10.4.1.1.2.6.4 3 iMC 347 10.153.88.34 Quidway ...
Query Alarm Information Query basic information about an alarm with the specified ID. In addition to basic alarm information, the result also includes the method for accessing alarm details and performing related operations. Interface URI /fault/alarm/{id} Access Method HTTP GET Parameters Path parameters id Alarm ID. Long integer type. Required. No default value. Returned Result Status codes • 200 (OK): Success.
alarmDetail sub-elements originalType Alarm source type. Integer type. originalTypeDesc Description of the alarm source type. String type. deviceId Device ID. Long integer type. deviceIp Device IP address. String type. deviceName Device name. String type. alarmLevel Alarm level. Integer type. alarmLevelDesc Alarm level description. String type. alarmCategory Alarm category. Integer type. alarmCategoryDesc Alarm category description. String type. faultTime Time when the alarm occurred.
alarmDetail sub-elements String type. ackUserName User who acknowledged the alarm. String type. alarmDesc Alarm description. String type. paras Alarm parameters. String type. parentId Parent ID of the alarm relation analysis. Long integer type. somState Alarm distribution status. Integer type. remark Alarm remarks. String type. genericId Generic ID. Integer type. specificId Specific ID. Integer type. eventName Alarm event name. String type. reason Alarm event reason. String type.
Example Query information about the alarm with ID 3665. Request GET http://imc_host:8080/imcrs/fault/alarm/3665 accept: application/xml ... Response HTTP/1.1 200 OK Content-Type: application/xml Link: ; rel=recover Link: ; rel=acknowledge Link: ; rel=delete ... 3665 1.3.6.1.4.1.2011.10.4.1.1.2.6.
Query Root Alarm Information Query the root alarm for an alarm with the specified ID. Interface URI /fault/alarm/rootAlarm/{id} Access Method HTTP GET Parameters Path parameters id Alarm ID. Long integer type. Required. No default value. Returned Result Status codes • 200 (OK): Success.
Example Query information about the root alarm with ID 324. Request GET http://imc_host:8080/imcrs/fault/alarm/rootAlarm/324 accept: application/xml ... Response HTTP/1.1 200 OK Content-Type: application/xml Link: ; rel=recover Link: ; rel=acknowledge Link: ; rel=delete ... 51 1.3.6.1.4.1.2011.10.4.2.2.2.6.
Query Child Alarms Query and list the child alarms of an alarm with the specified ID. Interface URI /fault/alarm/childAlarm/{id} Access Method HTTP GET Parameters Path parameters id Alarm ID. Long integer type. Required. No default value. Query parameters start The position where the first returned record is located in the whole returned result. Integer type. Optional. The default value is 0. If a negative value is uploaded, the default value is used. size The total number of returned records.
Message body 324 1.3.6.1.4.1.2011.10.4.1.2.2.6.2 3 iMC 94 10.153.88.26 daemon8826 ... http://imc_host:port/imcrs/fault/alarm/324 ...
Query Top N Alarming Devices Query and list top N devices that include the specified alarm level. Interface URI /fault/alarmDevice Access Method HTTP GET Parameters Query parameters alarmLevel Alarm level. Integer type, supporting multiple elements. Optional. No default value. For the valid values, see Query Alarm Levels. size The total number of returned records. Integer type. Optional. The default value is 10. If a negative value is uploaded, the default value is used.
Example Query the top 10 devices with the most number of emergency alarms (level 1). Request GET http://imc_host:8080/imcrs/fault/alarmDevice?alarmLevel=1&size=10 accept: application/xml ... Response HTTP/1.1 200 OK Content-Type: application/xml ... http://imc_host:8080/imcrs/plat/res/device/181 3 1 ...
Query Alarming Enterprises Query and list alarming enterprises. Interface URI /fault/trapEnterprise Access Method HTTP GET Parameters Query parameters total Only the number of records that meet the requirements is returned. Boolean type. Optional. The default value is false. When the value is true, the returned message body is empty, and the Total attribute of the message header returns the number of records that meet the requirements. Returned Result Status codes • 200 (OK): Success.
Example Query and list all alarming enterprises. Request GET http://imc_host:8080/imcrs/fault/trapEnterprise accept: application/xml ... Response HTTP/1.1 200 OK Content-Type: application/xml ... 1.3.6.1.2.1.47.2 Entity MIB http://imc_host:8080/imcrs/fault/trapEvent?trapEnterpriseId=1.3.6.1.2.1.47.2 ...
Query Alarm Events Query and list alarm events. Interface URI /fault/trapEvent Access Method HTTP GET Parameters Query parameters trapEnterpriseId Alarming enterprise ID. String type. Required. No default value. For the valid values, see “Query Alarming Enterprises.” total Only the number of records that meet the requirements is returned. Boolean type. Optional. The default value is false.
Example Query and list the alarm events of the enterprise whose ID is 1.3.6.1.4.1.43. Request GET http://imc_host:8080/imcrs/fault/trapEvent?trapEnterpriseId=1.3.6.1.4.1.43 accept: application/xml ... Response HTTP/1.1 200 OK Content-Type: application/xml ... Message body 1.3.6.1.4.1.43.6.1 3COM_1 1 ...
Query Alarm Categories Query and list the alarm categories. The results include all alarm main categories, sub-categories, and their descriptions. Interface URI /fault/alarmCategory Access Method HTTP GET Returned Result Status codes • 200 (OK): Success.
Elements alarmCategory sub-elements id Alarm category ID, which uniquely identifies an alarm category. Long integer type. baseClass Alarm main category. Long integer type. baseDesc Main category description. String type. subClass Alarm sub-category. Long integer type. subDesc Sub-category description. String type. Example Query and list all alarm categories. Request GET http://imc_host:8080/imcrs/fault/alarmCategory accept: application/xml ... Response HTTP/1.
Query Alarm Levels Query and list the alarm levels. The results include all alarm levels and their descriptions. Interface URI /fault/alarmLevel Access Method HTTP GET Returned Result Status codes • 200 (OK): Success.
Example Query and list all alarm levels. Request GET http://imc_host:8080/imcrs/fault/alarmLevel accept: application/xml ... Response HTTP/1.1 200 OK Content-Type: application/xml ... 1 Critical ...
Query Alarm Source Types Query and list the alarm source types. The results include all alarm source types and their descriptions. Interface URI Interface URI /fault/alarmOriginalType Access Method HTTP GET Returned Result Status codes • 200 (OK): Success.
Example Query and list all alarm source types. Request GET http://imc_host:8080/imcrs/fault/alarmOriginalType accept: application/xml ... Response HTTP/1.1 200 OK Content-Type: application/xml ... 1 Trap ...
Query Alarm Recovery Status Query and list alarm recovery status. The results include the recovery status of all alarms and their descriptions. Interface URI /fault/alarmRecStatus Access Method HTTP GET Returned Result Status codes • 200 (OK): Success.
Example Query and list all alarm recover status. Request GET http://imc_host:8080/imcrs/fault/alarmRecStatus accept: application/xml ... Response HTTP/1.1 200 OK Content-Type: application/xml ... 1 Recovered ...
Query Alarm Acknowledgement Status Query and list alarm acknowledgement status. The results include the acknowledgement status of all alarms and their descriptions. Interface URI /fault/alarmAckStatus Access Method HTTP GET Returned Result Status codes • 200 (OK): Success.
Query Alarm Time Ranges Query and list alarm time ranges. The results include all alarm time ranges and their descriptions. Interface URI /fault/alarmTimeRange Access Method HTTP GET Returned Result Status codes • 200 (OK): Success. Message body 255 All alarms 0 Last 1 hour 1 Last 2 hours ...
Example Query and list all alarm time ranges. Request GET http://imc_host:8080/imcrs/fault/alarmTimeRange accept: application/xml ... Response HTTP/1.1 200 OK Content-Type: application/xml ... 0 Last 1 hour ...
Recover Alarm Recover an alarm with the specified ID. Interface URI /fault/alarm/recover/{id} Access Method HTTP PUT Parameters Path parameters id Alarm ID. Long integer type. Required. No default value. Returned Result Status codes • 204 (No Content): Success. Example Recover the alarm with ID 3665. Request PUT http://imc_host:8080/imcrs/fault/alarm/recover/3665 accept: application/xml ... Response HTTP/1.1 204 No Content ... The message body is empty.
Acknowledge Alarm Acknowledge an alarm with the specified ID. Interface URI /fault/alarm/acknowledge/{id} Access Method HTTP PUT Parameters Path parameters id Alarm ID. Long integer type. Required. No default value. Returned Result Status codes • 204 (No Content): Success. Example Acknowledge the alarm with ID 3665. Request PUT http://imc_host:8080/imcrs/fault/alarm/acknowledge/3665 accept: application/xml ... Response HTTP/1.1 204 No Content ... The message body is empty.
Delete Alarm Delete an alarm with the specified ID. Interface URI /fault/alarm/delete/{id} Access Method HTTP DELETE Parameters Path parameters id Alarm ID. Long integer type. Required. No default value. Returned Result Status codes • 204 (No Content): Success. Example Delete the alarm with ID 3665. Request DELETE http://imc_host:8080/imcrs/fault/alarm/delete/3665 accept: application/xml ... Response HTTP/1.1 204 No Content ... The message body is empty.
Register Send-Alarm-to-Server Event Register the send-alarm-to-server event and filter alarms to be sent with certain criteria. Interface URI /events Access Method HTTP GET Parameters Query parameters type Event type. Integer type. The value is 11, indicating the send-alarm-to-server event. uuid UUID. String type. Uniquely identifies a client. alarmLevel Alarm level. Integer type, supporting multiple elements. Optional. No default value.
Example Reregister the send-alarm-to-server event and send all alarms to the server. Request GET http://imc_host:8080/imcrs/events?uuid=025c4630-7e38-4a70-bb1c-b47c8d446764&type=11 accept: application/xml ... Response HTTP/1.1 202 Accepted Content-Type: application/xml ...
9 Network Syslog Management This set of eAPI commands enables you to query system log and unmanaged device filtering information.
Query Syslog Information Query syslog information with the specified ID. Interface URI /syslog/log/{id} Access Method HTTP GET Returned Result Status codes • 200 (OK): Success. Message body 1>/id> 2011-08-29 16:39:11 12 L07069A 10.153.129.
log sub-elements digest Log digest. String type. repeats Repeat time. Integer type. content Log content. String type. Example Query the detailed information about the syslog with ID 1. Request GET http://imc_host:8080/imcrs/fault/syslog/log/1 accept: application/xml ... Response HTTP/1.1 200 OK Content-Type: application/xml ... 1>/id> 2011-08-29 16:39:11 12 L07069A 10.153.129.
Query Syslog Information List Query the syslog information list. Interface URI /syslog/log/ Access Method HTTP GET Returned Result Status codes • 200 (OK): Success. Message body 1>/id> 2011-08-29 16:39:11 12 L07069A 10.153.129.35 H3C DHCP-SNP 5 dhcp-snooping server guard 3 <182>Oct 12 11:02:52 19.
log sub-elements severity Severity level. Integer type. digest Log digest. String type. repeats Repeat time. Integer type. content Log content. String type. Example Query and list syslogs. The first ten entries are listed by default. Request GET http://imc_host:8080/imcrs/fault/syslog/log/ accept: application/xml ... Response HTTP/1.1 200 OK Content-Type: application/xml ...
Query Unmanaged Device Filtering Rule Status Query the status of the filtering rule for unmanaged devices. The status can be Enabled or Disabled. Interface URI /syslog/filter/currentUnmanagedDeviceRuleState/ Access Method HTTP GET Returned Result Status codes • 200 (OK): Success.
Example Query the status of the filtering rule for unmanaged devices. Request GET http://imc_host:8080/imcrs/syslog/filter/currentUnmanagedDeviceRuleState/ accept: application/xml ... Response HTTP/1.1 200 OK Content-Type: application/xml ...
Query Unmanaged Device Filtering Rule Status List Query the unmanaged device filtering rule status list. Interface URI /syslog/filter/unmanagedDeviceRuleStates/ Access Method HTTP GET Returned Result Status codes • 200 (OK): Success.
Example Query the unmanaged device filtering rule status list. Request GET http://imc_host:8080/imcrs/syslog/filter/unmanagedDeviceRuleStates/ accept: application/xml ... Response HTTP/1.1 200 OK Content-Type: application/xml ...
Modify Unmanaged Device Filtering Rule Status Modify the status of the filtering rule for unmanaged devices. You can switch between the Enabled state and the Disabled state. Interface URI /syslog/filter/currentUnmanagedDeviceRuleState/{id} Access Method HTTP PUT Parameters Path parameters id Status ID. Integer type. No default value. Valid values include 0 and 1. Returned Result Status codes • 204 (No Content): Success.
10 Network Performance Management Network performance management commands enable you to query on network, server, and device performance data and to maintain performance indexes.
Query Summaries Query and list summaries. Interface URI /perf/summary Access Method HTTP GET Parameters None Returned Result Status codes • 200 (OK): Success. Message header HTTP/1.1 200 OK Message body 1 System http://imc_host:8080/imcrs/perf/group/1 ...
Elements summary sub-elements sumId Summary ID. Integer type. sumName Summary name. String type. groupList URI of the index group list. String type.
Example Query and list all summaries. Request GET http://imc_host:8080/imcrs/perf/summary accept: application/xml ... Response HTTP/1.1 200 OK Content-Type: application/xml ... 1 System http://imc_host:8080/imcrs/perf/group/1 ...
Query Index Groups Query and list the performance index groups. Interface URI /perf/group Access Method HTTP GET Parameters None Returned Result Status codes • 200 (OK): Success. Message header HTTP/1.
group sub-elements String type perfTask URI of the index group list. String type. Example Query and list all performance index groups. Request GET http://imc_host:8080/imcrs/perf/group accept: application/xml ... Response HTTP/1.1 200 OK Content-Type: application/xml ...
Query Performance Indexes Query performance indexes with certain criteria. Interface URI /perf/task Access Method HTTP GET Parameters Query parameters name Type name. String type, supporting wildcard characters. Optional. No default value. orderBy The sequencing field of the returned result set. String type. Optional. The default value is taskId. The valid value is taskId. desc Whether or not the result is sequenced in reverse order. Boolean type. Optional. The default value is false.
Elements task sub-elements taskId Index ID. Integer type. taskName Index name. String type. taskDescr Index description. String type. tempId Template ID. String type. alarmOneThresholdFirst Threshold 1 of alarm 1. Double-precision floating-point type. alarmOneThresholdSecond Threshold 2 of alarm 1. The value is not equal to 0 when a range is specified, and is equal to 0 in other cases. Double-precision floating-point type.
Response HTTP/1.1 200 OK Content-Type: application/xml ... 1 Interface Receiving Rate(bits/s) Interface Receiving Rate 2048 1.0E7 0.
Query Single-Device Single-Index Instances Query and list the instances for the specified index on the specified device. Interface URI /perf/monitor Access Method HTTP GET Parameters Query parameters devId Device ID. Long integer type. Required. No default value. For the valid values, see “Query Device Information.” taskId Index ID. Long integer type. Required. No default value. For the valid values, see “Query Performance Indexes.” Returned Result Status codes • 200 (OK): Success.
VLAN sub-elements String type. instanceName Instance name. String type. ipAddress IP address. String type. Example Query the performance summary data with the original data for index ID 1 on the device whose ID is 25. Request GET http://imc_host:port/imcrs/perf/monitor/25,1 accept: application/xml ... Response HTTP/1.1 200 OK Content-Type: application/xml ... z00592z(10.153.88.
Query Single-Index Multi-Device Performance Summary Data Query single-index multi-device performance summary data with certain criteria. Interface URI /perf/summaryData Access Method HTTP GET Parameters Query parameters taskId Index ID. Integer type. Required. No default value. For the valid values, see “Query Performance Indexes.” devId Device ID. Long integer type. Required. No default value. For the valid values, see “Query Device Information.” beginTime Start time. Long integer type. Optional.
Message body 1 Interface Receiving Rate(bits/s) 1 504 1 [interface:InLoopBack0] 0.0 0.0 0.0 0.0 0.0 ....
Response Content-Type: application/xml ... 1 Interface Receiving Rate(bits/s) 1 504 1 [interface:InLoopBack0] 0.0 0.0 0.0 0.0 0.
Query Single-Index Single-Interface Performance Summary Data Query single-index single-interface performance summary data with certain criteria. Interface URI /perf/summaryData/interface Access Method HTTP GET Parameters Query parameters taskId Index ID. Integer type. Required. No default value. For the valid values, see “Query Performance Indexes.” devId Device ID. Integer type. Required. No default value. For the valid values, see “Query Device Information.” beginTime Start time.
Elements perfSummaryData sub-elements taskId Index ID, which uniquely identifies an index. Integer type. taskName Index name. String type. devId Device ID. Long integer type. devName Device name. String type. instId Instance ID. Integer type objIndex Object index. String type. objIndexDesc Object index description (or instance name). String type. taskNameWithUnit Task name including the unit. String type devIP Device IP address. String type. devDisplayName Device name. String type.
Example Query the performance detailed data, the parameters are as follows: the index ID is 1, the device ID is 25, the data granularity is 1, and the object index is 1. Request GET http://imc_host:port/imcrs/perf/summaryData/interface?taskId=1&devId=25&dataGranularity=1&objIndex=2 accept: application/xml ... Response HTTP/1.1 200 OK Content-Type: application/xml ...
Query Single Instance Performance Details Query single-instance performance details with certain criteria. Interface URI /perf/summaryData/detail Access Method HTTP GET Parameters Query parameters taskId Index ID. Integer type. Required. No default value. For the valid values, see Query Performance Indexes. devId Device ID. Integer type. Required. No default value. For the valid values, see Query Devices. beginTime Start time. Long integer type. Optional.
Elements perfSummaryData sub-elements dataVal Data value. Double-precision floating-point type. dataTime Data time. String type. dataTimeStr Data time displayed. String type. dataType Data type. Integer type. minVal Minimum value. Double-precision floating-point type. maxVal Maximum value. Double-precision floating-point type. sumVal Summarized value. Double-precision floating-point type. sumCount Data summary count. Integer type.
Query Single-Index TopN Data Query single-index topN data with certain criteria. Interface URI /perf/topNData Access Method HTTP GET Parameters Query parameters taskId Index ID. Integer type. Required. No default value. For the valid values, see Query Performance Indexes. beginTime Start time. Long integer type. Optional. The value is the seconds counted from 00:00 on January 1, 1970 to the specified time. endTime End time. Long integer type. Optional.
Elements perfTopNData sub-elements taskId Index ID, which uniquely identifies an index. Integer type. devId Device ID. Integer type. instId Instance ID. Integer type. objIndex Object index. String type. objIndexDesc Object index description(or instance name). String type. dataVal Average data value. Double-precision floating-point type. thresholdQuadrant Threshold range. Integer type. alarmLevel Alarm level. Integer type. Example Query and list the top 5 performance data for index with ID 1.
Response HTTP/1.1 200 OK Content-Type: application/xml ... 1 31 611 289407425 [interface:GigabitEthernet5/1/2] 31191.
Add Custom Performance Index Add a custom performance index. Interface URI /perf/task Access Method HTTP POST Message body Added Task 1 10 bps kb/s [index1[2]:interface:1:0] 1.3.6.1.2.1.2.2.1.2 ((1.3.6.1.2.1.2.2.1.10-1.3.6.1.2.1.2.2.1.10')+(1.3.6.1.2.1.2.2.1.16-1.3.6.1.2.1.2.2.1.
Message header If the operation succeeds, the Location field gives the URI of the new resource. The message body is empty. HTTP/1.1 201 Created Location: http://imc_host:port/imcrs/perf/task/1 Example Add an index named test. Request POST http://imc_host:8080/imcrs/perf/task accept: application/xml Content-Type: application/xml; charset=UTF-8 ...
Delete Custom Performance Index Delete a custom performance index with the specified ID. Interface URI /perf/task/delete/{taskId} Access Method HTTP DELETE Parameters Path parameters taskId Index ID. Integer type. Required. No default value. For the valid values, see “Query Performance Indexes.” Returned Result Status codes • 204 (No Content): Success. • 409 (Conflict): Failure. See “Error Codes.” • 410 (Gone): No data is found with the specified ID. Example Delete the custom index with ID 234.
11 Report Management The Report Management commands enable you to query and view history for periodic reports.
Query Periodic Reports Query periodic reports with certain criteria. Interface URI /report/task Access Method HTTP GET Parameters Query parameters TaskName Periodic report name. String type, supporting wildcard characters. Optional. No default value. TemplateName Report template name. String type, supporting wildcard characters. Optional. No default value. TaskType Periodic report type. Integer type. The default value is 1.
reportTask sub-elements Long integer type. templateName Report template name. String type. files URI of the report file list. String type. Example Query and list all periodic reports. Request GET http:/imc_host:8080/imcrs//report/task accept: application/xml ... Response HTTP/1.1 200 OK Content-Type: application/xml ...
Query Periodic Report Details Query detailed information about a periodic report with the specified ID. Interface URI /report/task/detail/{id} Access Method HTTP GET Parameters Path parameters id Periodic report ID. Long integer type. Required. No default value. Returned Result Status codes • 200 (OK): Success.
Example Query information about the periodic report with ID 1. Request GET http://imc_host:8080/imcrs/report/task/detail/1 accept: application/xml ... Response HTTP/1.
Query Periodic Report Histories Query the histories of a periodic report with the specified ID. Interface URI /report/task/file/{id} Access Method HTTP GET Parameters Path parameters id Periodic report ID. Long integer type. Required. No default value. Returned Result Status codes • 200 (OK): Success. Message body 1 20101214.pdf http://localhost:8080/imcrs/report/task/download?taskId=1&fileName=20101214.
Example Query and list the 10th to the 20th history reports for the periodic report with ID 1. Request GET http://imc_host:8080/imcrs/imcrs/report/task/file/1?start=10&size=10 accept: application/xml ... Response HTTP/1.1 200 OK Content-Type: application/xml ... 1 20101222.pdf http://localhost:8080/imcrs/report/task/download?taskId=1&fileName=20101222.
Get History File of a Periodic Report Get the history file of a periodic report with the specified file name and report ID. Interface URI /report/task/download Access Method HTTP GET Parameters Query parameters taskId Periodic report ID. Long integer type. fileName History file name. String type. Returned Result Status codes • 200 (OK): Success. Message body The browser displays the download file dialog box or directly opens the file. Example Get the history file named 20100223.
12 Network Asset Management Network asset management commands enable you to query network assets with specified criteria and to gain details on specific devices.
Query Assets Query network assets with certain criteria. Interface URI /netasset/asset Access Method HTTP GET Parameters Query parameters assetName Asset name. String type, supporting wildcard characters. Optional. No default value. assetDesc Asset description. String type, supporting wildcard characters. Optional. No default value. assetPhyClass Asset type. Long integer type. Optional. No default value. -1 for device. 1 for other. 2 for unknown. 3 for standalone device. 4 for backplane.
Returned Result Status codes • 200 (OK): Success. Message body 27 1001 10.153.89.231 aaa WS-C3750E-24TD - Provisioned 1.3.6.1.4.1.9.12.3.1.3.
netAsset sub-elements Long integer type. -1 for device. 1 for other. 2 for unknown. 3 for standalone device. 4 for backplane. 5 for container. 6 for power module. 7 for fan. 8 for sensor. 9 for module. 10 for port. 11 for stack device. relPos Position serial number of the asset in the parent entity. Long integer type. name Asset name. String type. hardVersion Hardware version. String type. firmwareVersion Firmware version. String type. softVersion Software version. String type.
netAsset sub-elements device Link to device details . String type. asset Link to device details . String type. Example Query and list network assets. Request GET http://imc_host:8080/imcrs/netasset/asset accept: application/xml ... Response HTTP/1.1 200 OK Content-Type: application/xml ... 27 1001 10.153.89.231 aaa WS-C3750E-24TD - Provisioned 1.3.6.1.4.1.9.12.3.1.3.
Query Asset Details Query details about an asset with the specified device ID and asset physical index. Interface URI /netasset/asset/detail Access Method HTTP GET Parameters Query parameters devId Device ID. Long integer type. Required. No default value. phyIndex Asset physical index. Long integer type. Required. No default value. Returned Result Status codes • 200 (OK): Success. Message body 27 1001 10.153.89.
Elements netAsset sub-elements devId Device ID, which uniquely identifies a device. Long integer type. phyIndex Asset physical index. Long integer type. deviceName Device name. String type. deviceIp Device IP address. String type. desc Asset description. String type. vendorType Asset OID. String type. containedIn Physical index of the parent entity. Long integer type. phyClass Asset type. Long integer type. -1 for device. 1 for other. 2 for unknown. 3 for standalone device. 4 for backplane.
netAsset sub-elements cleiCode cleiCode. String type. buildInfo Build information. String type. bom BOM number. String type. boardNum Card number. Integer type. serverDate Time in service. Date/time type. remark Remark. String type. assetNumber Asset number. String type. physicalFlag Physical entity flag. Long integer type. 0 or 1 for no. 2 or 3 for yes. device Link to device details . String type.
Example Query information about the network asset whose device ID is 1 and asset physical index is 1001. Request GET http://imc_host:8080/imcrs/netasset/asset/detail?devId=27&phyIndex=1001 accept: application/xml ... Response HTTP/1.1 200 OK Content-Type: application/xml 27 1001 10.153.89.231 aaa WS-C3750E-24TD - Provisioned 1.3.6.1.4.1.9.12.3.1.3.
13 Network Service Management Network service management commands enable you to query on and manage VLANs, ports, and interfaces.
Query VLANs Query and list VLAN information on the device with certain criteria. Interface URI /vlan Access Method HTTP GET Parameters Query parameters devId Device type ID. Integer type. Required. No default value. start The position where the first returned record is located in the whole returned result. Integer type. Optional. The default value is 0. If a negative value is uploaded, the default value is used. size The total number of returned records. Integer type. Optional.
Message body 1 VLAN 0001 1 2 VLAN 0002 1 3 VLAN 0003 1 4 VLAN 0004 1 5 VLAN 0005 1 6
Example Query and list information about the 10th to the 20th VLAN entries on the device whose ID is 8. Request GET http://imc_host:8080/imcrs/vlan?devId=8&start=10&size=10 accept: application/xml ... Response HTTP/1.1 200 OK Content-Type: application/xml ...
Query VLAN Ports Query and list information about VLAN ports on the device with certain criteria. Interface URI /vlan/{vlanId} Access Method HTTP GET Parameters Query parameters vlanId VLAN ID. Integer type. Required. No default value. devId Device type ID. Integer type. Required. No default value. start The position where the first returned record is located in the whole returned result. Integer type. Optional. The default value is 0. If a negative value is uploaded, the default value is used.
Message body 4227626 4227634 4227642 4227650 4227658 4227666 4227674 4227682 4227690 422
Example Query and list the 11th to the 20th VLAN port entries for the VLAN with ID 1 on the device whose ID is 8. Request GET http://localhost:8080/imcrs/vlan/1?devId=8&start=10&size=10 accept: application/xml ... Response HTTP/1.1 200 OK Content-Type: application/xml ...
Add VLAN Add a VLAN on the device. Interface URI /vlan Access Method HTTP POST Message body 1111 VLAN 1111 Parameters VLAN sub-elements devId Device type ID. Integer type. Required. No default value. vlanId VLAN ID. Integer type. Required. No default value. vlanName VLAN name. String type. Required. No default value. Returned Result Status codes • 201 (Created): Success. • 409 (Conflict): Failure. See “Error Codes.
Example Add a VLAN whose ID is 1111 and name VLAN1111 on the device whose ID is 13. Request POST http://imc_host:8080/imcrs/vlan?devId=13 accept: application/xml ... 1111 VLAN 1111 Response HTTP/1.
Delete VLAN Delete a VLAN from the device. Interface URI /vlan Access Method HTTP DELETE Message body DELETE http://imc_host:8080/imcrs/vlan?devId=33&vlanId=1111 accept: application/xml ... Parameters VLAN sub-elements devId Device type ID. Integer type. Required. No default value. vlanId VLAN ID. Integer type. Required. No default value. Returned Result Status codes • 204 (No Content): Success. • 409 (Conflict): Failure. See “Error Codes.
Change VLAN Name Change the name of a VLAN. Interface URI /vlan Access Method HTTP PUT Message body 1111 VLAN 1111 Parameters Query parameters devId Device type ID. Integer type. Required. No default value. vlanId VLAN ID Integer type. Required. No default value. vlanName VLAN name. String type. Required. No default value. Returned Result Status codes • 204 (No Content): Success. • 409 (Conflict): Failure. See “Error Codes.
Add Port to VLAN Add a port to a VLAN. Interface URI /vlan/{vlanId} Access Method HTTP POST Message body POST http://imc_host:8080/imcrs/vlan/777?devId=33&ifIndex=1538 accept: application/xml ... Parameters VLAN port sub-elements devId Device type ID. Integer type. Required. No default value. vlanId VLAN ID Integer type. Required. No default value. vlanName VLAN name. String type. Required. No default value. Returned Result Status codes • 201 (Created): Success. • 409 (Conflict): Failure.
Example Add the port with index 1538 of the device with ID 33 to the VLAN whose ID is 777. Request POST http://imc_host:8080/imcrs/vlan/777?devId=33&ifIndex=1538 accept: application/xml ... Response HTTP/1.
Remove Port from VLAN Remove a port from a VLAN. Interface URI /vlan/{vlanId} Access Method HTTP DELETE Message body DELETE http://imc_host:8080/imcrs/vlan/777?devId=33&ifIndex=1538 accept: application/xml ... Parameters VLAN port sub-elements devId Device type ID. Integer type. Required. No default value. vlanId VLAN ID Integer type. Required. No default value. vlanName VLAN name. String type. Required. No default value. Returned Result Status codes • 204 (No Content): Success.
Query Access Ports Query and list access ports on the device with certain criteria. Interface URI /vlan/access Access Method HTTP GET Parameters Query parameters devId Device type ID. Integer type. Required. No default value. start The position where the first returned record is located in the whole returned result. Integer type. Optional. The default value is 0. If a negative value is uploaded, the default value is used. size The total number of returned records. Integer type. Optional.
Message body 4227626 1 4227642 1 4227650 1 4227658 1 4227666 1
Elements Access port sub-elements ifIndex Port index, whic
Change PVID of Access Port Change the PVID of an access port. Interface URI /vlan/access Access Method HTTP PUT Message body PUT http://imc_host:8080/imcrs/vlan/access?devId=33&destVlanId=4&ifIndex=1794 accept: application/xml ... Parameters Access port sub-elements devId Device type ID. Integer type. Required. No default value. destVlanId Target VLAN ID. Integer type. Required. No default value. ifIndex Port index, which uniquely identifies a port. Integer type. Required. No default value.
Query Hybrid Ports Query and list hybrid ports on the device with certain criteria. Interface URI /vlan/hybrid Access Method HTTP GET Parameters Query parameters devId Device type ID. Integer type. Required. No default value. start The position where the first returned record is located in the whole returned result. Integer type. Optional. The default value is 0. If a negative value is uploaded, the default value is used. size The total number of returned records. Integer type. Optional.
Message body 4227722 1 false false 4227730 78 false false 4227802 1 false
Example Query and list information about the first five hybrid ports on the device whose ID is 13. Request GET http://imc_host:8080/imcrs/vlan/hybrid?devId=13&start=0&size=5 accept: application/xml ... Response HTTP/1.1 200 OK Content-Type: application/xml ...
Add Hybrid Port Add a hybrid port on the device. Interface URI /vlan/hybrid Access Method HTTP POST Message body POST http://imc_host:8080/imcrs/vlan/hybrid?devId=33 accept: application/xml ... Parameters Hybrid port sub-elements devId Device type ID. Integer type. Required. No default value. ifIndex Port index, which uniquely identifies a port. Integer type.
Message header If the operation succeeds, the Location field gives the URI of the new resource. The message body is empty. HTTP/1.1 201 Created Location: http://imc_host:port/imcrs/vlan/hybrid?devId=33 Example Add a hybrid port on the device whose ID is 33. The port parameters are as follows: ifIndex=2434, pvid=1, tagVlan=4,5, untagVlan=3,7. Request POST http://imc_host:8080/imcrs/vlan/hybrid?devId=33 accept: application/xml ...
Delete Hybrid Port Delete a hybrid port from the device. Interface URI /vlan/hybrid Access Method HTTP DELETE Message body DELETE http://imc_host:8080/imcrs/vlan/hybrid?devId=33&ifIndex=2434 accept: application/xml ... Parameters Hybrid port sub-elements devId Device type ID. Integer type. Required. No default value. ifIndex Port index, which uniquely identifies a port. Integer type. Required. No default value. Returned Result Status codes • 204 (No Content): Success. • 409 (Conflict): Failure.
Modify Hybrid Port Modify the parameters of a hybrid port on the device. Interface URI /vlan/hybrid Access Method HTTP PUT Message body PUT http://imc_host:8080/imcrs/vlan/hybrid?devId=33 accept: application/xml ... Elements Hybrid port sub-elements devId Device type ID. Integer type. Required. No default value. ifIndex Port index, which uniquely identifies a port.
Example Modify a hybrid port on the device whose ID is 33. The new parameters are as follows: ifIndex=2434, pvid=1, tagVlan=4,5, untagVlan=3,7. Request PUT http://imc_host:8080/imcrs/vlan/hybrid?devId=33 accept: application/xml ...
Query Trunk Ports Query and list trunk ports on the device with certain criteria. Interface URI /vlan/trunk Access Method HTTP GET Parameters Query parameters devId Device type ID. Integer type. Required. No default value. start The position where the first returned record is located in the whole returned result. Integer type. Optional. The default value is 0. If a negative value is uploaded, the default value is used. size The total number of returned records. Integer type. Optional.
Message body 4227634 1 1,10 4227698 23 1-1024 4227706 23 1-1024 4227754 56 1-1024 503316850 1 1
Example Query and list information about the first five trunk ports on the device whose ID is 33. Request GET http://imc_host:8080/imcrs/vlan/trunk?devId=13&start=0&size=5 accept: application/xml ... Response HTTP/1.1 200 OK Content-Type: application/xml ...
Add Trunk Port Add a trunk port on the device. Interface URI /vlan/trunk Access Method HTTP POST Message body POST http://imc_host:8080/imcrs/vlan/trunk?devId=33 accept: application/xml ... Parameters Trunk port sub-elements devId Device type ID. Integer type. Required. No default value. ifIndex Port index, which uniquely identifies a port. Integer type. Required. No default value. pvid PVID of the trunk port. Integer type. Required.
Example Add a trunk port on the device whose ID is 33. The port parameters are as follows: ifIndex=2434, pvid=1, allowedVlan=4,7. Request POST http://imc_host:8080/imcrs/vlan/trunk?devId=33 accept: application/xml ... Response HTTP/1.
Delete Trunk Port Delete a trunk port from the device. Interface URI /vlan/trunk Access Method HTTP DELETE Message body DELETE http://imc_host:8080/imcrs/vlan/trunk?devId=33&ifIndex=2434 accept: application/xml ... Parameters Trunk port sub-elements devId Device type ID. Integer type. Required. No default value. ifIndex Port index, which uniquely identifies a port. Integer type. Required. No default value. Returned Result Status codes • 204 (No Content): Success. • 409 (Conflict): Failure.
Modify Trunk Port Modify the parameters of a trunk port on the device. Interface URI /vlan/trunk Access Method HTTP PUT Message body PUT http://imc_host:8080/imcrs/vlan/trunk?devId=33 accept: application/xml ... Elements Trunk port sub-elements devId Device type ID. Integer type. Required. No default value. ifIndex Port index, which uniquely identifies a port. Integer type. Required. No default value. pvid PVID of the trunk port. Integer type.
Query VLAN Interfaces Query and list VLAN interfaces on the device with certain criteria. Interface URI /vlan/vlanif Access Method HTTP GET Parameters Query parameters devId Device type ID. Integer type. Required. No default value. start The position where the first returned record is located in the whole returned result. Integer type. Optional. The default value is 0. If a negative value is uploaded, the default value is used. size The total number of returned records. Integer type. Optional.
Message body 1 true false 10.153.89.12 255.255.255.224 2 true false 12.4.3.2 255.255.255.224 3 true false 10.0.0.1 255.255.255.
Example Query and list information about the first five VLAN interfaces on the device whose ID is 13. Request GET http://localhost:8080/imcrs/vlan/vlanif?devId=13&start=0&size=5 accept: application/xml ... Response HTTP/1.1 200 OK Content-Type: application/xml ... 1 true false 10.153.89.12 255.255.255.
Query a Specific VLAN Interface Query and list information about VLAN interfaces for a VLAN on the device with certain criteria. Interface URI /vlan/vlanif/{vlanId} Access Method HTTP GET Parameters Query parameters vlanId VLAN ID. Integer type. Required. No default value. devId Device type ID. Integer type. Required. No default value. start The position where the first returned record is located in the whole returned result. Integer type. Optional. The default value is 0.
Message body 2 true false 12.4.3.2 255.255.255.224
Elements VLAN interface sub-elements vlanId VLAN ID, which uniquely identifies a VLAN. Integer type. isPrimary Primary IP address or not. Boolean type. enableDHCP Whether or not the IP address is assigned through DHCP. If the value takes true, then the ipAddress and ipMask parameters are empty. Boolean type.
Add VLAN Interface Add a VLAN interface on the device. Interface URI /vlan/vlanif Access Method HTTP POST Message body POST http://imc_host:8080/imcrs/vlan/vlanif?devId=3 accept: application/xml ... Parameters VLAN interface sub-elements vlanId VLAN ID, which uniquely identifies a VLAN. Integer type. Required. No default value. isPrimary Primary IP address or not. Boolean type. Optional.
Example Add a VLAN interface on the device whose ID is 3. The interface parameters are as follows: vlanId=600, ipAddress=1.1.1.1, ipMask=255.0.0.0. Request POST http://imc_host:8080/imcrs/vlan/vlanif?devId=3 accept: application/xml ... Response HTTP/1.
Delete VLAN Interface Delete a VLAN interface from the device. Interface URI /vlan/vlanif Access Method HTTP DELETE Message body DELETE http://imc_host:8080/imcrs/vlan/vlanif?devId=3&vlanId=600&ipAddress=1.1.1.1&ipMask=255.0.0.0 accept: application/xml ... Parameters VLAN interface sub-elements vlanId VLAN ID, which uniquely identifies a VLAN. Integer type. Required. No default value. isPrimary Primary IP address or not. Boolean type. Optional. The default value is true.
14 ACL Management The ACL Management category of commands enables you to query on and manage ACL devices and applications.
Query the Device List of ACL Configuration Query the device list of the specified ACL configuration according to certain conditions. Interface URI /acl/res/aclDevice Access Method HTTP GET Parameters Query parameters deviceName Device name. String type. Optional. No default value. deviceIp Device IP address. String type. Optional. No default value. start The position of the first returned record in the query result set. Integer type. Optional. The default value is 0.
Message body 68 5500-EI(10.153.89.182) 10.153.89.182 3Com S5500-52-PWR-EI 1440 2011-10-52 10:52:47 1 http://imc_host:8080/imcrs/acl/res/acl/68 http://imc_host:8080/imcrs/acl/res/aclUse/68 http://imc_host:8080/imcrs/acl/res/aclTimeRange/68 ...
Example Query basic device information entries 2 through 6 for devices whose IP addresses contain 10. Request GET http://imc_host:8080/imcrs/acl/res/aclDevice/deviceIp=10?start=2&size=4 accept: application/xml ... Response HTTP/1.1 200 OK Content-Type: application/xml ... 74 H3C(10.153.89.195) 10.153.89.
Synchronize ACL Configuration Information for a Device Synchronize ACL configuration information for a device specified by its ID. Interface URI /acl/res/aclDevice/{id}/synchronize Access Method HTTP PUT Parameters Path parameters id Device ID. Long integer type. Required. No default value. Returned Result Status codes • 204(No Content): Success. • 404(Not Found): Failure. • 409(Conflict): Failure. For more information, see “Conventions and Constraints.
Query the ACL Definitions of a Device Query the ACL definitions of a device according to the specified device ID. Interface URI /acl/res/acl/{deviceId} Access Method HTTP GET Parameters Path parameters deviceId Device ID. Long integer type. Required. No default value. Query parameters start The position of the first returned record in the query result set. Integer type. Optional. The default value is 0. If a value smaller than 0 is input, the default value 0 is used.
Message body 1371 68 1 2345 1 2 1 dd 1371 0 http://imc_host:8080/imcrs/acl/res/acl/68,1371 ...
Elements ACL sub-elements aclId ACL ID, which uniquely identifies an ACL. Long integer type.
Example Query basic ACL information entries 2 through ACL 4 on device whose device ID is 25. Request GET http://imc_host:8080/imcrs/acl/res/acl/25?start=2&size=2 accept: application/xml ... Response HTTP/1.1 200 OK Content-Type: application/xml ...
Add ACL on a Device Add an ACL on a device. Interface URI /acl/res/acl Access Method HTTP POST Message body POST http://imc_host:8080/imcrs/acl/res/acl accept: application/xml ... 68 2222 1 2 acl_2222 1 192.168.10.0/255.255.10.10 1 1 ...
ACL sub-elements String type. tmpName Template name. String type. tmpDesc Template description. String type. useFlag Specify the action of adding, deleting, or modifying. Long integer type. ACL rule sub-elements trName Time range name. String type. action Action of the rule. Integer type. ruleDesc Rule description. String type. ruleSeq Rule number. Long integer type. ruleMatchCount Match rule. Long integer type. fragment Fragment. Integer type. logging Logging. Integer type.
ACL rule sub-elements Long integer type. sourcePort2 Source port 2. Long integer type. destPortOper Destination port operator. Long integer type. destPort1 Destination port 1. Long integer type. destPort2 Destination port 2. Long integer type. icmpType ICMP type. Long integer type. icmpCode ICMP value. Long integer type. hpAck HP Ack. Integer type. hpFin HP Fin. Integer type. hpRst HP Rst. Integer type. hpSyn HP Syn. Integer type. hpIgmpType HP IGMP type. Integer type.
ACL rule sub-elements String type. l2ProtocolType Layer 2 protocol type. Long integer type. sourceMacAddr Source MAC address mask. String type. sourceMacWildcard Source MAC address mask. String type. destMacAddr Destination MAC address. String type. destMacMask Destination MAC address mask. String type. ifdesc Interface description. String type. ruleString Rule string. String type. Returned Result Status codes • 201 (Created): Success.
Response HTTP/1.1 201 Created Content-Type: application/xml ... No message body is included. 2. Add an extended ACL with the protocol type being ICMP on the device whose device ID is 68. Request POST http://imc_host:8080/imcrs/acl/res/acl accept: application/xml ... 68 3001 1 3 acl_3001 1 1 192.168.10.
2 192.168.10.0/255.255.10.10 5 10 34 18 1 1 Response HTTP/1.1 201 Created Content-Type: application/xml ... No message body is included. 4. Add an extended ACL with the protocol type being TCP or UDP on the device whose device ID is 68.
Response HTTP/1.1 201 Created Content-Type: application/xml ... No message body is included. 5. Add a Layer 2 ACL on the device whose device ID is 68. Request POST http://imc_host:8080/imcrs/acl/res/acl accept: application/xml ...
Response HTTP/1.1 201 Created Content-Type: application/xml ... No message body is included. 7. Add a user-defined ACL with rule strings on the device whose device ID is 68. Request POST http://imc_host:8080/imcrs/acl/res/acl accept: application/xml ... 68 5002 5 acl_5002 1 12:12:12#12:12:13# Response HTTP/1.
Delete ACL from a Device Delete an ACL from a device. Interface URI /acl/res/acl/{id} Access Method HTTP DELETE Parameters Path parameters id ACL ID. Long integer type. Required. No default value. Returned Result Status codes • 204(No Content): Success. • 409(Conflict): Failure. • 410(Gone): Failure. For more information, see “Conventions and Constraints.” Example Delete ACL 1389 from a device. Request DELETE http://imc_host:8080/imcrs/acl/res/acl/1389 accept: application/xml ...
Query ACL Applications of a Device Query the ACL application list of a device specified by its device ID. Interface URI /acl/res/aclUse/{deviceId} Access Method HTTP GET Parameters Path parameters deviceId Device ID. Long integer type. Required. No default value. Query parameters start The position of the first returned record in the query result set. Integer type. Optional. The default value is 0. If a value smaller than 0 is input, the default value 0 is used.
Message body 10 25 1 1 2222 Ethernet0/0 firewall packet-filter 2222 inbound 0 ...
Elements ACL application sub-elements useId ACL application ID, which uniquely identifies an ACL application. Long integer type. parentId ID of the parent device or task. Long integer type.
Example Query basic ACL application information entries 3 through 6 on device whose device ID is 25. Request GET http://imc_host:8080/imcrs/acl/res/aclUse/25?start=3&size=3 accept: application/xml ... Response HTTP/1.1 200 OK Content-Type: application/xml ...
Add ACL Application on a Device Add an ACL application on a device. Interface URI /acl/res/aclUse Access Method HTTP POST Message body POST http://imc_host:8080/imcrs/acl/res/aclUse accept: application/xml ... 68 1 2001 Ethernet1/0/4 0 Elements ACL application sub-elements useId ACL application ID, which uniquely identifies an ACL application. Long integer type.
Returned Result Status codes • 201 (Created): Success. Example Add an ACL application on the device whose device ID is 68. Request POST http://imc_host:8080/imcrs/acl/res/aclUse accept: application/xml ... 68 1 2001 Ethernet1/0/4 0 Response HTTP/1.1 201 Created Content-Type: application/xml ... No message body is included.
Delete ACL Application from a Device Delete an ACL application specified by its ID from a device. Interface URI /acl/res/aclUse/{id} Access Method HTTP DELETE Parameters Path parameters id ACL application ID. Long integer type. Required. No default value. Returned Result Status codes • 204(No Content): Success. • 409(Conflict): Failure. • 410(Gone): Failure. For more information, see “Conventions and Constraints.” Message header Example Delete ACL application 15 from a device.
Query ACL Time Ranges of a Device Query the ACL time ranges of a device specified by its device ID. Interface URI /acl/res/aclTimeRange/{deviceId} Access Method HTTP GET Parameters Path parameters deviceId Device ID. Long integer type. Required. No default value. Query parameters start The position of the first returned record in the query result set. Integer type. Optional. The default value is 0. If a value smaller than 0 is input, the default value 0 is used. Total number of returned records.
Elements ACL time range sub-elements trId ACL time range ID, which uniquely identifies an ACL time range. Long integer type. parentId ID of the parent device or task. Long integer type. parentType Parent type, which can be device or task. Long integer type. trName Time range name. String type. useFlag Specify the action of adding, deleting, or modifying. Long integer type. aclChildTimeRange Child Time Range Set URI. String type.
Add ACL Time Range on a Device Add an ACL time range on a device. Interface URI /acl/res/aclTimeRange Access Method HTTP POST Message body POST http://imc_host:8080/imcrs/acl/res/aclTimeRange accept: application/xml ...
Returned Result Status codes • 201 (Created): Success. Example Add an ACL time range on the device whose device ID is 68. Request POST http://imc_host:8080/imcrs/acl/res/aclTimeRange accept: application/xml ...
Delete ACL Time Range from a Device Delete an ACL time range specified by its ID from a device. Interface URI /acl/res/aclTimeRange/{id} Access Method HTTP DELETE Parameters Path parameters id ACL time ranges ID. Long integer type. Required. No default value. Returned Result Status codes • 204(No Content): Success. • 409(Conflict): Failure. • 410(Gone): Failure. For more information, see “Conventions and Constraints.” Message header Example Delete ACL time range 15 from a device.
Query Child Time Query the child time ranges of an ACL time range on a device according to the specified device ID and ACL time range ID. Interface URI /acl/res/aclTimeRange/{deviceId},{trId} Access Method HTTP GET Parameters Path parameters deviceId Device ID. Long integer type. Required. No default value. trId ACL time range ID. Long integer type. Required. No default value. Returned Result Status codes • 200(OK): Success.
Elements Child time range sub-elements of of an ACL time range trChildId Child time range ID of an ACL time range, which uniquely identifies a child time range of an ACL time range. Long integer type. aclTimeRangeId ACL time range ID. Long integer type. trChildType Type. Long integer type. trPerDayofweek Period. String type. trStartTime Start time. String type. trEndTime End time. String type. Note: 1. When trChildType=0, the time range type is absolute.
Example Query the child time ranges of ACL time range 80 of the device whose device ID is 25. Request GET http://imc_host:8080/imcrs/acl/res/aclTimeRange/25,80 accept: application/xml ... Response HTTP/1.1 200 OK Content-Type: application/xml ... 244 80 0 2010-04-06 15:12 2010-04-30 15:12 ...
15 Support and other resources Contacting HP For worldwide technical support information, see the HP support website: http://www.hp.
Prerequisites Prerequisites for installing this product include: • IMC v5.1 or higher installed and deployed on your enterprise network or lab environment. Typographic conventions Table 2 Document conventions Convention Element Blue text: Table 2 (page 436) Cross-reference links and email addresses Blue, underlined text: http://www.hp.
Table 3 About the HP IMC documentation set (continued) Category Documents Purposes SQL Server 2005 Installation and Configuration Guide Guides you through installing SQL Server 2005 for IMC. SQL Server 2008 Installation and Configuration Guide Guides you through installing SQL Server 2008 for IMC. SQL Server 2008 R2 Installation Guides you through installing SQL Server 2008 R2 for IMC.
16 Documentation feedback HP is committed to providing documentation that meets your needs. To help us improve the documentation, send any errors, suggestions, or comments to Documentation Feedback (docsfeedback@hp.com). Include the document title and part number, version number, or the URL when submitting your feedback.