Professional Documents
Culture Documents
HP Intelligent Management Center Extended API Guide
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.com/networking/IMC-eAPI.
June 2012
Contents
1 Quick Start..............................................................................................22
Welcome to iMC RESTful Web Services ....................................................................................22
The First iMC-RS Client............................................................................................................22
Preparations......................................................................................................................22
Verify iMC-RS availability....................................................................................................22
Create project...................................................................................................................23
Compile iMC-RS client codes...............................................................................................23
Run codes and view result...................................................................................................23
iMC-RS Security Mechanism.....................................................................................................24
Identification authentication.................................................................................................24
Verify iMC-RS availability....................................................................................................25
2 Client Access...........................................................................................26
Access
Access
Access
Access
Access
3 R&D References........................................................................................27
Interface Categories................................................................................................................27
Interfaces for accessing resources.........................................................................................27
Interfaces for registering and receiving real-time events...........................................................27
Real-Time Event Registration and Receipt....................................................................................27
Event registration...............................................................................................................27
Event receipt.....................................................................................................................28
Java client.........................................................................................................................29
Security control..................................................................................................................29
Conventions and Constraints....................................................................................................29
HTTP methods...................................................................................................................30
Content types and character encoding..................................................................................30
Status codes......................................................................................................................30
Wildcard characters supported in queries.............................................................................31
Data types and ranges.......................................................................................................31
Result set of multi-criteria batch queries..................................................................................31
Error Codes...........................................................................................................................31
FAQ......................................................................................................................................32
4 System Management.................................................................................33
Query All Operators...............................................................................................................34
Interface URI.....................................................................................................................34
Access Method..................................................................................................................34
Returned Result..................................................................................................................34
Example...........................................................................................................................35
Query Individual Operators.....................................................................................................36
Interface URI.....................................................................................................................36
Access Method..................................................................................................................36
Returned Result..................................................................................................................36
Example...........................................................................................................................38
Add Operator........................................................................................................................39
Interface URI.....................................................................................................................39
Access Method..................................................................................................................39
Returned Result..................................................................................................................39
Contents
Example...........................................................................................................................40
Modify Operators...................................................................................................................41
Interface URI.....................................................................................................................41
Access Method..................................................................................................................41
Returned Result..................................................................................................................41
Example...........................................................................................................................42
Delete Operator.....................................................................................................................43
Interface URI.....................................................................................................................43
Access Method..................................................................................................................43
Returned Result..................................................................................................................43
Example...........................................................................................................................43
Query Operator Groups..........................................................................................................44
Interface URI.....................................................................................................................44
Access Method..................................................................................................................44
Returned Result..................................................................................................................44
Example...........................................................................................................................45
Query Operator Group Details.................................................................................................46
Interface URI.....................................................................................................................46
Access Method..................................................................................................................46
Returned Result..................................................................................................................46
Example...........................................................................................................................47
Add Operator Group..............................................................................................................48
Interface URI.....................................................................................................................48
Access Method..................................................................................................................48
Returned Result..................................................................................................................48
Example...........................................................................................................................49
Modify Operator Group..........................................................................................................50
Interface URI.....................................................................................................................50
Access Method..................................................................................................................50
Returned Result..................................................................................................................50
Example...........................................................................................................................51
Delete Operator Group...........................................................................................................52
Interface URI.....................................................................................................................52
Access Method..................................................................................................................52
Returned Result..................................................................................................................52
Example...........................................................................................................................52
Contents
Access Method..................................................................................................................65
Returned Result..................................................................................................................65
Example...........................................................................................................................66
Query Vendor Information List..................................................................................................67
Interface URI.....................................................................................................................67
Access Method..................................................................................................................67
Returned Result..................................................................................................................67
Example...........................................................................................................................68
Query Vendor Information.......................................................................................................69
Interface URI.....................................................................................................................69
Access Method..................................................................................................................69
Example...........................................................................................................................70
Query Device Series Information List..........................................................................................71
Interface URI.....................................................................................................................71
Access Method..................................................................................................................71
Returned Result..................................................................................................................72
Example...........................................................................................................................73
Query Device Series Information...............................................................................................74
Interface URI.....................................................................................................................74
Access Method..................................................................................................................74
Returned Result..................................................................................................................74
Example...........................................................................................................................75
Query Device Model Information List.........................................................................................76
Interface URI.....................................................................................................................76
Access Method..................................................................................................................76
Returned Result..................................................................................................................77
Example...........................................................................................................................78
Query Device Model Information..............................................................................................79
Interface URI.....................................................................................................................79
Access Method..................................................................................................................79
Returned Result..................................................................................................................79
Example...........................................................................................................................80
Add Device............................................................................................................................81
Interface URI.....................................................................................................................81
Access Method..................................................................................................................81
Returned Result..................................................................................................................82
Example...........................................................................................................................83
Synchronize Device.................................................................................................................84
Interface URI.....................................................................................................................84
Access Method..................................................................................................................84
Returned Result..................................................................................................................84
Example...........................................................................................................................84
Manage Device......................................................................................................................85
Interface URI.....................................................................................................................85
Access Method..................................................................................................................85
Returned Result..................................................................................................................85
Example...........................................................................................................................85
Unmanage Device..................................................................................................................86
Interface URI.....................................................................................................................86
Access Method..................................................................................................................86
Returned Result..................................................................................................................86
Example...........................................................................................................................86
Delete Device.........................................................................................................................87
Interface URI.....................................................................................................................87
Access Method..................................................................................................................87
Contents
Returned Result..................................................................................................................87
Example...........................................................................................................................87
Modify Device Label...............................................................................................................88
Interface URI.....................................................................................................................88
Access Method..................................................................................................................88
Returned Result..................................................................................................................88
Example...........................................................................................................................89
Modify System Information.......................................................................................................90
Interface URI.....................................................................................................................90
Access Method..................................................................................................................90
Returned Result..................................................................................................................90
Example...........................................................................................................................91
Modify Login Method..............................................................................................................92
Interface URI.....................................................................................................................92
Access Method..................................................................................................................92
Returned Result..................................................................................................................92
Example...........................................................................................................................93
Modify Device Group..............................................................................................................94
Interface URI.....................................................................................................................94
Access Method..................................................................................................................94
Returned Result..................................................................................................................94
Example...........................................................................................................................95
Modify SNMP Settings............................................................................................................96
Interface URI.....................................................................................................................96
Access Method..................................................................................................................96
Returned Result..................................................................................................................97
Example...........................................................................................................................98
Modify Telnet Settings.............................................................................................................99
Interface URI.....................................................................................................................99
Access Method..................................................................................................................99
Returned Result................................................................................................................100
Example.........................................................................................................................100
Modify SSH Settings.............................................................................................................101
Interface URI...................................................................................................................101
Access Method................................................................................................................101
Returned Result................................................................................................................102
Example.........................................................................................................................103
Modify Polling Interval...........................................................................................................104
Interface URI...................................................................................................................104
Access Method................................................................................................................104
Returned Result................................................................................................................104
Example.........................................................................................................................105
Modify Ping Parameters.........................................................................................................106
Interface URI...................................................................................................................106
Access Method................................................................................................................106
Returned Result................................................................................................................106
Example.........................................................................................................................107
Modify Web Network Management Parameters.......................................................................108
Interface URI...................................................................................................................108
Access Method................................................................................................................108
Returned Result................................................................................................................108
Example.........................................................................................................................109
Query Service Monitoring Information List................................................................................110
Interface URI...................................................................................................................110
Access Method................................................................................................................110
6
Contents
Returned Result................................................................................................................110
Example.........................................................................................................................111
Modify Service Monitoring Information....................................................................................112
Interface URI...................................................................................................................112
Access Method................................................................................................................112
Returned Result................................................................................................................113
Example.........................................................................................................................113
Ping....................................................................................................................................114
Interface URI...................................................................................................................114
Access Method................................................................................................................114
Returned Result................................................................................................................114
Example.........................................................................................................................115
Tracert................................................................................................................................116
Interface URI...................................................................................................................116
Access Method................................................................................................................116
Returned Result................................................................................................................116
Example.........................................................................................................................117
Query Links.........................................................................................................................118
Interface URI...................................................................................................................118
Access Method................................................................................................................118
Returned Result................................................................................................................118
Example.........................................................................................................................119
Query Link Information..........................................................................................................120
Interface URI...................................................................................................................120
Access Method................................................................................................................120
Returned Result................................................................................................................120
Example.........................................................................................................................121
Start Automatic Discovery......................................................................................................122
Interface URI...................................................................................................................122
Access Method................................................................................................................122
Returned Result................................................................................................................123
Example 1......................................................................................................................123
Example 2......................................................................................................................124
Example 3......................................................................................................................124
Stop Automatic Discovery......................................................................................................125
Interface URI...................................................................................................................125
Access Method................................................................................................................125
Returned Result................................................................................................................125
Example.........................................................................................................................125
Query Automatic Discovery Status..........................................................................................126
Interface URI...................................................................................................................126
Access Method................................................................................................................126
Returned Result................................................................................................................126
Example.........................................................................................................................126
Query Automatic Device Discovery Results...............................................................................127
Interface URI...................................................................................................................127
Access Method................................................................................................................127
Returned Result................................................................................................................127
Example.........................................................................................................................128
Query Automatically Discovered Devices.................................................................................129
Interface URI...................................................................................................................129
Access Method................................................................................................................129
Returned Result................................................................................................................129
Example.........................................................................................................................130
Query Device Interface Information.........................................................................................131
Contents
Interface URI...................................................................................................................131
Access Method................................................................................................................131
Returned Result................................................................................................................131
Example.........................................................................................................................132
Query Interface Details..........................................................................................................133
Interface URI...................................................................................................................133
Access Method................................................................................................................133
Returned Result................................................................................................................133
Example.........................................................................................................................135
Bring Up an Interface............................................................................................................136
Interface URI...................................................................................................................136
Access Method................................................................................................................136
Returned Result................................................................................................................136
Example.........................................................................................................................136
Shut Down an Interface.........................................................................................................137
Interface URI...................................................................................................................137
Access Method................................................................................................................137
Returned Result................................................................................................................137
Example.........................................................................................................................137
Query Custom View List.........................................................................................................138
Interface URI...................................................................................................................138
Access Method................................................................................................................138
Returned Result................................................................................................................138
Example.........................................................................................................................139
Query Custom View Information.............................................................................................140
Interface URI...................................................................................................................140
Access Method................................................................................................................140
Returned Result................................................................................................................140
Example.........................................................................................................................141
Add Custom View.................................................................................................................142
Interface URI...................................................................................................................142
Access Method................................................................................................................142
Returned Result................................................................................................................142
Example.........................................................................................................................143
Modify Custom View.............................................................................................................144
Interface URI...................................................................................................................144
Access Method................................................................................................................144
Returned Result................................................................................................................145
Example.........................................................................................................................145
Delete Custom View..............................................................................................................146
Interface URI...................................................................................................................146
Access Method................................................................................................................146
Returned Result................................................................................................................146
Example.........................................................................................................................146
Query Interface Views...........................................................................................................147
Interface URI...................................................................................................................147
Access Method................................................................................................................147
Returned Result................................................................................................................147
Example.........................................................................................................................148
Query Interface View Information...........................................................................................149
Interface URI...................................................................................................................149
Access Method................................................................................................................149
Returned Result................................................................................................................149
Example.........................................................................................................................150
Add Interface View...............................................................................................................151
8
Contents
Interface URI...................................................................................................................151
Access Method................................................................................................................151
Returned Result................................................................................................................151
Example.........................................................................................................................152
Modify Interface View...........................................................................................................153
Interface URI...................................................................................................................153
Access Method................................................................................................................153
Returned Result................................................................................................................154
Example.........................................................................................................................154
Delete Interface View............................................................................................................155
Interface URI...................................................................................................................155
Access Method................................................................................................................155
Returned Result................................................................................................................155
Example.........................................................................................................................155
Query IP Views....................................................................................................................156
Interface URI...................................................................................................................156
Access Method................................................................................................................156
Returned Result................................................................................................................156
Example.........................................................................................................................157
Query IP View......................................................................................................................158
Interface URI...................................................................................................................158
Access Method................................................................................................................158
Returned Result................................................................................................................158
Example.........................................................................................................................159
Export Topology in Visio Format.............................................................................................160
Interface URI...................................................................................................................160
Access Method................................................................................................................160
Returned Result................................................................................................................160
Example.........................................................................................................................161
Query SNMP Template Information List....................................................................................162
Interface URI...................................................................................................................162
Access Method................................................................................................................162
Returned Result................................................................................................................162
Example.........................................................................................................................163
Query SNMP Template Information.........................................................................................164
Interface URI...................................................................................................................164
Access Method................................................................................................................164
Returned Result................................................................................................................164
Example.........................................................................................................................166
Query Telnet Template Information List.....................................................................................167
Interface URI...................................................................................................................167
Access Method................................................................................................................167
Returned Result................................................................................................................167
Example.........................................................................................................................168
Query Telnet Template Information..........................................................................................169
Interface URI...................................................................................................................169
Access Method................................................................................................................169
Returned Result................................................................................................................169
Example.........................................................................................................................170
Query SSH Template Information List.......................................................................................171
Interface URI...................................................................................................................171
Access Method................................................................................................................171
Returned Result................................................................................................................171
Example.........................................................................................................................172
Query SSH Template Information............................................................................................173
Contents
Interface URI...................................................................................................................173
Access Method................................................................................................................173
Returned Result................................................................................................................173
Example.........................................................................................................................174
Query SQL Statements..........................................................................................................175
Interface URI...................................................................................................................175
Access Method................................................................................................................175
Returned Result................................................................................................................175
Example.........................................................................................................................176
6 User Management..................................................................................177
Query Users........................................................................................................................178
Interface URI...................................................................................................................178
Access Method................................................................................................................178
Returned Result................................................................................................................179
Example.........................................................................................................................180
Query User Information.........................................................................................................181
Interface URI...................................................................................................................181
Access Method................................................................................................................181
Returned Result................................................................................................................181
Example.........................................................................................................................182
Add User.............................................................................................................................183
Interface URI...................................................................................................................183
Access Method................................................................................................................183
Returned Result................................................................................................................183
Example.........................................................................................................................184
Modify User.........................................................................................................................185
Interface URI...................................................................................................................185
Access Method................................................................................................................185
Returned Result................................................................................................................186
Example.........................................................................................................................186
Delete User..........................................................................................................................187
Interface URI...................................................................................................................187
Access Method................................................................................................................187
Returned Result................................................................................................................187
Example.........................................................................................................................187
Query User Additional Information Definitions..........................................................................188
Interface URI...................................................................................................................188
Access Method................................................................................................................188
Returned Result................................................................................................................188
Example.........................................................................................................................189
Query User Additional Information Definition...........................................................................190
Interface URI...................................................................................................................190
Access Method................................................................................................................190
Returned Result................................................................................................................190
Example.........................................................................................................................192
Add User Additional Information Definition..............................................................................193
Interface URI...................................................................................................................193
Access Method................................................................................................................193
Returned Result................................................................................................................194
Example 1......................................................................................................................194
Example 2......................................................................................................................195
Modify User Additional Information Definition..........................................................................196
Interface URI...................................................................................................................196
Access Method................................................................................................................196
10
Contents
Returned Result................................................................................................................197
Example.........................................................................................................................197
Delete User Additional Information Definition...........................................................................198
Interface URI...................................................................................................................198
Access Method................................................................................................................198
Returned Result................................................................................................................198
Example.........................................................................................................................198
11
Modify IP Segment...............................................................................................................225
Interface URI...................................................................................................................225
Access Method................................................................................................................225
Returned Result................................................................................................................225
Example.........................................................................................................................226
Release IP Segment...............................................................................................................227
Interface URI...................................................................................................................227
Access Method................................................................................................................227
Returned Result................................................................................................................227
Example.........................................................................................................................227
Automatically Scan IP Segment...............................................................................................228
Interface URI...................................................................................................................228
Access Method................................................................................................................228
Returned Result................................................................................................................228
Example.........................................................................................................................230
Automatically Scan Assigned IP Segment.................................................................................231
Interface URI...................................................................................................................231
Access Method................................................................................................................231
Returned Result................................................................................................................231
Example.........................................................................................................................232
Query IP Addresses..............................................................................................................233
Interface URI...................................................................................................................233
Access Method................................................................................................................233
Returned Result................................................................................................................234
Example.........................................................................................................................235
Assign IP Address.................................................................................................................236
Interface URI...................................................................................................................236
Access Method................................................................................................................236
Returned Result................................................................................................................236
Example.........................................................................................................................237
Release Assigned IP Address..................................................................................................238
Interface URI...................................................................................................................238
Access Method................................................................................................................238
Returned Result................................................................................................................238
Example.........................................................................................................................238
Query Terminal Access Bindings.............................................................................................239
Interface URI...................................................................................................................239
Access Method................................................................................................................239
Returned Result................................................................................................................240
Example.........................................................................................................................240
Query Terminal Access Binding..............................................................................................241
Interface URI...................................................................................................................241
Access Method................................................................................................................241
Returned Result................................................................................................................241
Example.........................................................................................................................242
Automatically Scan Terminal Access Bindings...........................................................................243
Interface URI...................................................................................................................243
Access Method................................................................................................................243
Returned Result................................................................................................................243
Example.........................................................................................................................244
Add Terminal Access Binding.................................................................................................245
Interface URI...................................................................................................................245
Access Method................................................................................................................245
Returned Result................................................................................................................245
Example 1......................................................................................................................246
12
Contents
Example 2......................................................................................................................246
Modify Terminal Access Binding.............................................................................................247
Interface URI...................................................................................................................247
Access Method................................................................................................................247
Returned Result................................................................................................................247
Example.........................................................................................................................248
Delete Terminal Access Binding..............................................................................................249
Interface URI...................................................................................................................249
Access Method................................................................................................................249
Returned Result................................................................................................................249
Example.........................................................................................................................249
Query Switch Access Bindings...............................................................................................250
Interface URI...................................................................................................................250
Access Method................................................................................................................250
Returned Result................................................................................................................251
Example.........................................................................................................................252
Query Switch Access Binding.................................................................................................253
Interface URI...................................................................................................................253
Access Method................................................................................................................253
Returned Result................................................................................................................253
Example.........................................................................................................................254
Automatically Scan Switch Access Bindings..............................................................................255
Interface URI...................................................................................................................255
Access Method................................................................................................................255
Returned Result................................................................................................................255
Example.........................................................................................................................256
Add Switch Access Binding....................................................................................................257
Interface URI...................................................................................................................257
Access Method................................................................................................................257
Returned Result................................................................................................................257
Example 1......................................................................................................................258
Example 2......................................................................................................................258
Modify Switch Access Binding................................................................................................259
Interface URI...................................................................................................................259
Access Method................................................................................................................259
Returned Result................................................................................................................259
Example.........................................................................................................................260
Delete Switch Access Binding.................................................................................................261
Interface URI...................................................................................................................261
Access Method................................................................................................................261
Returned Result................................................................................................................261
Example.........................................................................................................................261
Query IP-to-MAC Address Bindings.........................................................................................262
Interface URI...................................................................................................................262
Access Method................................................................................................................262
Returned Result................................................................................................................262
Example.........................................................................................................................263
Query IP-to-MAC Address Binding..........................................................................................264
Interface URI...................................................................................................................264
Access Method................................................................................................................264
Returned Result................................................................................................................264
Example.........................................................................................................................265
Automatically Scan IP-to-MAC Address Bindings.......................................................................266
Interface URI...................................................................................................................266
Access Method................................................................................................................266
Contents
13
Returned Result................................................................................................................266
Example.........................................................................................................................267
Add IP-to-MAC Address Binding.............................................................................................268
Interface URI...................................................................................................................268
Access Method................................................................................................................268
Returned Result................................................................................................................268
Example.........................................................................................................................269
Delete IP-to-MAC Address Binding..........................................................................................270
Interface URI...................................................................................................................270
Access Method................................................................................................................270
Returned Result................................................................................................................270
Example.........................................................................................................................270
Query Conflict and Unauthorized Access Policy........................................................................271
Interface URI...................................................................................................................271
Access Method................................................................................................................271
Returned Result................................................................................................................271
Example.........................................................................................................................272
Query Unknown Access Policy...............................................................................................273
Interface URI...................................................................................................................273
Access Method................................................................................................................273
Returned Result................................................................................................................273
Example.........................................................................................................................274
Modify Conflict and Unauthorized Access Policy.......................................................................275
Interface URI...................................................................................................................275
Access Method................................................................................................................275
Returned Result................................................................................................................275
Example.........................................................................................................................276
Modify Unknown Access Policy..............................................................................................277
Interface URI...................................................................................................................277
Access Method................................................................................................................277
Returned Result................................................................................................................278
Example.........................................................................................................................278
Contents
Interface URI...................................................................................................................291
Access Method................................................................................................................291
Returned Result................................................................................................................291
Example.........................................................................................................................292
Query Alarming Enterprises...................................................................................................293
Interface URI...................................................................................................................293
Access Method................................................................................................................293
Returned Result................................................................................................................293
Example.........................................................................................................................294
Query Alarm Events..............................................................................................................295
Interface URI...................................................................................................................295
Access Method................................................................................................................295
Returned Result................................................................................................................295
Example.........................................................................................................................296
Query Alarm Categories.......................................................................................................297
Interface URI...................................................................................................................297
Access Method................................................................................................................297
Returned Result................................................................................................................297
Example.........................................................................................................................298
Query Alarm Levels...............................................................................................................299
Interface URI...................................................................................................................299
Access Method................................................................................................................299
Returned Result................................................................................................................299
Example.........................................................................................................................300
Query Alarm Source Types....................................................................................................301
Interface URI...................................................................................................................301
Access Method................................................................................................................301
Returned Result................................................................................................................301
Example.........................................................................................................................302
Query Alarm Recovery Status.................................................................................................303
Interface URI...................................................................................................................303
Access Method................................................................................................................303
Returned Result................................................................................................................303
Example.........................................................................................................................304
Query Alarm Acknowledgement Status....................................................................................305
Interface URI...................................................................................................................305
Access Method................................................................................................................305
Returned Result................................................................................................................305
Query Alarm Time Ranges.....................................................................................................306
Interface URI...................................................................................................................306
Access Method................................................................................................................306
Returned Result................................................................................................................306
Example.........................................................................................................................307
Recover Alarm......................................................................................................................308
Interface URI...................................................................................................................308
Access Method................................................................................................................308
Returned Result................................................................................................................308
Example.........................................................................................................................308
Acknowledge Alarm.............................................................................................................309
Interface URI...................................................................................................................309
Access Method................................................................................................................309
Returned Result................................................................................................................309
Example.........................................................................................................................309
Delete Alarm........................................................................................................................310
Interface URI...................................................................................................................310
Contents
15
Access Method................................................................................................................310
Returned Result................................................................................................................310
Example.........................................................................................................................310
Register Send-Alarm-to-Server Event.........................................................................................311
Interface URI...................................................................................................................311
Access Method................................................................................................................311
Returned Result................................................................................................................311
Example.........................................................................................................................312
Contents
Example.........................................................................................................................332
Query Single-Index Multi-Device Performance Summary Data.....................................................333
Interface URI...................................................................................................................333
Access Method................................................................................................................333
Returned Result................................................................................................................333
Example.........................................................................................................................334
Query Single-Index Single-Interface Performance Summary Data................................................336
Interface URI...................................................................................................................336
Access Method................................................................................................................336
Returned Result................................................................................................................336
Example.........................................................................................................................338
Query Single Instance Performance Details..............................................................................339
Interface URI...................................................................................................................339
Access Method................................................................................................................339
Returned Result................................................................................................................339
Example.........................................................................................................................340
Query Single-Index TopN Data..............................................................................................341
Interface URI...................................................................................................................341
Access Method................................................................................................................341
Returned Result................................................................................................................341
Example.........................................................................................................................342
Add Custom Performance Index..............................................................................................344
Interface URI...................................................................................................................344
Access Method................................................................................................................344
Returned Result................................................................................................................344
Example.........................................................................................................................345
Delete Custom Performance Index...........................................................................................346
Interface URI...................................................................................................................346
Access Method................................................................................................................346
Returned Result................................................................................................................346
Example.........................................................................................................................346
11 Report Management..............................................................................347
Query Periodic Reports..........................................................................................................348
Interface URI...................................................................................................................348
Access Method................................................................................................................348
Returned Result................................................................................................................348
Example.........................................................................................................................349
Query Periodic Report Details.................................................................................................350
Interface URI...................................................................................................................350
Access Method................................................................................................................350
Returned Result................................................................................................................350
Example.........................................................................................................................351
Query Periodic Report Histories..............................................................................................352
Interface URI...................................................................................................................352
Access Method................................................................................................................352
Returned Result................................................................................................................352
Example.........................................................................................................................353
Get History File of a Periodic Report........................................................................................354
Interface URI...................................................................................................................354
Access Method................................................................................................................354
Returned Result................................................................................................................354
Example.........................................................................................................................354
17
Interface URI...................................................................................................................356
Access Method................................................................................................................356
Returned Result................................................................................................................357
Example.........................................................................................................................359
Query Asset Details..............................................................................................................360
Interface URI...................................................................................................................360
Access Method................................................................................................................360
Returned Result................................................................................................................360
Example.........................................................................................................................363
Contents
Example.........................................................................................................................380
Query Hybrid Ports...............................................................................................................381
Interface URI...................................................................................................................381
Access Method................................................................................................................381
Returned Result................................................................................................................381
Example.........................................................................................................................383
Add Hybrid Port...................................................................................................................384
Interface URI...................................................................................................................384
Access Method................................................................................................................384
Returned Result................................................................................................................384
Example.........................................................................................................................385
Delete Hybrid Port.................................................................................................................386
Interface URI...................................................................................................................386
Access Method................................................................................................................386
Returned Result................................................................................................................386
Example.........................................................................................................................386
Modify Hybrid Port...............................................................................................................387
Interface URI...................................................................................................................387
Access Method................................................................................................................387
Returned Result................................................................................................................387
Example.........................................................................................................................388
Query Trunk Ports.................................................................................................................389
Interface URI...................................................................................................................389
Access Method................................................................................................................389
Returned Result................................................................................................................389
Example.........................................................................................................................391
Add Trunk Port.....................................................................................................................392
Interface URI...................................................................................................................392
Access Method................................................................................................................392
Returned Result................................................................................................................392
Example.........................................................................................................................393
Delete Trunk Port...................................................................................................................394
Interface URI...................................................................................................................394
Access Method................................................................................................................394
Returned Result................................................................................................................394
Example.........................................................................................................................394
Modify Trunk Port.................................................................................................................395
Interface URI...................................................................................................................395
Access Method................................................................................................................395
Returned Result................................................................................................................395
Example.........................................................................................................................395
Query VLAN Interfaces.........................................................................................................396
Interface URI...................................................................................................................396
Access Method................................................................................................................396
Returned Result................................................................................................................396
Example.........................................................................................................................398
Query a Specific VLAN Interface ...........................................................................................399
Interface URI...................................................................................................................399
Access Method................................................................................................................399
Returned Result................................................................................................................399
Example.........................................................................................................................400
Add VLAN Interface..............................................................................................................401
Interface URI...................................................................................................................401
Access Method................................................................................................................401
Returned Result................................................................................................................401
Contents
19
Example.........................................................................................................................402
Delete VLAN Interface...........................................................................................................403
Interface URI...................................................................................................................403
Access Method................................................................................................................403
Returned Result................................................................................................................403
Example.........................................................................................................................403
14 ACL Management.................................................................................404
Query the Device List of ACL Configuration..............................................................................405
Interface URI...................................................................................................................405
Access Method................................................................................................................405
Returned Result................................................................................................................405
Example.........................................................................................................................407
Synchronize ACL Configuration Information for a Device............................................................408
Interface URI...................................................................................................................408
Access Method................................................................................................................408
Returned Result................................................................................................................408
Example.........................................................................................................................408
Query the ACL Definitions of a Device.....................................................................................409
Interface URI...................................................................................................................409
Access Method................................................................................................................409
Returned Result................................................................................................................409
Example.........................................................................................................................411
Add ACL on a Device...........................................................................................................412
Interface URI...................................................................................................................412
Access Method................................................................................................................412
Returned Result................................................................................................................415
Example.........................................................................................................................415
Delete ACL from a Device......................................................................................................420
Interface URI...................................................................................................................420
Access Method................................................................................................................420
Returned Result................................................................................................................420
Example.........................................................................................................................420
Query ACL Applications of a Device.......................................................................................421
Interface URI...................................................................................................................421
Access Method................................................................................................................421
Returned Result................................................................................................................421
Example.........................................................................................................................423
Add ACL Application on a Device..........................................................................................424
Interface URI...................................................................................................................424
Access Method................................................................................................................424
Returned Result................................................................................................................425
Example.........................................................................................................................425
Delete ACL Application from a Device.....................................................................................426
Interface URI...................................................................................................................426
Access Method................................................................................................................426
Returned Result................................................................................................................426
Example.........................................................................................................................426
Query ACL Time Ranges of a Device.......................................................................................427
Interface URI...................................................................................................................427
Access Method................................................................................................................427
Returned Result................................................................................................................427
Example.........................................................................................................................428
Add ACL Time Range on a Device..........................................................................................429
Interface URI...................................................................................................................429
20
Contents
Access Method................................................................................................................429
Returned Result................................................................................................................430
Example.........................................................................................................................430
Delete ACL Time Range from a Device.....................................................................................431
Interface URI...................................................................................................................431
Access Method................................................................................................................431
Returned Result................................................................................................................431
Example.........................................................................................................................431
Query Child Time.................................................................................................................432
Interface URI...................................................................................................................432
Access Method................................................................................................................432
Returned Result................................................................................................................432
Example.........................................................................................................................434
16 Documentation feedback.......................................................................438
Contents
21
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.
Jersey Client
Android SDK
This document covers the access method based on Java only, but not other languages or systems.
R & D References
Describes the iMC-RS design ideas, conventions, and development constraints.
Preparations
Make sure you have finished the following tasks:
1. Install and deploy iMC 5.1 or a later version, run iMC, and perform device auto discovery.
2. Download and install Eclipse 3.6 or a later version.
3. Download and install JDK 6 or JRE 6.
4. Download Apache HttpClient 4.1 or a later version, and decompress it to the local host.
22
Quick Start
1.
2.
3.
Create project
Launch the Eclipse environment and create a new project.
1. Select File > New > Java Project.
2. Type the project name such as "MyRestClient" and click Next.
3. Click the Libraries tab, click Add External JARs, and add the decompressed Apache HttpClient
files httpcore-4.1.jar, httpclient-4.1.jar, and commons-logging-1.1.1.jar
to the project.
4. Click Finish.
org.apache.http.HttpResponse;
org.apache.http.auth.AuthScope;
org.apache.http.auth.UsernamePasswordCredentials;
org.apache.http.client.methods.HttpGet;
org.apache.http.impl.client.DefaultHttpClient;
org.apache.http.util.EntityUtils;
In the previous codes, "imc_host" and "8080" represent the iMC server address and port number,
and the two "admin" strings represent the login username and password.
23
The output indicates that you have successfully accessed the device query interface and get the
first ten device entries in XML format.
Identity authentication: iMC-RS offers a simple and effective identify authentication mode
called HTTP digest authentication (see RFC 2617). It does not transfer passwords on the
network and thus effectively protects the REST user passwords. This authentication process is
required, or in other words, all attempts to access iMC-RS must pass authentication first.
Secure communication: To ensure data encryption and secure communication, iMC-RS can
be accessed through HTTPS when necessary.
Password protection: With this feature, iMC-RS denies access from a client for a minute by
giving a 403 Forbidden error message if the client continuously enters an incorrect username
or password five times.
Identification authentication
An iMC operator is used for iMC-RS identity authentication, if the operator is a member of the
default administrator group, or a group with administrator rights and with the RESTful Web Services
Call option selected (Figure 1).
Figure 1 Add Operator Group dialog box
In addition, iMC-RS identity authentication and privilege restrictions are different from those of the
iMC system in the following ways:
24
iMC-RS identity authentication does not check the ACLs and password control policy of the
operator.
iMC operators use the "simple password authentication" method to access iMC-RS. If an
operator uses RADIUS or LDAP authentication, the operator must successfully log in to iMC
first and then can pass iMC-RS authentication. If the authentication password is changed, the
Quick Start
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.
The admin operator can always access iMC-RS.
25
2 Client Access
The IMC Extended API (eAPI) provides a number of Java test code examples based on common
web services:
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.
26
Client Access
3 R&D References
This section provides information about the following topics:
Interface categories
Error codes
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.
Event registration
iMC-RS receives an event registration request in GET method.
URL url = new URL("http://imc_host:8080/imcrs/events?type=type_code");
HttpURLConnection conn = (HttpURLConnection) url.openConnection();
conn.setRequestMethod("GET");
conn.setRequestProperty("accept", "application/xml");
if (conn.getResponseCode() == 202) {
// Registration succeeds. Start to receive the event notification.
BufferedReader reader = new BufferedReader(new InputStreamReader(conn.getInputStream()));
......
}
Interface Categories
27
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. The query criteria must include the "type" parameter, which defines the type of the message
to be registered. You can set other parameters (see related API references) to narrow down
the query results.
4. If the registration succeeds, the server returns the 202 (Accepted) status code, and maintains
the HTTP connection for transmitting subsequent notifications. If the registration fails, the server
returns other status codes and closes the HTTP connection.
The server can return the following status codes for event registration:
202 (Accepted): Registration succeeded. The server maintains the HTTP connection for
transmitting subsequent messages.
400 (Bad Request): Invalid query parameters. The server returns this status code if the registration
request message does not include the "type" parameter, or the event type specified by the
parameter is not supported.
403 (Forbidden): The client denied registration of the message. For more information, see the
Security Control section.
405 (Method Not Allowed): The HTTP method of the registration request is not GET. The iMC-RS
framework supports only the GET type message in event registration and notification.
406 (Not Acceptable): Unsupported content type (which is the "accept" message header in
the registration request). The iMC-RS framework supports only the following content types in
event registration and notification: application/xml and application/json.
Event receipt
When the server generates a registration event, it pushes the event in real time to the corresponding
client by using the existing HTTP connection. The following is an example.
......
if (conn.getResponseCode() == 202) {
// Registration succeeds. Start to receive the event notification.
BufferedReader reader = new BufferedReader(new InputStreamReader(conn.getInputStream()));
String line = null;
StringBuilder sb = new StringBuilder();
while ((line = br.readLine()) != null) {
if (line.length() != 0) {
// The event message is not over. Continue to read the message.
sb.append(line);
} else {
// Read a complete event. Process the event.
String str = sb.toString();
sb.delete(0, sb.length());
if (!"#HEART_BEAT".equals(str)) {
// The event is not a heartbeat event. Process the event message.
......
}
}
}
......
}
Notes:
28
R&D References
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.
Java client
If you use Java to access iMC-RS real-time events, integrate file EventClient.java into your
source codes, and register or receive iMC-RS real-time event notifications with the following method:
EventClient client = new EventClient(
new URL("http://localhost:8080/imcrs/events?type=1"), SampleEntity.class) {
@Override
public void onMessage(SampleEntity entity) {
// Receive a real-time event. Process the event.
......
}
@Override
public void onError(Throwable t) {
// An error occurs (such as network connection interrupts) when the real-time event is received.
You can call client.start () again as needed.
......
}
};
// Start event registration and receipt.
if (client.start()) {
// Successfully connect to the server. Start to receive events.
......
// Stop receiving events from the server as needed.
client.stop();
}
Security control
The iMC-RS event notification framework maintains a long connection with the client for receiving
events in real time, and uses a security control mechanism different from iMC-RS security mechanism.
When the event notification framework registers or receives an event, it does not authenticate the
identity of the operator that uses the client. Instead, the framework implements iMC-RS event access
control based on the client addresses.
By default, iMC-RS only allows the server (127.0.0.1) to access iMC-RS events. To allow a client
to access iMC-RS events, open file web\apps\imcrs\WEB-INF\web.xml in the iMC installation
path, and locate the following contents:
<servlet>
<servlet-name>Events Registration</servlet-name>
<servlet-class>com.h3c.imc.rs.ext.event.EventRegistrationServlet</servlet-class>
<init-param>
<param-name>com.h3c.imc.rs.ext.event.config.PermittedRemoteAddrRegex</param-name>
<param-value>127.0.0.1</param-value>
</init-param>
</servlet>
Replace 127.0.0.1 with the client address expressed in a regular expression. For more information,
see Javadoc in java.util.regex.Pattern.
If the client address is not allowed to access iMC-RS events, the server returns the 403 (Forbidden)
status code.
29
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.
Status codes
The HTTP status codes returned by iMC-RS interfaces comply with the recommendations in RESTful
web services.
Single object query (GET method): 200 (OK) for success, 204 (No Content) for failure caused
by non-existent object.
Add (POST method): 201 (Created) for success and returning link to the object, 204 (No
Content) for success without returning any content.
Modify (PUT method): 204 (No Content) for success without returning any content, 404 (Not
Found) for failure caused by non-existent object.
Delete (DELETE method): 204 (No Content) for success without returning any content, 410
(Gone) for failure caused by non-existent object.
When performing operations, you may encounter errors due to service restrictions. For example,
if you try to delete an online operator, the server will return the status code 409 (Conflict), the
Error-Code attribute, and the Error-Message attribute. For more information about the error codes
and their descriptions, see Error Codes.
In addition, you may encounter errors that are caused by error encoding or iMC server errors. The
following describes these errors, their status codes, and solutions:
30
Non-existent service specified by the URI: 404 (Not Found). Check the URI against the API
documentation and correct the URI. Note that when this error occurs, the returned packet
contains the message body in HTML format. When the object of the GET or PUT method does
not exist, the returned packet does not contain any message body, though its status code is
404 (Not Found).
Unsupported method: 405 (Method Not Allowed). Check the API documentation or use the
OPTIONS method to get the supported methods.
Unsupported content type: 406 (Not Acceptable). Set a valid content type (accept message
header) according to the API documentation.
Illegitimate parameters carried in the requested URI (such as the type cannot be changed):
400 (Bad Request). Check the API documentation for parameter restrictions.
R&D References
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.
Error Codes
If an HTTP response message gives the 409 (Conflict) status code, the Error-Code and Error Message
attributes in the message header show the iMC error code and error description. For example:
HTTP/1.1 409 Conflict
Error-Code: 4
Error-Message: Database access error.
Table 1 shows all error codes and their descriptions that you might encounter in iMC-RS.
Table 1 Error codes and descriptions
Query Parameters
3 Operation timeout.
The server performance may be insufficient. Please check the data later to see if the operation succeeds.
4 Database error.
Please check the database status.
2003 Database error.
2013 Failed to access the device.
Error Codes
31
FAQ
This section describes the problems you may encounter when developing iMC-RS, and provides
solutions to them.
How to query the services that iMC-RS offers?
In the API documents, you can query the services based on the deployed components. Or you can
view the list of all services at http://imc_host:port/imcrs/application.wadl.
Explain the wildcard characters and special characters used in multi-criteria queries.
In multi-criteria queries, some string-type criteria support wildcard characters asterisk (*) and
question mark (?). The former matches zero or more characters, and the latter matches a single
character. A query without any wildcard character specified returns an exact match. When
performing a fuzzy match, note the special characters reserved in the database. For example,
square brackets ([ ]) in SQL server databases. If the query criteria contain special characters, you
may obtain undesired results. To prevent such problems, escape special characters with the method
described in the corresponding database document
How to enable the call logs feature on iMC-RS?
You can query and view call logs in iMC-RS. To ensure performance, the call logs feature is disabled
by default. You can enable this feature with the following method:
Open file client\conf\log4j.properties in the iMC installation path, locate the
log4j.appender.IMCRS.Threshold string, and change its value from INFO to DEBUG or
TRACE. In the DEBUG level, iMC-RS records the header of each request or response message that
is called. In the TRACE level, iMC-RS records both the header and the message body. iMC-RS
saves the call logs in file client\log\imcrs.log in the iMC installation path.
32
R&D References
4 System Management
This section provides eAPI commands that enable you to manage the users who can operate your
IMC system. It includes descriptions of the following commands:
Add Operator
Modify Operators
Delete Operator
33
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
orderBy
desc
total
Returned Result
Status codes
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
34
System Management
Message body
<list>
<operator>
<id>1</id>
<name>admin</name>
<fullName>admin</fullName>
<authType>0</authType>
<desc>Super administrator that has all privileges.</desc>
<link href=http://localhost:8080/imcrs/plat/operator/1 op=GET rel=self/>
</operator>
. . .
</list>
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.q 200 OK
Content-Type: application/html
. . .
<list>
<operator>
<id>1</id>
<name>admin</name>
<fullName>admin</fullName>
<authType>O</authType>
<desc>Super administrator that has all privileges.</desc>
<link href=http://localhost:8080/imcrs/plat/operator/1 op=GET rel=self/>
</operator>
. . .
</list>
35
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
Message header
HTTP/1.1 200 OK
Message body
<operator>
<id>1</id>
<name>admin</name>
<fullName>admin</fullName>
<desc>Super admin who has all the privileges.</desc>
<authType>0</authType>
<operatorGroup>http://localhost:8080/imcrs/plat/operatorGroup/1</operatorGroup>
</operator>
Element description
Operator elements
id
Operator ID.
Long integer type. It is not required when you add an operator and is required when you
modify an operator.
name
fullName
desc
Operator description.
String type. It is optional when you add or modify an operator.
36
System Management
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.
operatorGroup
OperatorGroup ID.
Long integer type. It is required when you add or modify an operator.
default Acl
operatorAclList
operatorAcl
operatorGroup
37
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
. . .
<operator>
<id>1</id>
<id>1</id>
<name>admin</name>
<fullName>admin</fullName>
<authType>O</authType>
<desc>Super administrator that has all privileges.</desc>
<link href=http://localhost:8080/imcrs/plat/operatorGroup/1</operator>
</operator>
38
System Management
Add Operator
Add an operator with specified information.
Interface URI
/plat/operator
Access Method
HTTP
POST
Message body
<operator>
<name>cccc</name>
<fullName>cccc</fullName>
<authType>0</authType>
<password>cccc</password>
<sessionTimeout>10</sessionTimeout>
<operatorGroupId>1</operatorGroupId>
<desc>cccc</desc>
<defaultAcl>0</defaultAcl>
<operatorAclList>
<operatorAcl>
<startIp>10.153.89.1</startIp>
<endIp>10.153.89.2</endIp>
<accessType>0</accessType>
<desc>allow 10.153.89.110.153.89.2</desc>
<aclOrder>1</aclOrder>
</operatorAcl>
</operatorAclList>
</operator>
Element description
For meanings of fields in the message body, see Query All Operators (page 34).
Returned Result
Status codes
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/operator/4
Add Operator
39
Example
Add an operator.
Request
POST http://imic_host:8080/imcrs/plat/operator
accept: application/xml
Content-Type: application/xml; charset=UTF-8
. . .
<operator>
<name>cccc</name>
<fullName>cccc</fullName>
<authType>0</authType>
<password>cccc</password>
<sessionTimeout>10</sessionTimeout>
<operatorGroupId>1</operatorGroupId>
<desc>cccc</desc>
<defaultAcl>0</defaultAcl>
<operatorAclList>
<operatorAcl>
<startIp>10.153.89.1</startIp>
<endIp>10.153.89.2</endIp>
<accessTyp>e0</accessType>
<desc>allow 10.153.89.110.153.89.2</desc>
<aclOrder>1</aclOrder>
</operatorAcl>
<operatorAcl>
<startIp>10.153.89.3</startIp>
<endIp>10.153.89.4</endIp>
<desc>block 10.153.89.310.153.89.4</desc>
<aclOrder>2</aclOrder
</operatorAcl>
</operatorAclList>
</operator>
Response
HTTP/1.1 201 Created
Location: http://localhost:8080/imcrs/plat/operator/4
40
System Management
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
<operator>
<fullName>cccccc</fullName>
<authType>1</authType>
<sessionTimeout>20</sessionTimeout>
<operatorGroupId>2</operatorGroupId>
<desc>cccccc</desc>
<defaultAcl>1</defaultAcl>
<operatorAclList>
<operatorAcl>
<startIp>10.153.89.5</startIp>
<endIp>10.153.89.6</endIp>
<accessType>0</accessType>
<desc>allow 10.153.89.510.153.89.6</desc>
<aclOrder>1</aclOrder>
</operatorAcl>
<operatorAcl>
<startIp>10.153.89.7</startIp>
<endIp>10.153.89.8</endIp>
<accessType>1</accessType>
<desc>block 10.153.89.710.153.89.8</desc>
<aclOrder>2</aclOrder>
</operatorAcl>
</operatorAclList>
</operator>
Element remarks
For descriptions of the fields in the message body, see Query Operator Groups (page 44).
Returned Result
Status codes
Modify Operators
41
Example
Modify the operator whose ID is 2.
Request
PUT http://imc_host:8080/imcrs/plat/operator/2
accept: application/xml
. . .
<operator>
<fullName>cccccc</fullName>
<authType>1</authType>
<sessionTimeout>20</sessionTimeout>
<operatorGroupId>2</operatorGroupId>
<desc>cccccc</desc>
<defaultAcl>1</defaultAcl>
<operatorAclList>
<operatorAcl>
<startIp>10.153.89.5</startIp>
<endIp>10.153.89.6</endIp>
<accessType>0</accessType>
<desc>allow 10.153.89.510.153.89.6</desc>
<aclOrder>1</aclOrder>
</operatorAcl>
<operatorAcl>
<startIp>10.153.89.7</startIp>
<endIp>10.153.89.8</endIp>
<accessType>1</accessType>
<desc>block 10.153.89.710.153.89.8</desc>
<aclOrder>2</aclOrder>
</operatorAcl>
</operatorAclList>
</operator>
Response
HTTP/1.1 204 No Content
. . .
42
System Management
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
Message header
HTTP/1.1 204 No Content
. . .
Example
Delete the operator with ID 4.
Request
DELETE http://imc_host:8080/imcrs/plat/operator/4
accept: application/xml
. . .
Response
HTTP/1.1 204 No Content
Delete Operator
43
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
orderBy
desc
total
Returned Result
Status codes
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
44
System Management
Message body
<list>
<operatorGroup>
<id>1</id>
<groupName>Administrator group</groupName>
<groupDesc>The group of operators that have the administrative rights.</groupDesc>
<roleDesc>Administrator</roleDesc>
<link href=http://localhost:8080/imcrs/plat/operatorGroup/1 op=GET rel=self />
</operatorGroup>
. . .
</list>
Elements
For meanings of the fields in the message body, see Query All Operators (page 34).
Example
Query and list operator groups.
Request
GET http://imc+host:8080/imcrs/plat/operatorGroup
accept: application/xml
. . .
Response
HTTP/1.1 200 OK
Content-Type: application/xml
. . .
<list>
<operatorGroup>
<id>1</id>
<groupName>Administrator group</groupName>
<groupDesc>The group of operators that have the administrative rights.</groupDesc>
<roleDesc>Administrator</roleDesc>
<link href=http://localhost:8080/imcrs/plat/operatorGroup/1 op=GET rel=self />
</operatorGroup>
. . .
</list>
45
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
Message header
HTTP/1.1 200 OK
Message body
<operatorGroup>
<id>1</id>
<groupName>Administrator group</groupName>
<groupDesc>The group of operators that have the administrative rights.</groupDesc>
<roleDesc>Administrator</roleDesc>
<role>http://localhost:8080/imcrs/plat/role/1</role>
<privileges>http://localhost:8080/imcrs/plat/operatePrivilege?groupId=1</privileges>
</operatorGroup>
Elements
operatorGroup sub-elements
id
Operator ID.
Long integer type. This element is not needed when you add an operator group and it is required
when you modify an operator group.
groupName
groupDesc
roleDesc
Role description.
String type. This element is optional when you add or modify an operator group and is returned in
the response message for queries.
roleId
46
System Management
Role ID.
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. The value is 1 for the function privilege level
and is 1 for the component privilege level (privilege named by the component ID). Integer type.
Required.
role
Role link.
Function link. This element is not needed when you add or modify an operator group and is returned
in the response message for queries.
privileges
Example
Query information about the operator group with ID 1.
Request
GET http://imc_host:8080/imcrs/plat/operatorGroup/1
accept: application/xml
. . .
Response
HTTP/1.1 200 OK
Content-Type: application/xml
. . .
<operatorGroup>
<id>1</id>
<groupName>Administrator group</groupName>
<groupDesc>The group of operators that have the administrative rights.</groupDesc>
<roleDesc>Administrator</roleDesc>
<role>http://localhost:8080/imcrs/plat/role/1</role>
<privileges>http://localhost:8080/imcrs/plat/operatePrivilege?groupId=1</privileges>
</operatorGroup>
47
Interface URI
/plat/opertorGroup
Access Method
HTTP
POST
Message body
<operatorGroup>
<groupName>cccc</groupName>
<groupDesc>desc</groupDesc>
<roleId>1</roleId>
<operatePrivilegeList>
<operatePrivilege><id>iMC-PLAT_SystemMnt_OperatorMng</id><desc>Operator</desc><level>-1</level></operatePrivilege>
<opertePrivliege><id>iMC-Plat_SystemMng_OperatorGroupMng</id><desc>Operator
group</desc><level>-1</level></operatorPrivilege>
</operatePrivilegeList>
</operatorGroup>
Element description
For meanings of the fields in the message body, see Query Operator Group Details (page 46).
Returned Result
Status codes
Message header
If the operator 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/operatorGroup/4
48
System Management
Example
Add an operator group.
Request
POST http://imc_host:8080/imcrs/plat/operatorGroup
accept: application/xml
Content-Type: application/xml; charset+UTF-8
. . .
<operatorGroup>
<groupName>cccc</groupName>
<groupDesc>desc</groupDesc>
<roleId>1</roleId>
<operatePrivilegeList>
<operatePrivilege><id>iMC-PLAT_SystemMnt_OperatorMng</id><desc>Operator</desc><level>-1</level></operatePrivilege>
<opertePrivliege><id>iMC-Plat_SystemMng_OperatorGroupMng</id><desc>Operator
group</desc><level>-1</level></operatorPrivilege>
</operatePrivilegeList>
</operatorGroup>
Response
HTTP/1.1 201 Created
Location: http://localhost:8080/imcrs/plat/operatorGroup/4
49
Interface URI
/plat/operatorGroup/{id}
Access Method
HTTP
PUT
Parameters
Path parameters
id
Operator ID.
Long integer type. Required. No default value.
Message body
<operatorGroup>
<groupDesc>desc</groupDesc>
<roleId>1</roleId>
<operatePrivilegeList>
<operatePrivilege><id>iMC-PLAT_SystemMnt_OperatorMng</id><desc>Operator</desc><level>-1</level></operatePrivilege>
<opertePrivliege><id>iMC-Plat_SystemMng_OperatorGroupMng</id><desc>Operator
group</desc><level>-1</level></operatorPrivilege>
</operatePrivilegeList>
</operatorGroup>
Element description
For meanings of the fields in the message body, see Query All Operators (page 34).
Returned Result
Status codes
50
System Management
Example
Modify the operator group with ID 4.
Request
PUT http://imc_host:8080/imcrs/plat/operatorGroup/4
accept: application/xml
. . .
<operatorGroup>
<groupDesc>desc</groupDesc>
<roleId>1</roleId>
<operatePrivilegeList>
<operatePrivilege><id>iMC-PLAT_SystemMnt_OperatorMng</id><desc>Operator</desc><level>-1</level></operatePrivilege>
<opertePrivliege><id>iMC-Plat_SystemMng_OperatorGroupMng</id><desc>Operator
group</desc><level>-1</level></operatorPrivilege>
</operatePrivilegeList>
</operatorGroup>
Response
HTTP/1.1 204 No Content
. . .
51
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
Message header
HTTP/1.1 204 No Content
. . .
Example
Delete the operator group with ID 4.
Request
Delete http://imc_host:8080/imcrs/plat/operatorGroup/4
accept: application/xml
. . .
Response
HTTP/1.1 204 No Content
52
System Management
Add Device
Synchronize Device
Manage Device
Unmanage Device
Delete Device
Ping
Tracert
Query Links
54
Bring Up an Interface
Query IP Views
Query IP View
Interface URI
/plat/res/device
Access Method
HTTP
GET
Parameters
Query parameter
resPrivilegeFilter
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.
ip
Device IP address.
String type. Wildcards are supported. Optional. No default value.
mac
MAC address.
String type. Wildcards are supported. Optional. No default value.
status
Device status.
Integer type. Optional. No default value. For valid values, see Device status description.
series
Device status.
Integer type. Optional. No default value. Valid values can be obtained through Device Series
Query Interfaces.
contact
Contact.
String type. Wildcards are supported. Optional. No default value.
location
Device location.
String type. Wildcards are supported. Optional. No default value.
start
size
orderBy
desc
55
Query parameter
Boolean type. Optional. The default value is false. It is valid only when the orderBy parameter
is specified.
total
Returned Result
Status codes
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: 150
Message body
HTTP/1.1 200 OK
Total: 150
For the description on each field of the returned value, see the API document for Query Device
Information.
Example
Query the 10th to the 20th pieces of information about devices whose IP address starts from
192.168.0.
Request
GET jttp://imc_host:8080/imcrs/plat/res/device?ip=192.168.0. *&start=10&size=10accept: application/xml
. . .
Response
HTTP/1.1 200 OK
Content-Type: application/xml
. . .
<list>
<device>
<id>122</id>
<label>Dev Label1</label>
<ip>192.168.0.1</ip>
<mask>255.255.255.0</mask>
<status>1</status>
<contact>My Address</contact>
<location>Device Location</location>
<sysOid>1.3.6.1.4.1.25506.1.160</sysOid>
<sysName>Dev1</sysName>
<link rel=self href=http://imc_host:port/incrs/plat/res/device/122/</device>
. . .
<link rel=previous href=http://imc_host:port/imcrs/plat/res/device?start=0&size=10/>
<link rel=next href=http://imc_host:port/imcrs/plat/res/device?start=2&size=10/>
</list>
56
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
Message header
The following links are provided through the Link field:
synchronize
Synchronize Device
manage
Manage Devices
unmanage
Unmanage Device
delete
Delete Device
ping
Ping
tracert
updateLabel
updateSysGrpAttr
updateLoginType
updateCategory
updateSnmp
updateTelenet
updateSsh
updatePollInterval
updatePingParam
updateWebMrgParam
latest10UnrecoveryFault
57
Message body
<device>
<id>2</id>
<label>H3C</label>
<ip>10.153.89.1.</ip>
<mask>255.255.255.0</mask>
<status>1</status>
<statusDesc>Normal</statusDesc>
<sysName>H3C</sysName>
<contact>Hangzhou H3C Technologies Co., Ltd.</contact>
<location>Hangzhou, China</location>
<sysOid>1.3.6.1.4.1.25506.1.208</sysOid>
<runTime>13 days 17 hours 42 minutes 19 seconds 660 milliseconds</runTime>
<lastPoll>20110831 14:32:51</lastPoll>
<loginType>1</loginType>
<sysDescription>H3C Comware Platform Software, Software Version 5.20, Release
6605 H3C S7503E Copyright (c) 2004-2009 Hangzhou H3C Tech. Co., Ltd. All
rights reserved.</sysDescription>
<categoryId>1</categoryId>
<supportPing>false</supportPing>
<snmpTmp1Id>101</supportTmpiId>
<telnetTmp1ID>101</telnetTmpiId>
<sshTmp1ID>101</sshTmp1Id>
<webMgrPort>0</webMgrPort>
<configPollTime>7200</configPollTime>
<statePollTime>60</statePollTime>
<symbolId>1002</symbolId>
<symbolName>H3C</symbolName>
<symbolType>3</symbolType>
<symbolDesc />
<symbolLevel>2</symbolLevel>
<parentId>1</parentId>
<typeName>H3C S7503E</typeName>
<viewType>1</viewType>
<positionX>0</positionX>
<positionY>0</positionY>
<visibleFlag>0</visibleFlag>
<statusImg>/images/icons/state-normal.gif</statusImg>
<version>s7900e-cmw-520r6605.app</version>
<mac>00:0f:e2:e1:ca:be</mac>
<categoryImg>Switch</categoryImg>
<vendorImg>/res/images/defaultVerdor-16.gif</vendorImg>
<childrenNum>1</childrenNum>
<vergeNet>1</vergeNet>
<phyName />
<phyCreateTime>20110818 20:17:26</phyCreateTime>
<phyCreator />
<appendUnicode />
<snmpTmp1>http://localhost:8080/imcrs/plat/res/snmp/101/</snmpTemp1>
<telnetTmp1>http://localhost:8080/imcrs/plat/res/telnet/101</telnetTmp1>
<sshTmp1>http://localhost:8080/imcrs/plat/res/ssh/101</sshTmp1>
<series>http://localhost:8080/imcrs/plat/res/series/163</series>
<category>http://localhost:8080/imcrs/plat/res/category/1</category>
<model>http://localhost:8080/imcrs/plat/res/model/10178</model>
<interfaces>http://localhost:8080/imcrs/plat/res/device/2/interface</interfaces>
</device>
Element description
device sub-elements
id
label
Device label.
String type.
ip
Device IP address.
String type.
mask
58
Mask.
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
sysDescription
System description.
String type.
categoryId
supportPing
snmpTmplId
telnetTmplId
sshTmplId
webMgrPort
configPollTime
statePollTime
device Service
Device services.
Element type. Multiple elements can be used. See the API document for Query Service Monitoring
Information.
59
device sub-elements
symbolId
symbolName
symbolType
symbolDesc
symbolLevel
parentId
typeName
parentId
viewType
View type.
Integer type.
iconFileName
positionX
X location.
Integer type.
positionY
Y location.
Integer type.
visibleFlag
Display symbol.
Integer type.
statusImg
version
mac
MAC address.
String type.
categoryImg
vendorImg
childrenNum
60
device sub-elements
vergeNet
phyName
Physical name.
String type.
phyCreateTime
Created at.
String type.
phyCreator
Creator.
String type.
telnetTmpl
sshTmpl
series
model
interfaces
category
Example
Query information about the device with the ID 2.
Request
GET http://localhost:8080/imcrs/plat/res/device/2
accept: application/xml
. . .
61
Response
HTTP/1.1. 200 OK
Content-Type: application/xml
Link: <http://localhost:8080/imcrs/plat/res/device/2/synchronize>;rel=synchronize;op=PUT
Link: <http://localhost:8080/imcrs/plat/res/device/2/manage>;rel=manage;op=PUT
Link: <http://localhost:8080/imcrs/plat/res/device/2/unmanage;rel=unmanage;op=PUT
. . .
<device>
<id>2</id>
<label>H3C</label>
<ip>10.153.89.1.</ip>
<mask>255.255.255.0</mask>
<status>1</status>
<statusDesc>Normal</statusDesc>
<sysName>H3C</sysName>
<contact>Hangzhou H3C Technologies Co., Ltd.</contact>
<location>Hangzhou, China</location>
<sysOid>1.3.6.1.4.1.25506.1.208</sysOid>
<runTime>13 days 17 hours 42 minutes 19 seconds 660 milliseconds</runTime>
<lastPoll>20110831 14:32:51</lastPoll>
<loginType>1</loginType>
<sysDescription>H3C Comware Platform Software, Software Version 5.20, Release
6605 H3C S7503E Copyright (c) 2004-2009 Hangzhou H3C Tech. Co., Ltd. All
rights reserved.</sysDescription>
<categoryId>1</categoryId>
<supportPing>false</supportPing>
<snmpTmp1Id>101</supportTmpiId>
<telnetTmp1ID>101</telnetTmpiId>
<sshTmp1ID>101</sshTmp1Id>
<webMgrPort>0</webMgrPort>
<configPollTime>7200</configPollTime>
<statePollTime>60</statePollTime>
<symbolId>1002</symbolId>
<symbolName>H3C</symbolName>
<symbolType>3</symbolType>
<symbolDesc />
<symbolLevel>2</symbolLevel>
<parentId>1</parentId>
<typeName>H3C S7503E</typeName>
<viewType>1</viewType>
<positionX>0</positionX>
<positionY>0</positionY>
<visibleFlag>0</visibleFlag>
<statusImg>/images/icons/state-normal.gif</statusImg>
<version>s7900e-cmw-520r6605.app</version>
<mac>00:0f:e2:e1:ca:be</mac>
<categoryImg>Switch</categoryImg>
<vendorImg>/res/images/defaultVerdor-16.gif</vendorImg>
<childrenNum>1</childrenNum>
<vergeNet>1</vergeNet>
<phyName />
<phyCreateTime>20110818 20:17:26</phyCreateTime>
<phyCreator />
<appendUnicode />
<snmpTmp1>http://localhost:8080/imcrs/plat/res/snmp/101/</snmpTemp1>
<telnetTmp1>http://localhost:8080/imcrs/plat/res/telnet/101</telnetTmp1>
<sshTmp1>http://localhost:8080/imcrs/plat/res/ssh/101</sshTmp1>
<series>http://localhost:8080/imcrs/plat/res/series/163</series>
<category>http://localhost:8080/imcrs/plat/res/category/1</category>
<model>http://localhost:8080/imcrs/plat/res/model/10178</model>
<interfaces>http://localhost:8080/imcrs/plat/res/device/2/interface</interfaces>
</device>
62
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
size
orderBy
desc
total
Returned Result
Status codes
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: 15
63
Message body
<list>
<deviceCategory>
<id>0</id>
<name>Router</name>
<preDefined>true</preDefined>
<link rel=self href=http://imc_host:port/imcrs/plat/res/category/0/>
</deviceCategory>
. . .
<link rel=next href=http://imc_host:port/imcrs/plat/res/category?start=1&size=10/
</list>
For the description on each field of the returned value, see the API document for Query Device
Type.
Example
Query all device types.
Request
Get http://imc_host:8080/imcrs/plat/res/category?start=0&size=1000
accept: application/xml
. . .
Response
HTTP/1.1 200 OK
Content-Type: application/xml
. . .
<list>
<deviceCategory>
<id>0</id>
<name>Router</name>
<preDefined>true</preDefined>
<link rel=self href=http://imc_host:port/imcrs/plat/res/category/0/>
</deviceCategory>
<deviceCategory>
<id>1</id>
<name>Switch</name>
<preDefined>true</preDefined>
<link rel=self href=http://imc_host:port/imcrs/plat/res/category/1/>
</deviceCategory>
. . .
</list>
64
Interface URI
/plat/res/category/{id}
Access Method
HTTP
GET
Parameters
Path parameter
id
Returned Result
Status codes
Message body
<deviceCategory>
<id>0</id>
<name>Router</name>
<preDefined>true</preDefined>
</deviceCategory>
Element description
deviceCategory sub-elements
id
name
preDefined
System defined.
Boolean type.
65
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
. . .
<deviceCategory>
<id>0</id>
<name>Router</name>
<preDefined>true</preDefined>
</deviceCategory>
66
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
size
orderBy
desc
total
Returned Result
Status codes
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: 17
67
Message body
<list>
<deviceVendor>
<id>1</id>
<name>H3C</name>
<description></description>
<phone></phone>
<contact></contact>
<preDefined>true</preDefined>
<link rel=self href=http://imc_host:port/imcrs/res/vendor/1/>
</deviceVendor>
. . .
<link rel=next href=http://imc_host:port/imcrs/plat/res/vendor?start=10&size=10/>
</list>
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.
Request
GET http://imc_host:8080/imcrs/plat/res/vendor?name=H*&start=0&size=1000
accept: application/xml
. .
Response
HTTP/1.1 200 OK
Content-Type: application/xml
. . .
<list>
<deviceVendor>
<id>1</id>
<name>H3C</name>
<description></description>
<phone></phone>
<contact></contact>
<preDefined>true</preDefined>
<link rel=self href=http://imc_host:port/imcrs/res/vendor/1/>
</deviceVendor>
<deviceVendor>
<id>1</id>
<name>HP</name>
<description></description>
<phone></phone>
<contact></contact>
<preDefined>true</preDefined>
<link rel=self href=http://imc_host:port/imcrs/res/vendor/2/>
</deviceVendor>
. . .
</list>
68
Interface URI
/plat/res/vendor/{id}
Access Method
HTTP
GET
Parameters
Query parameter
id
Status codes
Message body
<deviceVendor>
<id>1</id>
<name>H3C</name>
<description></description>
<phone></phone>
<contact></contact>
<preDefined>true</preDefined>
</deviceVendor>
Element description
deviceVendor sub-elements
id
name
description
phone
contact
Vendor address.
String type.
preDefined
System defined.
Boolean type.
69
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
. . .
<deviceVendor>
<id>1</id>
<name>H3C</name>
<description></description>
<phone></phone>
<contact></contact>
<preDefined>true</preDefined>
</deviceVendor>
70
Interface URI
/plat/res/series
Access Method
HTTP
GET
Parameters
Query parameter
seriesName
vendorName
Vendor name.
String type. Wildcard is supported. Optional. No default value.
managedOnly
start
size
orderBy
desc
total
71
Returned Result
Status codes
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
<list>
<deviceSeries>
<id>1</id>
<name>H3C AR182x</name>
<description></description>
<preDefined>true</preDefined>
<link rel=self href=http://imc_host:port/imcrs/plat/res/series/1/>
</deviceSeries>
. . .
<link rel=next href=http://imc_host:port/imcrs/plat/res/series?start=10&size=10/>
</list>
For the description on each field of the returned vale, see the API document for Query Device
Series Information.
72
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
. . .
<list>
<deviceSeries>
<id>1</id>
<name>H3C AR182x</name>
<description></description>
<preDefined>true</preDefined>
<link rel=self href=http://imc_host:port/imcrs/plat/res/series/1/>
</deviceSeries>
<deviceSeries>
<id>2</id>
<name>H3C AR183x</name>
<description></description>
<preDefined>true</preDefined>
<link rel=self href=http://imc_host:port/imcrs/plat/res/series/2/>
</deviceSeries>
. . .
<link rel=next href=http://imc_host:port/imcrs/plat/res/series?start=100&size=100/>
</list>
73
Interface URI
/plat/res/series/{id}
Access Method
HTTP
GET
Parameters
Path parameter
id
Returned Result
Status codes
Message body
<deviceSeries>
<id>1</id>
<name>H3C AR18-2x</name>
<description></description>
<preDefined>true</preDefined>
<vendor>http://imc_host:port/imcrs/plat/res/vendor/2</vendor>
</deviceSeries>
Element description
deviceSeries sub-elements
id
name
description
preDefined
System defined.
Boolean type.
vendor
74
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
...
<deviceSeries>
<id>1</id>
<name>H3C AR18-2x</name>
<description></description>
<preDefined>true</preDefined>
<vendor>http://imc_host:port/imcrs/plat/res/vendor/2</vendor>
</deviceSeries>
75
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. Optional. No default value. Valid values can be obtained through Device Series Query
Interface.
category
Device type.
Integer type. Optional. No default value. Valid values can be obtained through Device Type Query
Interface.
start
size
orderBy
desc
total
76
Returned Result
Status codes
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
<list>
<deviceModel>
<id>1</id>
<name>3Com OSR3720</name>
<description></description>
<sysOid>1.3.6.1.4.1.43.1.16.4.2.34</sysOid>
<preDefined>true</preDefined>
<link rel="self" href="http://imc_host:port/imcrs/plat/res/model/1"/>
</deviceModel>
...
<link rel="next" href="http://imc_host:port/imcrs/plat/res/model?start=10&size=10"/>
</list>
For the description on each field of the returned value, see the API document for Query Device
Model Information.
77
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
...
<list>
<deviceModel>
<id>1</id>
<name>3Com OSR3720</name>
<description></description>
<sysOid>1.3.6.1.4.1.43.1.16.4.2.34</sysOid>
<preDefined>true</preDefined>
<link rel="self" href="http://imc_host:port/imcrs/plat/res/model/1"/>
</deviceModel>
<deviceModel>
<id>2</id>
<name>3Com OSR3740</name>
<description></description>
<sysOid>1.3.6.1.4.1.43.1.16.4.2.35</sysOid>
<preDefined>true</preDefined>
<link rel="self" href="http://imc_host:port/imcrs/plat/res/model/2"/>
</deviceModel>
...
</list>
78
Interface URI
/plat/res/model/{id}
Access Method
HTTP
GET
Parameters
Path parameter
id
Returned Result
Status codes
Message body
<deviceModel>
<id>1</id>
<name>3Com OSR3720</name>
<description></description>
<sysOid>1.3.6.1.4.1.43.1.16.4.2.34</sysOid>
<preDefined>true</preDefined>
<vendor>http://imc_host:port/imcrs/plat/res/vendor/3</vendor>
<series>http://imc_host:port/imcrs/plat/res/series/20</category>
<category>http://imc_host:port/imcrs/plat/res/category/0</category>
</deviceModel>
Element description
deviceModel sub-elements
id
name
description
sysOid
preDefined
System defined.
Boolean type.
vendor
79
deviceModel sub-elements
String type.
series
category
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
...
<deviceModel>
<id>1</id>
<name>3Com OSR3720</name>
<description></description>
<sysOid>1.3.6.1.4.1.43.1.16.4.2.34</sysOid>
<preDefined>true</preDefined>
<vendor>http://imc_host:port/imcrs/plat/res/vendor/3</vendor>
<series>http://imc_host:port/imcrs/plat/res/series/20</category>
<category>http://imc_host:port/imcrs/plat/res/category/0</category>
</deviceModel>
80
Add Device
Add a device to iMC.
Interface URI
/plat/res/device
Access Method
HTTP
POST
Message body
<device>
<nameOrIp>192.168.1.100</nameOrIp>
<label>Dev Label1</label>
<mask></mask>
<loginType>1</loginType>
<registerTrap>true</registerTrap>
<supportPing>true</supportPing>
<forceAdd>false</forceAdd>
<loopbackAsMgrIp>false</loopbackAsMgrIp>
<snmpTmplId>10</snmpTmplId>
<telnetTmplId>11</telnetTmplId>
<sshTmplId>12</sshTmplId>
<snmpParameter>
......
</snmpParameter>
<telnetParameter>
......
</telnetParameter>
<sshParameter>
......
</sshParameter>
</device>
Element description
device sub-elements
nameOrIp
Host or IP address.
String type. Required. No default value.
label
Device label.
String type. Optional. The default value is empty.
mask
Mask.
String type. Optional. The default value is empty.
loginType
registerTrap
supportPing
forceAdd
81
device sub-elements
Boolean type. Optional. The default value is false.
loopbackAsMgrIp
snmpTmplId
telnetTmplId
sshTmplId
snmpParameter
SNMP parameters.
For SNMP parameters, see SNMP Parameter Description. Required. No default value. If
both snmpTmplId and snmpParameter exist, snmpTmplId is preferred, and snmpParameter
is omitted.
telnetParameter
Telnet parameters.
For Telnet parameters, see Telnet Parameter Description. Required. 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. Required. No default value. If both
sshTmplId and sshParameter exist, sshTmplId is preferred, and sshParameter is omitted.
Returned Result
Status codes
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/res/device/1
82
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
...
<device>
<nameOrIp>192.168.1.100</nameOrIp>
<label>Dev Label1</label>
<mask></mask>
<loginType>1</loginType>
<registerTrap>true</registerTrap>
<supportPing>true</supportPing>
<forceAdd>false</forceAdd>
<loopbackAsMgrIp>false</loopbackAsMgrIp>
<snmpTmplId>10</snmpTmplId>
<telnetTmplId>11</telnetTmplId>
<sshTmplId>12</sshTmplId>
</device>
Response
HTTP/1.1 201 Created
Location: http://imc_host:port/imcrs/res/device/1
Add Device
83
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
Message header
HTTP/1.1 204 No Content
...
Example
Synchronize the device with the ID 2.
Request
PUT http://imc_host:8080/imcrs/plat/res/device/2/synchronize
accept: application/xml
...
Response
HTTP/1.1 204 No Content
84
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
Message header
HTTP/1.1 204 No Content
...
Example
Manage the device with the ID 2.
Request
PUT http://imc_host:8080/imcrs/plat/res/device/2/manage
accept: application/xml
...
Response
HTTP/1.1 204 No Content
Manage Device
85
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
Message header
HTTP/1.1 204 No Content
...
Example
Unmanage a device with the ID 2.
Request
PUT http://imc_host:8080/imcrs/plat/res/device/2/unmanage
accept: application/xml
...
Response
HTTP/1.1 204 No Content
86
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
410 (Gone): The data with the specified ID does not exist.
Message header
HTTP/1.1 204 No Content
...
Example
Delete a device with the ID 2.
Request
PUT http://imc_host:8080/imcrs/plat/res/device/2/delete
accept: application/xml
...
Response
HTTP/1.1 204 No Content
Delete Device
87
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
<device>
<label>Dev Label1</label>
</device>
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.
Returned Result
Status codes
Message header
HTTP/1.1 204 No Content
...
88
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
...
<device>
<label>Dev Label2</label>
</device>
Response
HTTP/1.1 204 No Content
...
89
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
<device>
<sysName>H3C</sysName>
<contact>Hangzhou H3C Technologies Co., Ltd.</contact>
<location>Hangzhou, China</location>
</device>
Element description
device sub-elements
sysName
System name.
String type. Optional. If the element does not exist, the value is not changed. If the element exists,
the value cannot be null.
contact
Contact.
String type. Optional. If the element does not exist, the value is not changed. If the element exists,
the value cannot be null.
location
Location.
String type. Optional. If the element does not exist, the value is not changed. If the element exists,
the value cannot be null.
Returned Result
Status codes
Message header
HTTP/1.1 204 No Content
...
90
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
...
<device>
<sysName>H3Cx</sysName>
<contact>Hangzhou H3C Technologies Co., Ltd.</contact>
<location>Hangzhou, China</location>
</device>
Response
HTTP/1.1 204 No Content
...
91
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
<device>
<loginType>2</loginType>
</device>
Element description
device sub-elements
loginType
Returned Result
Status codes
Message header
HTTP/1.1 204 No Content
...
92
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
...
<device>
<loginType>2</loginType>
</device>
Response
HTTP/1.1 204 No Content
...
93
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
<device>
<categoryId>1</categoryId>
</device>
Element description
device sub-elements
categoryId
Returned Result
Status codes
Message header
HTTP/1.1 204 No Content
...
94
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
...
<device>
<categoryId>1</categoryId>
</device>
Response
HTTP/1.1 204 No Content
...
95
Interface URI
/plat/res/device/{id}/updateSnmp
Access Method
HTTP
PUT
Parameters
Path parameter
id
Device ID.
Long integer type. Required. No default value.
Message body
<device>
<snmpParameter>
<paraType>SNMPv1</paraType>
<roCommunity>public</roCommunity>
<rwCommunity>private</rwCommunity>
<timeout>10</timeout>
<retries>10</retries>
</snmpParameter>
</device>
or
<device>
<snmpTmplId>159</snmpTmplId>
</device>
Element description
device sub-elements
snmpParameter
SNMP parameters.
Element type. See the following description.
snmpTmplId
snmpParameter sub-elements
paraType
Parameter type. Valid values: SNMPv1, SNMPv2c, SNMPv3 No-Priv No-Auth, SNMPv3 No-Priv
Auth-Md5, SNMPv3 No-Priv Auth-Sha, SNMPv3 Priv-Des Auth-Md5, SNMPv3 Priv-Des Auth-Sha,
SNMPv3 Priv-Aes128 Auth-Md5, SNMPv3 Priv-Aes128 Auth-Sha, SNMPv3 Priv-Aes192 Auth-Md5,
SNMPv3 Priv-Aes192 Auth-Sha, SNMPv3 Priv-Aes256 Auth-Md5, and SNMPv3 Priv-Aes256 Auth-Sha.
String type. Optional. If the element does not exist, the value is not changed. If the element exists,
the value cannot be null.
roCommunity
96
snmpParameter sub-elements
rwCommunity
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. If the element
exists, the value cannot be null.
securityName
Username.
String type. Optional. It is effective only for SNMPv3. If the element does not exist, the value is not
changed. If the element exists, the value cannot be null.
authPassword
Authentication password.
String type. Optional. It is effective only for SNMP authentication. If the element does not exist, the
value is not changed. If the element exists, the value cannot be null.
privPassword
Encryption password.
String type. Optional. It is effective only for SNMP encryption. If the element does not exist, the value
is not changed. If the element exists, the value cannot be null.
Returned Result
Status codes
Message header
HTTP/1.1 204 No Content
...
97
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
...
<device>
<snmpParameter>
<paraType>SNMPv1</paraType>
<roCommunity>public</roCommunity>
<rwCommunity>private</rwCommunity>
<timeout>10</timeout>
<retries>10</retries>
</snmpParameter>
</device>
Response
HTTP/1.1 204 No Content
...
98
Interface URI
/plat/res/device/{id}/updateTelnet
Access Method
HTTP
PUT
Parameters
Path parameter
id
Device ID.
Long integer type. Required. No default value.
Message body
<device>
<telnetParameter>
<authType>1</authType>
<userName>admin</userName>
<userPassword>admin</userPassword>
<superPassword>admin</superPassword>
<timeout>5</timeout>
</telnetParameter>
</device>
or
<device>
<telnetTmplId>156</telnetTmplId>
</device>
Element description
device sub-elements
telnetParameter
Telnet parameters.
Element type. See the following description.
telnetTmplId
telnetParameter sub-elements
authType
userName
Username.
String type. Optional. If the element does not exist, the value is not changed. If the element exists,
the value cannot be null.
99
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.
Returned Result
Status codes
Message header
HTTP/1.1 204 No Content
...
Example
Change the Telnet settings for the device with the ID 10.
Request
PUT http://imc_host:8080/imcrs/plat/res/device/10/updateTelnet
accept: application/xml
...
<telnetParameter>
<authType>1</authType>
<userName>admin</userName>
<userPassword>admin</userPassword>
<superPassword>admin</superPassword>
<timeout>5</timeout>
</telnetParameter>
Response
HTTP/1.1 204 No Content
...
Interface URI
/plat/res/device/{id}/updateSsh
Access Method
HTTP
PUT
Parameters
Path parameter
id
Device ID.
Long integer type. Required. No default value.
Message body
<device>
<sshParameter>
<authType>0</authType>
<userName>admin</userName>
<password>admin</password>
<port>22</port>
<timeout>5</timeout>
<retries>5</retries>
</sshParameter>
</device>
or
<device>
<sshTmplId>156</sshTmplId>
</device>
Element description
device sub-elements
sshParameter
SSH settings.
Element type. See the following description.
sshTmplId
sshParameter sub-elements
authType
userName
Username.
String type. Optional. If the element does not exist, the value is not changed. If the element exists,
the value cannot be null.
password
Password.
101
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. 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.
Returned Result
Status codes
Message header
HTTP/1.1 204 No Content
...
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
...
<device>
<sshParameter>
<authType>0</authType>
<userName>admin</userName>
<password>admin</password>
<port>22</port>
<timeout>5</timeout>
<retries>5</retries>
</sshParameter>
</device>
Response
HTTP/1.1 204 No Content
...
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
<device>
<configPollTime>1800</configPollTime>
<statePollTime>100</statePollTime>
</device>
Element description
device sub-elements
configPollTime
statePollTime
Returned Result
Status codes
Message header
HTTP/1.1 204 No Content
...
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
...
<device>
<configPollTime>1800</configPollTime>
<statePollTime>100</statePollTime>
</device>
Response
HTTP/1.1 204 No Content
...
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
<device>
<supportPing>false</supportPing>
</device>
Element description
device sub-elements
supportPing
Returned Result
Status codes
Message header
HTTP/1.1 204 No Content
...
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
...
<device>
<supportPing>false</supportPing>
</device>
Response
HTTP/1.1 204 No Content
...
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
<device>
<webMgrProtocol>HTTP</webMgrProtocol>
<webMgrPort>80</webMgrPort>
</device>
Element description
device sub-elements
webMgrProtocol Protocol used by a lower-level network management
String type. Optional. If the element does not exist, the value is not changed. If the element exists,
the value cannot be null.
webMgrPort
Returned Result
Status codes
Message header
HTTP/1.1 204 No Content
...
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
...
<device>
<webMgrProtocol>HTTP</webMgrProtocol>
<webMgrPort>80</webMgrPort>
</device>
Response
HTTP/1.1 204 No Content
...
Interface URI
/plat/res/device/service
Access Method
HTTP
GET
Parameters
Query parameter
deviceId
Device ID.
Long integer type. Required. No default value.
total
Returned Result
Status codes
Message header
If the total parameter is true, the Total field gives all the records that match the sort criteria. The
message body is empty.
HTTP/1.1 200 OK
Total: 3
Message body
<list>
<deviceService>
<deviceId>10</deviceId>
<serviceBit>0</serviceBit>
<name>Telnet</name>
<port>23</port>
<type>1</type>
<status>1</status>
</deviceService>
...
</list>
110
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
status
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.1 200 OK
Content-Type: application/xml
...
<list>
<deviceService>
<deviceId>10</deviceId>
<serviceBit>0</serviceBit>
<name>Telnet</name>
<port>23</port>
<type>1</type>
<status>1</status>
</deviceService>
...
</list>
111
Interface URI
/plat/res/device/service/{id}
Access Method
HTTP
PUT
Parameters
Path parameter
id
Device ID.
Long integer type. Required. No default value.
Message body
<device>
<deviceService>
<deviceId>10</deviceId>
<serviceBit>0</serviceBit>
<name>Telnet</name>
<port>23</port>
<type>1</type>
<status>1</status>
<monitor>false</monitor>
</deviceService>
<deviceService>
<deviceId>10</deviceId>
<serviceBit>1</serviceBit>
<name>FTP</name>
<port>21</port>
<type>1</type>
<status>0</status>
<monitor>true</monitor>
</deviceService>
...
</device>
Element description
deviceService sub-elements
deviceId
Device ID.
Long integer type. Optional. Obtained from the path parameter.
serviceBit
Service bits.
Integer type. Required. No default value.
name
Name.
String type. Required. No default value.
port
Port.
Integer type. Required. No default value.
type
112
deviceService sub-elements
Integer type. Required. No default value.
monitor
Monitor services.
Boolean type. Optional. The default value is true.
Returned Result
Status codes
Message header
HTTP/1.1 204 No Content
...
Example
Change the service monitoring information for the device with the ID 10.
Request
PUT http://imc_host:8080/imcrs/plat/res/device/service/10
accept: application/xml
...
<device>
<deviceService>
<deviceId>10</deviceId>
<serviceBit>0</serviceBit>
<name>Telnet</name>
<port>23</port>
<type>1</type>
<status>1</status>
<monitor>false</monitor>
</deviceService>
<deviceService>
<deviceId>10</deviceId>
<serviceBit>1</serviceBit>
<name>FTP</name>
<port>21</port>
<type>1</type>
<status>0</status>
<monitor>true</monitor>
</deviceService>
</device>
Response
HTTP/1.1 204 No Content
...
113
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
Message body
<ping>
<result>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.12: bytes=32 time=2ms TTL=251 Ping statistics for
10.153.89.12: Packets: Sent = 5, Received = 5, Lost = 0 (0% loss), Approximate round trip times in milli-seconds: Minimum
= 2ms, Maximum = 9ms, Average = 3ms</result>
</ping>
Element description
ping sub-elements
result
Ping results.
String type.
114
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>
<result>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.12: bytes=32 time=2ms TTL=251 Ping statistics for
10.153.89.12: Packets: Sent = 5, Received = 5, Lost = 0 (0% loss), Approximate round trip times in milli-seconds: Minimum
= 2ms, Maximum = 9ms, Average = 3ms</result>
</ping>
Ping
115
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
Message body
<tracert>
<result>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.</result>
</tracert>
Element description
tracert sub-elements
result
Tracert results.
String type.
116
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>
<result>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.</result>
</tracert>
Tracert
117
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
Returned Result
Status codes
Message header
If the total parameter is true, the Total field gives all the records that match the sort criteria. The
message body is empty.
HTTP/1.1 200 OK
Total: 7
Message body
<list>
<deviceLink>
<id>80</id>
<type>0</type>
<leftSymbolId>1092</leftSymbolId>
<leftIfDesc>Ethernet1/0/2</leftIfDesc>
<rightSymbolId>1029</rightSymbolId>
<rightIfDesc>GigabitEthernet4/0/15</rightIfDesc>
<status>1</status>
<bandWidth>100000000</bandWidth>
</deviceLink>
...
</list>
For description on each field, see the API document in Query Link Information.
118
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
...
<list>
<deviceLink>
<id>80</id>
<type>0</type>
<leftSymbolId>1092</leftSymbolId>
<leftIfDesc>Ethernet1/0/2</leftIfDesc>
<rightSymbolId>1029</rightSymbolId>
<rightIfDesc>GigabitEthernet4/0/15</rightIfDesc>
<status>1</status>
<bandWidth>100000000</bandWidth>
</deviceLink>
...
</list>
Query Links
119
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
Message header
HTTP/1.1 200 OK
Content-Type: application/xml
Message body
<deviceLink>
<id>556</id>
<type>0</type>
<leftSymbolId>1920</leftSymbolId>
<leftIfDesc>GigabitEthernet4/0/19</leftIfDesc>
<rightSymbolId>1918</rightSymbolId>
<rightIfDesc>Ethernet0/1</rightIfDesc>
<status>1</status>
<bandWidth>100000000</bandWidth>
<leftDevice>http://localhost:8080/imcrs/plat/res/device/403</leftDevice>
<rightDevice>http://localhost:8080/imcrs/plat/res/device/400</rightDevice>
</deviceLink>
Element description
deviceLink sub-elements
id
deviceLink sub-elements
Long integer type.
type
Link type.
Integer type.
leftSymbolId
leftIfDesc
rightSymbolId
rightIfDesc
status
bandWidth
Link bandwidth.
String type.
leftDevice
rightDevice
Example
Query link with the topology ID 1914 and link ID 556.
Request
GET http://imc_host:8080/imcrs/plat/res/link/556?topoId=1914
accept: application/xml
...
Response
HTTP/1.1 200 OK
Content-Type: application/xml
...
<deviceLink>
<id>556</id>
<type>0</type>
<leftSymbolId>1920</leftSymbolId>
<leftIfDesc>GigabitEthernet4/0/19</leftIfDesc>
<rightSymbolId>1918</rightSymbolId>
<rightIfDesc>Ethernet0/1</rightIfDesc>
<status>1</status>
<bandWidth>100000000</bandWidth>
<leftDevice>http://localhost:8080/imcrs/plat/res/device/403</leftDevice>
<rightDevice>http://localhost:8080/imcrs/plat/res/device/400</rightDevice>
</deviceLink>
121
Interface URI
/plat/res/autodiscover/start
Access Method
HTTP
POST
Message body
<autoDiscoverConfig>
<mode>0</mode>
<ipSection>
<begin>10.153.88.20</begin>
<end>10.153.88.30</end>
</ipSection>
<sendTrap>true</sendTrap>
</autoDiscoverConfig>
Element description
autoDiscoverConfig sub-elements
mode
Automatic discovery modes. 0: Simple mode. 1: Advanced mode. Integer type. Required.
No default value.
ipSection
Subnet for automatic discovery. Required. No default value. Multiple subnets are supported.
begin
end
sendTrap
Send traps to the network management system. Boolean type. Optional. The default value is
true.
discoverType
Advanced type. 1: Subnet. 2: Routing. 3: IPsec. 4: Reserved (invalid). 5: ARP. 6: PPP. Integer
type. Optional. The default value is routing.
loopBackAsManageIP
Use the loopback address as the management IP address. Boolean type. Optional. The default
value is false.
discoverNonSnmpDevice Discover non-SNMP devices. Boolean type. Optional. The default value is true.
122
pingAll
Scan devices on the subnet. Boolean type. Optional. The default value is false.
seedIp
Seed IP address. String type. Required. No default value. Multiple seed IP addresses are
supported.
filterSubNetIp
Filter subnet IP addresses. String type. Required. No default value. Multiple subnet IP addresses
are supported.
filterSubNet
Filter subnets. 1: No (discover devices in the filtered subnet). 2: Yes (not discover devices in
the filtered subnet). Long integer type. Optional. The default value is no.
level
snmpParameter
SNMP parameters. For SNMP parameters, see SNMP Parameter Description. Required. No
default value. Multiple SNMP parameters are supported. If both snmpTmplId and
snmpParameter exist, snmpTmplId is preferred, and snmpParameter is omitted.
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. Optional. No default value. Multiple elements are supported.
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. Optional. No default value. Valid values can be obtained
through Telnet Template Query Interfaces. If both telnetTmplId and telnetParameter exist,
telnetTmplId is preferred, and telnetParameter is omitted.
sshTmplId
SSH template ID. Integer type. Optional. No default value. Valid values can be obtained
through SSH Template Query Interfaces. If both sshTmplId and sshParameter exist, sshTmplId
is preferred, and sshParameter is omitted.
Returned Result
Status codes
Message body
If the operation succeeds, the message body is returned.
<autoDiscoverStatus>
<status>2</status>
</autoDiscoverStatus>
Element description
See Query Automatic Discovery Status.
Example 1
Use the simple 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
...
<autoDiscoverConfig>
<mode>0</mode>
<ipSection>
<begin>10.153.88.20</begin>
<end>10.153.88.30</end>
</ipSection>
<sendTrap>true</sendTrap>
</autoDiscoverConfig>
Response
HTTP/1.1 200 OK
Content-Type: application/xml
123
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
...
<autoDiscoverConfig>
<mode>1</mode>
<discoverType>2</discoverType>
<loopBackAsManageIP>false</loopBackAsManageIP>
<discoverNonSnmpDevice>true</discoverNonSnmpDevice>
<pingAll>false</pingAll>
<sendTrap>true</sendTrap>
<seedIp>10.153.89.199</seedIp>
</autoDiscoverConfig>
Response
HTTP/1.1 200 OK
Content-Type: application/xml
Example 3
Use the segment 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
...
<autoDiscoverConfig>
<mode>1</mode>
<discoverType>1</discoverType>
<ipSection>
<begin>10.153.88.10</begin>
<end>10.153.88.20</end>
</ipSection>
<loopBackAsManageIP>false</loopBackAsManageIP>
<discoverNonSnmpDevice>true</discoverNonSnmpDevice>
<pingAll>false</pingAll>
<sendTrap>true</sendTrap>
</autoDiscoverConfig>
Response
HTTP/1.1 200 OK
Content-Type: application/xml
124
Interface URI
/plat/res/autodiscover/stop
Access Method
HTTP
GET
Parameters
None
Returned Result
Status codes
Message body
If the operation succeeds, the message body is returned.
<autoDiscoverStatus>
<status>4</status>
</autoDiscoverStatus>
Element description
See Query Automatic Discovery Status.
Example
Stop the running automatic discovery.
Request
GET http://imc_host:8080/imcrs/plat/res/autodiscover/stop
accept: application/xml
...
Response
HTTP/1.1 200 OK
Content-Type: application/xml
...
<autoDiscoverStatus>
<status>4</status>
</autoDiscoverStatus>
125
Interface URI
/plat/res/autodiscover/status
Access Method
HTTP
GET
Parameters
None
Returned Result
Status codes
Message body
<autoDiscoverStatus>
<status>1</status>
</autoDiscoverStatus>
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.
Example
Query automatic discoveries that have stopped.
Request
GET http://imc_host:8080/imcrs/plat/res/autodiscover/status
accept: application/xml
...
Response
HTTP/1.1 200 OK
Content-Type: application/xml
...
<autoDiscoverStatus>
<status>1</status>
</autoDiscoverStatus>
126
Interface URI
/plat/res/autodiscover/result
Access Method
HTTP
GET
Parameters
None
Returned Result
Status codes
Message body
<list>
<discoverResult>
<cmdCode>3</cmdCode>
<type>4</type>
<time>2011-07-01 13:59:34</time>
Automatic discovery has finished. </content>
<deviceIp>finished</deviceIp>
<result>Six devices have been discovered, where five are SNMP devices, and one is an ICMP device. 0 devices are
added.</result>
</discoverResult>
...
</list>
Element description
discoverResult sub-elements
cmdCode
Command codes. 0: Start automatic discovery. 1: Common message. 2: Automatic discover alarm.
3: Automatic discovery has stopped.
Integer type.
type
Command type. 0: Error message common value. 1: Informational message common value. 2: Alarm
message common value. 4: Successful message common value.
Integer type.
time
Discovered at.
String type.
content
Content.
String type.
deviceIp
Device IP.
String type.
result
Result.
String type.
deviceProtocol
127
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
...
<list>
<discoverResult>
<cmdCode>3</cmdCode>
<type>4</type>
<time>2011-07-01 13:59:34</time>
Automatic discovery has finished. </content>
<deviceIp>finished</deviceIp>
<result>Six devices have been discovered, where five are SNMP devices, and one is an ICMP device. 0 devices are
added.</result>
</discoverResult>
<discoverResult>
<cmdCode>2</cmdCode>
<type>0</type>
<time>2011-07-01 13:59:33</time>
<content>10.153.89.7(10.153.89.7)</content>
<deviceIp>10.153.89.7</deviceIp>
<deviceProtocol/>
<result>Device "10.153.89.7(10.153.89.7)" has already existed.</result>
</discoverResult>
...
</list>
128
Interface URI
/plat/res/autodiscover
Access Method
HTTP
GET
Parameters
None
Returned Result
Status codes
Message body
<list>
<discoveredDevice>
<discoverTime>2011-07-01 10:59:42</discoverTime>
<deviceId>106</deviceId>
<deviceIP>10.153.89.3</deviceIP>
<deviceName>MyDev.mydomain</deviceName>
<deviceProtocol>SNMP</deviceProtocol>
<deviceSysDescription>Cisco Internetwork Operating System Software
IOS (tm) Catalyst 4000 L3 Switch Software (cat4000-I5S-M), Version 12.2(20)EWA, RELEASE SOFTWARE (fc1)
Technical Support: http://www.cisco.com/techsupport
Copyright (c) 1986-2004 by cisco Systems, Inc.
Com</deviceSysDescription>
<discoverResult>2001</discoverResult>
</discoveredDevice>
...
</list>
Element description
discoveredDevice sub-elements
discoverTime
Discovered at.
String type.
deviceId
Device ID.
Long integer type.
deviceIP
Device IP.
String type.
deviceName
Device name.
String type.
deviceProtocol
Protocol.
String type.
Result. 2001: Success. Other error codes. See Error Codes. Integer type.
Query Automatically Discovered Devices
129
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
...
<list>
<discoveredDevice>
<discoverTime>2011-07-01 10:59:42</discoverTime>
<deviceId>106</deviceId>
<deviceIP>10.153.89.3</deviceIP>
<deviceName>MyDev.mydomain</deviceName>
<deviceProtocol>SNMP</deviceProtocol>
<deviceSysDescription>Cisco Internetwork Operating System Software
IOS (tm) Catalyst 4000 L3 Switch Software (cat4000-I5S-M), Version 12.2(20)EWA, RELEASE SOFTWARE (fc1)
Technical Support: http://www.cisco.com/techsupport
Copyright (c) 1986-2004 by cisco Systems, Inc.
Com</deviceSysDescription>
<discoverResult>2001</discoverResult>
</discoveredDevice>
...
</list>
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
size
desc
total
Returned Result
Status codes
Message header
If the total parameter is true, the Total field gives all the records that match the sort criteria. The
message body is empty.
HTTP/1.1 200 OK
Total: 47
131
Message body
<list>
<interface>
<ifIndex>2</ifIndex>
<ifType>6</ifType>
<ifTypeDesc>ETHERNETCSMACD</ifTypeDesc>
<ifDescription>GigabitEthernet1/1</ifDescription>
<adminStatus>1</adminStatus>
<adminStatusDesc>Up</adminStatusDesc>
<operationStatus>2</operationStatus>
<operationStatusDesc>Down</operationStatusDesc>
<ifspeed>1000000000</ifspeed>
<appointedSpeed>-1</appointedSpeed>
<ifAlias/>
<phyAddress>00:12:00:40:a2:c0</phyAddress>
<mtu>1500</mtu>
<lastChange>0 days 0 hours 0 minutes 35 seconds 100 milliseconds</lastChange>
</interface>
...
<link href="http://localhost:8080/imcrs/plat/res/device/2/interface?start=10&size=10" op="GET" rel="next"/>
</list>
For description on each field, see the API document in Query Device Interface Information.
Example
Query information about the interface with the device ID 5.
Request
GET http://imc_host:8080/imcrs/plat/res/device/5/interface
accept: application/xml
...
Response
HTTP/1.1 200 OK
Content-Type: application/xml
...
<list>
<interface>
<ifIndex>2</ifIndex>
<ifType>6</ifType>
<ifTypeDesc>ETHERNETCSMACD</ifTypeDesc>
<ifDescription>GigabitEthernet1/1</ifDescription>
<adminStatus>1</adminStatus>
<adminStatusDesc>Up</adminStatusDesc>
<operationStatus>2</operationStatus>
<operationStatusDesc>Down</operationStatusDesc>
<ifspeed>1000000000</ifspeed>
<appointedSpeed>-1</appointedSpeed>
<ifAlias/>
<phyAddress>00:12:00:40:a2:c0</phyAddress>
<mtu>1500</mtu>
<lastChange>0 days 0 hours 0 minutes 35 seconds 100 milliseconds</lastChange>
</interface>
...
<link href="http://localhost:8080/imcrs/plat/res/device/5/interface?start=10&size=10" op="GET" rel="next"/>
</list>
132
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
Message header
HTTP/1.1 200 OK
Content-Type: application/xml
Message body
<interface>
<ifIndex>1</ifIndex>
<ifType>24</ifType>
<ifTypeDesc>SOFTWARELOOPBACK</ifTypeDesc>
<ifDescription>lo</ifDescription>
<adminStatus>1</adminStatus>
<adminStatusDesc>Up</adminStatusDesc>
<operationStatus>1</operationStatus>
<operationStatusDesc>Up</operationStatusDesc>
<ifspeed>10000000</ifspeed>
<appointedSpeed>-1</appointedSpeed>
<ifAlias/>
<phyAddress/>
<mtu>1500</mtu>
<lastChange>0 days 0 hours 0 minutes 0 seconds 0 milliseconds</lastChange>
<ipHash>
<item>127.0.0.1</item>
<item>255.0.0.0</item>
</ipHash>
</interface>
133
Element description
interface sub-elements
ifIndex
Interface index.
Long integer type.
ifType
Interface type.
Integer type.
ifTypeDesc
ifDescription
Interface description.
String type.
adminStatus
adminStatusDesc
operationStatus
operationStatusDesc
ifspeed
Interface speed.
Long integer type.
appointedSpeed
Specify speed.
Long integer type.
ifAlias
Interface alias.
String type.
phyAddress
MAC address.
String type.
mtu
MTU.
Integer type.
lastChange
Last change.
String type.
ipHash
lastChangeTime
Last change.
Long integer type.
134
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
...
<interface>
<ifIndex>1</ifIndex>
<ifType>24</ifType>
<ifTypeDesc>SOFTWARELOOPBACK</ifTypeDesc>
<ifDescription>lo</ifDescription>
<adminStatus>1</adminStatus>
<adminStatusDesc>Up</adminStatusDesc>
<operationStatus>1</operationStatus>
<operationStatusDesc>Up</operationStatusDesc>
<ifspeed>10000000</ifspeed>
<appointedSpeed>-1</appointedSpeed>
<ifAlias/>
<phyAddress/>
<mtu>1500</mtu>
<lastChange>0 days 0 hours 0 minutes 0 seconds 0 milliseconds</lastChange>
<ipHash>
<item>127.0.0.1</item>
<item>255.0.0.0</item>
</ipHash>
</interface>
135
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
Message header
HTTP/1.1 204 No Content
...
Example
Bring up the interface with index 2 and device ID 2.
Request
PUT http://imc_host:8080/imcrs/plat/res/device/2/interface/2/up
accept: application/xml
...
Response
HTTP/1.1 204 No Content
136
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
Message header
HTTP/1.1 204 No Content
...
Example
Shut down the interface with the index 2 and device ID 2.
Request
PUT http://imc_host:8080/imcrs/plat/res/device/2/interface/2/down
accept: application/xml
...
Response
HTTP/1.1 204 No Content
137
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
total
name
View name.
String type. Optional. No default value.
Returned Result
Status codes
Message header
If the total parameter is true, the Total field gives all the records that match the sort criteria. The
message body is empty.
HTTP/1.1 200 OK
Total: 1
Message body
<list>
<customView>
<symbolId>11</symbolId>
<name>My network topology</name>
<runStatus>4</runStatus>
<statusImgSrc>/res/images/group-major.gif</statusImgSrc>
<statusDesc>Important</statusDesc>
</customView> ...
</list>
138
Element description
customView sub-elements
symbolId
name
runStatus
Operation status.
Integer type.
statusImgSrc
Running picture.
String type.
statusDesc
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
...
<list>
<customView>
<symbolId>11</symbolId>
<name>My network topology</name>
<runStatus>4</runStatus>
<statusImgSrc>/res/images/group-major.gif</statusImgSrc>
<statusDesc>Important</statusDesc>
</customView>
...
</list>
139
Interface URI
/plat/res/view/custom/{id}
Access Method
HTTP
GET
Path parameter
Path parameter
id
Query parameter
Query parameter
start
size
desc
total
Returned Result
Status codes
Message header
If the total parameter is true, the Total field gives all the records that match the sort criteria. The
message body is empty.
HTTP/1.1 200 OK
Total: 50
Message body
<list>
<device>
<id>69</id>
<label>10.153.89.164</label>
<ip>10.153.89.164</ip>
<mask>255.255.255.0</mask>
<status>1</status>
<sysName/>
<contact/>
<location/>
<sysOid/>
<sysDescription/>
<devCategoryImgSrc>pc</devCategoryImgSrc>
<topoIconName>iconpc</topoIconName>
<categoryId>9</categoryId>
<link href="http://localhost:8080/imcrs/plat/res/device/69" op="GET" rel="self"/>
</device>
......
<link href="http://localhost:8080/imcrs/plat/res/view/custom/11?start=10&size=10" op="GET" rel="next"/>
</list>
Element description
For description on each field, see the API document in Query Device Information.
Example
Query information about the custom view with the ID 11.
Request
GET http://imc_host:8080/imcrs/plat/res/view/custom/11
accept: application/xml
...
Response
HTTP/1.1 200 OK
Content-Type: application/xml
...
<list>
<device>
<id>69</id>
<label>10.153.89.164</label>
<ip>10.153.89.164</ip>
<mask>255.255.255.0</mask>
<status>1</status>
<sysName/>
<contact/>
<location/>
<sysOid/>
<sysDescription/>
<devCategoryImgSrc>pc</devCategoryImgSrc>
<topoIconName>iconpc</topoIconName>
<categoryId>9</categoryId>
<link href="http://localhost:8080/imcrs/plat/res/device/69" op="GET" rel="self"/>
</device>
......
<link href="http://localhost:8080/imcrs/plat/res/view/custom/11?start=10&size=10" op="GET" rel="next"/>
</list>
141
Interface URI
/plat/res/view/custom
Access Method
HTTP
POST
Message body
<customView>
<name>myView</name>
<device>
<id>1</id>
</device>
<device>
<id>2</id>
</device>
</customView>
Element description
customView sub-elements
name
device
device/id
Returned Result
Status codes
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/custom/1179
142
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
...
<customView>
<name>myView</name>
<device>
<id>1</id>
</device>
<device>
<id>2</id>
</device>
</customView>
Response
HTTP/1.1 201 Created
Location: http://localhost:8080/imcrs/plat/res/view/custom/1179
143
Interface URI
/plat/res/view/custom/{id}
Access Method
HTTP
PUT
Parameters
Path parameter
id
Message body
<customView>
<name>myView</name>
<autoAddDevType>0</autoAddDevType>
<addAllDev>false</addAllDev>
<ipSection>
<begin>10.153.88.1</begin>
<end>10.153.88.20</end>
</ipSection>
<device>
<id>1</id>
</device>
<device>
<id>2</id>
</device>
</customView>
Element description
customView sub-elements
name
autoAddDevType Automatically add device types. 0: Not add. 1: Add any new device. 2: Add devices in the specified
subnet. When the value is 2, inSection takes effect. ipSection
Integer type. Optional.
addAllDev
Add all devices in the system. When the value is false, devices takes effect.
Boolean type. Optional. The default value is false.
ipSection
begin
end
customView sub-elements
device
device/id
Returned Result
Status codes
Example
Modify information about the custom view with the ID 1154.
Request
PUT http://imc_host:8080/imcrs/plat/res/view/custom/1154
accept: application/xml
...
<customView>
<name>myView</name>
<autoAddDevType>0</autoAddDevType>
<addAllDev>false</addAllDev>
<device>
<id>2</id>
</device>
<device>
<id>5</id>
</device>
</customView>
Response
HTTP/1.1 204 No Content
...
145
Interface URI
/plat/res/view/custom/{id}
Access Method
HTTP
DELETE
Parameters
Path parameter
id
Returned Result
Status codes
410 (Gone): The data specified with the ID does not exist.
Message header
HTTP/1.1 204 No Content
...
Example
Delete a custom view with the ID 1154.
Request
DELETE http://imc_host:8080/imcrs/plat/res/view/custom/1154
accept: application/xml
...
Response
HTTP/1.1 204 No Content
146
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
total
name
View name.
String type. Optional.
createBy
View creator.
String type. Optional.
ifDesc
Interface description.
String type. Optional.
ifAlias
Interface alias.
String type. Optional.
status
Interface status.
Integer type. Optional.
Returned Result
Status codes
Message header
If the total parameter is true, the Total field gives all the records that match the sort criteria. The
message body is empty.
HTTP/1.1 200 OK
Total: 1
147
Message body
<list>
<interfaceView>
<id>1</id>
<name>myIfView</name>
<desc>my interface view</desc>
<createBy>admin</createBy>
<createDate>2011-06-17T16:51:04.582+08:00</createDate>
</interfaceView>
...
</list>
Element description
interfaceView sub-elements
id
name
desc
createBy
Creator.
String type.
createDate
Created at.
Date type.
Example
Query interface view list.
Request
GET http://imc_host:8080/imcrs/plat/res/view/interface
accept: application/xml
...
Response
HTTP/1.1 200 OK
Content-Type: application/xml
...
<list>
<interfaceView>
<id>1</id>
<name>myIfView</name>
<desc>my interface view</desc>
<createBy>admin</createBy>
<createDate>2011-06-17T16:51:04.582+08:00</createDate>
</interfaceView>
...
</list>
148
Interface URI
/plat/res/view/interface/{id}
Access Method
HTTP
GET
Path parameter
Path parameter
id
Query parameter
Query parameter
resPrivilegeFilter Filter resources by access right.
Boolean type. Optional. The default value is false.
total
Returned Result
Status codes
Message header
If the total parameter is true, the Total field gives all the records that match the sort criteria. The
message body is empty.
HTTP/1.1 200 OK
Total: 6
149
Message body
<list>
<interface>
<deviceId>61</deviceId>
<ifIndex>4</ifIndex>
<ifType>6</ifType>
<ifDescription>Ethernet1/0/4</ifDescription>
<adminStatus>1</adminStatus>
<operationStatus>2</operationStatus>
<ifspeed>100000000</ifspeed>
<appointedSpeed>-1</appointedSpeed>
<ifAlias>Ethernet1/0/4 Interface</ifAlias>
<phyAddress>00:e0:fc:00:35:00</phyAddress>
<mtu>1552</mtu>
<lastChange>0 days 0 hours 0 minutes 20 seconds 930 milliseconds</lastChange>
</interface>
...
</list>
Element description
For the description on each field of the returned value, see Query Device Information.
Example
Query interface view with the ID 1.
Request
GET http://imc_host:8080/imcrs/plat/res/view/interface/1
accept: application/xml
...
Response
HTTP/1.1 200 OK
Content-Type: application/xml
...
<list>
<interface>
<deviceId>61</deviceId>
<ifIndex>4</ifIndex>
<ifType>6</ifType>
<ifDescription>Ethernet1/0/4</ifDescription>
<adminStatus>1</adminStatus>
<operationStatus>2</operationStatus>
<ifspeed>100000000</ifspeed>
<appointedSpeed>-1</appointedSpeed>
<ifAlias>Ethernet1/0/4 Interface</ifAlias>
<phyAddress>00:e0:fc:00:35:00</phyAddress>
<mtu>1552</mtu>
<lastChange>0 days 0 hours 0 minutes 20 seconds 930 milliseconds</lastChange>
</interface>
...
</list>
150
Interface URI
/plat/res/view/interface
Access Method
HTTP
POST
Message body
<interfaceView>
<name>yourIfView</name>
<desc>yourIfView</desc>
<ifInfo>
<deviceId>55</deviceId>
<ifIndex>1</ifIndex>
</ifInfo>
<ifInfo>
<deviceId>55</deviceId>
<ifIndex>3</ifIndex>
</ifInfo>
</interfaceView>
Element description
interfaceView sub-elements
name
desc
ifInfo
ifInfo/deviceId
Device ID.
Long integer type. Required. No default value.
ifInfo/ifIndex
Returned Result
Status codes
151
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
...
<interfaceView>
<name>yourIfView</name>
<desc>yourIfView</desc>
<ifInfo>
<deviceId>55</deviceId>
<ifIndex>1</ifIndex>
</ifInfo>
<ifInfo>
<deviceId>55</deviceId>
<ifIndex>3</ifIndex>
</ifInfo>
</interfaceView>
Response
HTTP/1.1 201 Created
Location: http://localhost:8080/imcrs/plat/res/view/interface/3
152
Interface URI
/plat/res/view/interface/{id}
Access Method
HTTP
PUT
Parameters
Path parameter
id
Message body
<interfaceView>
<name>yourIfView</name>
<desc>yourIfView</desc>
<ifInfo>
<deviceId>55</deviceId>
<ifIndex>1</ifIndex>
</ifInfo>
<ifInfo>
<deviceId>55</deviceId>
<ifIndex>2</ifIndex>
</ifInfo>
</interfaceView>
Element description
interfaceView sub-elements
name
desc
ifInfo
ifInfo/deviceId
Device ID.
Long integer type. Optional. No default value.
ifInfo/ifIndex
153
Returned Result
Status codes
Example
Modify interface view with the ID 3.
Request
PUT http://imc_host:8080/imcrs/plat/res/view/interface/3
accept: application/xml
...
<interfaceView>
<name>yourIfView</name>
<desc>yourIfView</desc>
<ifInfo>
<deviceId>55</deviceId>
<ifIndex>1</ifIndex>
</ifInfo>
<ifInfo>
<deviceId>55</deviceId>
<ifIndex>2</ifIndex>
</ifInfo>
</interfaceView>
Response
HTTP/1.1 204 No Content
...
Interface URI
/plat/res/view/interface/{id}
Access Method
HTTP
DELETE
Parameters
Path parameter
id
Returned Result
Status codes
410 (Gone): The data specified with the ID does not exist.
Message header
HTTP/1.1 204 No Content
...
Example
Delete an interface view with the ID 2.
Request
DELETE http://imc_host:8080/imcrs/plat/res/view/interface/2
accept: application/xml
...
Response
HTTP/1.1 204 No Content
155
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
total
status
Operation status.
Integer type. Optional.
showVergeNet
showNullNet
Returned Result
Status codes
Message header
If the total parameter is true, the Total field gives all the records that match the sort criteria. The
message body is empty.
HTTP/1.1 200 OK
Total: 2
156
Message body
<list>
<ipView>
<symbolId>1041</symbolId>
<name>10.153.0.0/24</name>
<runStatus>5</runStatus>
<statusImgSrc>/res/images/subnet-critical.gif</statusImgSrc>
<statusDesc>Warning</statusDesc>
</ipView>
...
</list>
Element description
ipView sub-elements
symbolId
name
IP view name.
String type.
runStatus
Operation status.
Integer type.
statusImgSrc
Running picture.
String type.
statusDesc
Example
Query IP views.
Request
GET http://imc_host:8080/imcrs/plat/res/view/ip
accept: application/xml
...
Response
HTTP/1.1 200 OK
Content-Type: application/xml
...
<list>
<ipView>
<symbolId>1041</symbolId>
<name>10.153.0.0/24</name>
<runStatus>5</runStatus>
<statusImgSrc>/res/images/subnet-critical.gif</statusImgSrc>
<statusDesc>Warning</statusDesc>
</ipView>
...
</list>
Query IP Views
157
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
total
status
Operation status.
Integer type. Optional.
showVergeNet
showNullNet
Returned Result
Status codes
Message header
If the total parameter is true, the Total field gives all the records that match the sort criteria. The
message body is empty.
HTTP/1.1 200 OK
Total: 46
158
Message body
<list>
<device>
<id>22</id>
<label>10.153.0.17</label>
<ip>10.153.0.17</ip>
<mask>255.255.255.0</mask>
<status>1</status>
<sysName/>
<contact/>
<location/>
<sysOid/>
<sysDescription/>
<devCategoryImgSrc>pc</devCategoryImgSrc>
<topoIconName>iconpc</topoIconName>
<categoryId>9</categoryId>
<link href="http://localhost:8080/imcrs/plat/res/device/22" op="GET" rel="self"/>
</device>
...
</list>
Element description
For the description on each field of the returned value, see Query Device Information.
Example
Query IP view with the ID 1041.
Request
GET http://imc_host:8080/imcrs/plat/res/view/ip/1041
accept: application/xml
...
Response
HTTP/1.1 200 OK
Content-Type: application/xml
...
<list>
<device>
<id>22</id>
<label>10.153.0.17</label>
<ip>10.153.0.17</ip>
<mask>255.255.255.0</mask>
<status>1</status>
<sysName/>
<contact/>
<location/>
<sysOid/>
<sysDescription/>
<devCategoryImgSrc>pc</devCategoryImgSrc>
<topoIconName>iconpc</topoIconName>
<categoryId>9</categoryId>
<link href="http://localhost:8080/imcrs/plat/res/device/22" op="GET" rel="self"/>
</device>
...
</list>
Query IP View
159
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
Message header
HTTP/1.1 200 OK
Message body
<VisioDocument xmlns="urn:schemas-microsoft-com:office:visio">
...
</VisioDocument>
Element description
For the description on the fields of the returned value, see the Visio help.
Description
Before you export topology in REST or Visio format, save the topology in iMC. Otherwise, all
devices will overlap in (0, 0).
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
...
<VisioDocument xmlns="urn:schemas-microsoft-com:office:visio">
...
</VisioDocument>
161
Interface URI
/plat/res/snmp
Access Method
HTTP
GET
Parameters
Query parameter
start
size
Total returned records. Integer type. Optional. The default value is 10. If the input parameter is
smaller than 0, the parameter is automatically changed to 0.
desc
Sort records in descending order. Boolean type. Optional. The default value is false. It is valid only
when the orderBy parameter is specified.
total
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. The
message body is empty.
HTTP/1.1 200 OK
Total: 17
162
Message body
<list>
<snmpParamTemplate>
<id>1</id>
<name>default</name>
<paraType>SNMPv1</paraType>
<roCommunity>public</roCommunity>
<rwCommunity>private</rwCommunity>
<timeout>4</timeout>
<retries>3</retries>
<contextName/>
<securityName/>
<securityMode>1</securityMode>
<authScheme>0</authScheme>
<authPassword/>
<privScheme>0</privScheme>
<privPassword/>
<snmpPort>161</snmpPort>
<link href="http://imc_host:port/imcrs/plat/res/snmp/1" op="GET" rel="self"/>
</snmpParamTemplate>
...
<link rel="next" href="http://imc_host:port/imcrs/plat/res/snmp?start=10&size=10"/>
</list>
For the description on each field of the returned value, see Query SNMP Template Information.
Example
Query SNMP template information list.
Request
GET http://imc_host:8080/imcrs/plat/res/snmp
accept: application/xml
...
Response
HTTP/1.1 200 OK
Content-Type: application/xml
...
<list>
<snmpParamTemplate>
<id>1</id>
<name>default</name>
<paraType>SNMPv1</paraType>
<roCommunity>public</roCommunity>
<rwCommunity>private</rwCommunity>
<timeout>4</timeout>
<retries>3</retries>
<contextName/>
<securityName/>
<securityMode>1</securityMode>
<authScheme>0</authScheme>
<authPassword/>
<privScheme>0</privScheme>
<privPassword/>
<snmpPort>161</snmpPort>
<link href="http://localhost:8080/imcrs/plat/res/snmp/1" op="GET" rel="self"/>
</snmpParamTemplate>
...
</list>
163
Interface URI
/plat/res/snmp/{id}
Access Method
HTTP
GET
Parameters
Path parameter
id
Returned Result
Status codes
Message body
<snmpParamTemplate>
<id>1</id>
<version>1</version>
<name>default</name>
<paraType>SNMPv1</paraType>
<roCommunity>public</roCommunity>
<rwCommunity>private</rwCommunity>
<timeout>4</timeout>
<retries>3</retries>
<contextName/>
<securityName/>
<securityMode>1</securityMode>
<authScheme>0</authScheme>
<authPassword/>
<privScheme>0</privScheme>
<privPassword/>
<snmpPort>161</snmpPort>
</snmpParamTemplate>
Element description
snmpParamTemplate sub-elements
id
name
Template name.
String type.
version
Version.
Integer type.
snmpParamTemplate sub-elements
paraType
Parameter type.
String type
roCommunity
rwCommunity
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.
privPassword
Encryption password.
String type.
snmpPort
Port.
Long integer type.
securityMode
Security mode.
Integer type.
165
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
...
<snmpParamTemplate>
<id>1</id>
<version>1</version>
<name>default</name>
<paraType>SNMPv1</paraType>
<roCommunity>public</roCommunity>
> <rwCommunity>private</rwCommunity>
<timeout>4</timeout>
<retries>3</retries>
<contextName/>
<securityName/>
<securityMode>1</securityMode>
<authScheme>0</authScheme>
<authPassword/>
<privScheme>0</privScheme>
<privPassword/>
<snmpPort>161</snmpPort>
</snmpParamTemplate>
Interface URI
/plat/res/telnet
Access Method
HTTP
GET
Parameters
Query parameter
start
size
desc
total
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. The
message body is empty.
HTTP/1.1 200 OK
Total: 17
167
Message body
<list>
<telnetParamTemplate>
<id>1</id>
<type>0</type>
<name>default</name>
<authType>5</authType>
<userName/>
<userPassword/>
<superPassword/>
<authTypeStr>No username, no password</authTypeStr>
<timeout>4</timeout>
<retries>1</retries>
<port>23</port>
<version>1</version>
<link href="http://localhost:8080/imcrs/plat/res/telnet/1" op="GET" rel="self"/>
</telnetParamTemplate>
...
<link rel="next" href="http://imc_host:port/imcrs/plat/res/telnet?start=10&size=10"/>
</list>
For the description on each field of the returned value, see Query Telnet Template Information.
Example
Query Telnet template information list.
Request
GET http://imc_host:8080/imcrs/plat/res/telnet
accept: application/xml
...
Response
HTTP/1.1 200 OK
Content-Type: application/xml
...
<list>
<telnetParamTemplate>
<id>1</id>
<type>0</type>
<name>default</name>
<authType>5</authType>
<userName/>
<userPassword/>
<superPassword/>
<authTypeStr>No username, no password</authTypeStr>
<timeout>4</timeout>
<retries>1</retries>
<port>23</port>
<version>1</version>
<link href="http://localhost:8080/imcrs/plat/res/telnet/1" op="GET" rel="self"/>
</telnetParamTemplate> ...
</list>
Interface URI
/plat/res/telnet/{id}
Access Method
HTTP
GET
Parameters
Path parameter
id
Returned Result
Status codes
Message body
<telnetParamTemplate>
<id>1</id>
<type>0</type>
<name>default</name>
<authType>5</authType>
<userName/>
<userPassword/>
<superPassword/>
<authTypeStr>No username, no password</authTypeStr>
<timeout>4</timeout>
<retries>1</retries>
<port>23</port>
<version>1</version>
</telnetParamTemplate>
Element description
telnetParamTemplate sub-elements
id
name
Template name.
String type.
version
Version.
Long integer type.
authType
Authentication type.
Integer type.
169
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
...
Response
HTTP/1.1 200 OK
Content-Type: application/xml
...
<telnetParamTemplate>
<id>1</id>
<type>0</type>
<name>default</name>
<authType>5</authType>
<userName/>
<userPassword/>
<superPassword/>
<authTypeStr>No username, no password</authTypeStr>
<timeout>4</timeout>
<retries>1</retries>
<port>23</port>
<version>1</version>
</telnetParamTemplate>
170
Interface URI
/plat/res/ssh
Access Method
HTTP
GET
Parameters
Query parameter
start
size
desc
total
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. The
message body is empty.
HTTP/1.1 200 OK
Total: 17
171
Message body
<list>
<sshParamTemplate>
<id>101</id>
<type>2</type>
<name>101</name>
<authType>0</authType>
<authTypeStr>Password</authTypeStr>
<userName>admin</userName>
<password/>
<port>22</port>
<timeout>10</timeout>
<retries>3</retries>
<keyFileName/>
<keyPhrase/>
<superPassword/>
<link href="http://localhost:8080/imcrs/plat/res/ssh/101" op="GET" rel="self"/>
</sshParamTemplate>
...
<link rel="next" href="http://imc_host:port/imcrs/plat/res/ssh?start=10&size=10"/>
</list>
For the description on each field of the returned value, see Query SSH Template Information.
Example
Query SSH template information list.
Request
GET http://imc_host:8080/imcrs/plat/res/ssh
accept: application/xml
...
Response
HTTP/1.1 200 OK
Content-Type: application/xml
...
<list>
<sshParamTemplate>
<id>101</id>
<type>2</type>
<name>101</name>
<authType>0</authType>
<authTypeStr>Password</authTypeStr>
<userName>admin</userName>
<password/>
<port>22</port>
<timeout>10</timeout>
<retries>3</retries>
<keyFileName/>
<keyPhrase/>
<superPassword/>
<link href="http://localhost:8080/imcrs/plat/res/ssh/101" op="GET" rel="self"/>
</sshParamTemplate>
...
</list>
172
Interface URI
/plat/res/ssh/{id}
Access Method
HTTP
GET
Parameters
Path parameter
id
Returned Result
Status codes
Message body
<sshParamTemplate>
<id>101</id>
<type>2</type>
<name>101</name>
<authType>0</authType>
<authTypeStr>Password</authTypeStr>
<userName>admin</userName>
<password/>
<port>22</port>
<timeout>10</timeout>
<retries>3</retries>
<keyFileName/>
<keyPhrase/>
<superPassword/>
<link href="http://localhost:8080/imcrs/plat/res/ssh/101" op="GET" rel="self"/>
</sshParamTemplate>
Element description
sshParamTemplate sub-elements
id
name
Parameter name.
String type.
type
Parameter type.
Integer type.
authType
Authentication mode.
Integer type.
173
sshParamTemplate sub-elements
authTypeStr
userName
Username.
String type.
timeout
Timeout time.
Integer type.
retries
Number of retries.
Integer type.
password
Password.
String type.
port
Port.
Integer type.
keyFileName
keyPhrase
superPassword
Super password.
String type.
Example
Query SSH template information with the template ID 101.
Request
GET http://imc_host:8080/imcrs/plat/res/ssh/101
accept: application/xml
...
Response
HTTP/1.1 200 OK
Content-Type: application/xml
...
<sshParamTemplate>
<id>101</id>
<type>2</type>
<name>101</name>
<authType>0</authType>
<authTypeStr>Password</authTypeStr>
<userName>admin</userName>
<password/>
<port>22</port>
<timeout>10</timeout>
<retries>3</retries>
<keyFileName/>
<keyPhrase/>
<superPassword/>
<link href="http://localhost:8080/imcrs/plat/res/ssh/101" op="GET" rel="self"/>
</sshParamTemplate>
174
Interface URI
/sql
Access Method
HTTP
GET
Parameters
Query parameter
componentId
Component ID.
String type. Required. No default value.
sql
Returned Result
Status codes
Message header
HTTP/1.1 200 OK
Total: 7
Message body
<sqlResult total="1000">
<record type="string">
<value>1.0.8802.1.1.2.0.6.1</value>
<value>1.0.8802.1.1.2.0</value>
<value>6</value>
<value>1</value>
<value>Neighbor information has changed.</value>
<value>0</value>
<value>4</value>
<value>0</value>
<value>0</value>
<value>1</value>
<value />
<value>Neighbor information has changed. </value>
<value />
<value>0</value>
<value>0</value>
<value />
<value>Status of the neighboring device changed, such as link up, link down, or port change.</value>
</record>
...
</sqlResult>
175
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.1 200 OK
Content-Type: application/xml
...
<sqlResult total="1000">
<record type="string">
<value>1.0.8802.1.1.2.0.6.1</value>
<value>1.0.8802.1.1.2.0</value>
<value>6</value>
<value>1</value>
<value>Neighbor information changed</value>
<value>0</value>
<value>4</value>
<value>0</value>
<value>0</value>
<value>1</value>
<value />
<value>Neighbor information changed </value>
<value />
<value>0</value>
<value>0</value>
<value />
<value>Status of the neighbor changed, such as link up, link down, or port change.</value>
</record>
...
</sqlResult>
176
6 User Management
The User Management category provides multiple commands for managing, modifying, and
querying user records in your IMC system. User Management commands include:
Query Users
Add User
Modify User
Delete User
177
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. No default value.
Email address
String type, supporting wildcard characters. Optional. No default value.
userGroupId
ssName
ssType
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, the default value is used.
size
orderBy
desc
total
178
User Management
Returned Result
Status codes
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
<list>
<user>
<id>2</id>
<userName>lisi</userName>
<certification>lisi002</certification>
<address>Tianjin</address>
<phone>13810561010</phone>
<email>lisi@h3c.com</email>
<ssType>2</ssType>
<groupId>1</groupId>
<groupName>ungroup</groupName>
<additionalInfoId>2</additionalInfoId>
<link href="http://localhost:8080/imcrs/user/2" op="GET" rel="self"/>
</user>
Element description
For meanings of the fields in the message body, see Query User Information.
Query Users
179
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
...
<list>
<user>
<id>2</id>
<userName>lisi</userName>
<certification>lisi002</certification>
<address>Tianjin</address>
<phone>13810561010</phone>
<email>lisi@h3c.com</email>
<ssType>2</ssType>
<groupId>1</groupId>
<groupName>ungroup</groupName>
<additionalInfoId>2</additionalInfoId>
<link href="http://localhost:8080/imcrs/user/2" op="GET" rel="self"/>
</user>
...
</list>
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
Message header
HTTP/1.1 200 OK
Message body
<user>
<id>1</id>
<userName>zhangsan</userName>
<certification>zhangsan001</certification>
<address>Bejing</address>
<phone>01088101023</phone>
<email>zhangsan@h3c.com</email>
<ssType>2</ssType>
</user>
Element description
user sub-elements
id
User ID.
Long integer type. Required. No default value.
userName
User name.
String type.
certification
Identity number.
String type.
address
Contact address.
String type.
181
user sub-elements
phone
Telephone number.
String type.
Email address.
String type.
ssType
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
...
<user>
<id>1</id>
<userName>zhangsan</userName>
<certification>zhangsan001</certification>
<address>Bejing</address>
<phone>01088101023</phone>
<email>zhangsan@h3c.com</email>
<ssType>2</ssType>
</user>
182
User Management
Add User
Add a user with specified information.
Interface URI
/user
Access Method
HTTP
POST
Message body
<user>
<userName>wanger</userName>
<certification>wanger001</certification>
<address>Shanghai</address>
<phone>02088784567</phone>
<email>wanger@h3c.com</email>
<ssType>1</ssType>
<groupId>1</groupId>
</user>
Element description
user sub-elements
userName
User name.
String type. Required. No default value.
certification
Identity number.
String type. Required. No default value.
address
Contact address.
String type. Optional. The default value is empty.
phone
Telephone number.
String type. Optional. The default value is empty.
Email address.
String type. Optional. The default value is empty.
Returned Result
Status codes
Message header
If the operation succeeds, the Location field gives the URI of the new resource. No message body
is included.
HTTP/1.1 201 Created
Location: http://localhost:8080/imcrs/user/4
Example
Add a user.
Request
POST http://imc_host:8080/imcrs/user
accept: application/xml
Content-Type: application/xml; charset=UTF-8
...
<user>
<userName>wanger</userName>
<certification>wanger001</certification>
<address>Shanghai</address>
<phone>02088784567</phone>
<email>wanger@h3c.com</email>
</user>
Response
HTTP/1.1 201 Created
Location: http://localhost:8080/imcrs/user/4
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
<user>
<userName>wanger</userName>
<certification>wanger001</certification>
<address>Shanghai</address>
<phone>02088784567</phone>
<email>wanger@h3c.com</email>
</user>
Element description
Path parameters
userName
User name.
Optional. If the element does not exist, the value is not changed. If the element exists, the value
cannot be null.
certification
Identity number.
Optional. If the element does not exist, the value is not changed. If the element exists, the value
cannot be null.
address
Contact address.
Optional. If the element does not exist, the value is not changed. If the element exists, the value
cannot be null.
phone
Telephone number.
Optional. If the element does not exist, the value is not changed. If the element exists, the value
cannot be null.
Email address.
Optional. If the element does not exist, the value is not changed. If the element exists, the value
cannot be null.
Returned Result
Status codes
Example
Modify information about the user with ID 2.
Request
PUT http://imc_host:8080/imcrs/user/2
accept: application/xml
...
<user>
<userName>wanger</userName>
<certification>wanger001</certification>
<address>Shanghai</address>
<phone>02088784567</phone>
<email>wanger@h3c.com</email>
<ssType>1</ssType>
<groupId>1</groupId>
</user>
Response
HTTP/1.1 204 No Content
...
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
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
...
Response
HTTP/1.1 204 No Content
Delete User
187
Interface URI
/user/additionalInfo
Access Method
HTTP
GET
Parameters
Query parameters
total
Returned Result
Status codes
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
<list>
<userAdditionalInfo>
<id>1</id>
<columnId>COLUMN_01</columnId>
<fieldName>school</fieldName>
<required>true</required>
<fieldType>4</fieldType>
<fieldLen>40</fieldLen>
<defaultValue>Bejing University</defaultValue>
<priority>1</priority>
<showForPreRegisterUser>false</showForPreRegisterUser>
</userAdditionalInfo>
...
</list>
Element description
For meanings of the fields in the message body, see Query User Additional Information Definition.
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
...
<list>
<userAdditionalInfo>
<id>1</id>
<columnId>COLUMN_01</columnId>
<fieldName>school</fieldName>
<required>true</required>
<fieldType>4</fieldType>
<fieldLen>40</fieldLen>
<defaultValue>Bejing University</defaultValue>
<priority>1</priority>
<showForPreRegisterUser>false</showForPreRegisterUser>
</userAdditionalInfo>
...
</list>
Interface URI
/user/additionalInfo/{id}
Access Method
HTTP
GET
Parameters
Path parameters
id
Returned Result
Status codes
Message header
HTTP/1.1 200 OK
Message body
<userAdditionalInfo>
<id>1</id>
<columnId>COLUMN_01</columnId>
<fieldName>school</fieldName>
<required>true</required>
<fieldType>4</fieldType>
<fieldLen>40</fieldLen>
<defaultValue>Bejing University</defaultValue>
<priority>1</priority>
<showForPreRegisterUser>false</showForPreRegisterUser>
</userAdditionalInfo>
Element description
userAdditionalInfo sub-elements
id
columnId
fieldName
Field name.
String type.
required
190 User Management
Required or not.
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
fieldMax
fieldMin
defaultValue
Default value.
String type.
priority
Option elements.
Element type.
options/id
Option ID.
Long integer type.
191
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
...
<userAdditionalInfo>
<id>2</id>
<columnId>COLUMN_02</columnId>
<fieldName>age</fieldName>
<required>true</required>
<fieldType>1</fieldType>
<fieldMax>100</fieldMax>
<fieldMin>20</fieldMin>
<defaultValue>25</defaultValue>
<priority>2</priority>
<showForPreRegisterUser>false</showForPreRegisterUser>
</userAdditionalInfo>
Interface URI
/user/additionalInfo
Access Method
HTTP
POST
Message body
<userAdditionalInfo>
<fieldName>digits</fieldName>
<required>true</required>
<fieldType>5</fieldType>
<defaultValue>1</defaultValue>
<priority>3</priority>
<showForPreRegisterUser>false</showForPreRegisterUser>
<options>
<id>1</id>
<optionsValue>1</optionsValue>
</options>
<options>
<id>2</id>
<optionsValue>2</optionsValue>
</options>
</userAdditionalInfo>
Element description
Query parameters
fieldName
Field name.
String type. Required. No default value.
required
Required or not.
Boolean type. Optional. The default value is true.
fieldType
Field type. 1 for integer. 2 for decimal. 3 for alphanumeric character. 4 for any character. 5
for option.
Integer type. Required. No default value.
fieldLen
fieldMax
fieldMin
defaultValue
193
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.
Returned Result
Status codes
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/user/additionalInfo/3
Example 1
Add a user additional information definition of the option type.
Request
POST http://localhost:8080/imcrs/user/additionalInfo
accept: application/xml
Content-Type: application/xml; charset=UTF-8
...
<userAdditionalInfo>
<fieldName>digits</fieldName>
<required>true</required>
<fieldType>5</fieldType>
<defaultValue>1</defaultValue>
<priority>3</priority>
<showForPreRegisterUser>false</showForPreRegisterUser>
<options>
<id>1</id>
<optionsValue>1</optionsValue>
</options>
<options>
<id>2</id>
<optionsValue>2</optionsValue>
</options>
</userAdditionalInfo>
Response
HTTP/1.1 201 Created
Location: http://localhost:8080/imcrs/user/additionalInfo/1
194
User Management
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
...
<userAdditionalInfo>
<id>2</id>
<fieldName>age</fieldName>
<required>true</required>
<fieldType>1</fieldType>
<fieldMax>100</fieldMax>
<fieldMin>20</fieldMin>
<defaultValue>25</defaultValue>
<priority>2</priority>
<showForPreRegisterUser>false</showForPreRegisterUser>
</userAdditionalInfo>
Response
HTTP/1.1 201 Created
Location: http://localhost:8080/imcrs/user/additionalInfo/2
Interface URI
/user/additionalInfo/{id}
Access Method
HTTP
PUT
Parameters
Path parameters
id
Message body
<userAdditionalInfo>
<fieldName>job</fieldName>
<required>true</required>
<fieldType>3</fieldType>
<fieldLen>12</fieldLen>
<defaultValue>google</defaultValue>
<priority>2</priority>
<showForPreRegisterUser>false</showForPreRegisterUser>
</userAdditionalInfo>
Element description
userAdditionalInfo sub-elements
fieldName
Field name.
String type. Optional. If the element does not exist, the value is not changed. If the element
exists, the value cannot be null.
required
Required 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.
fieldType
Field type. 1 for integer. 2 for decimal. 3 for alphanumeric character. 4 for any character. 5
for option.
Integer type. Optional. If the element does not exist, the value is not changed. If the element
exists, the value cannot be null.
fieldLen
fieldMax
fieldMin
defaultValue
196
User Management
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.
Returned Result
Status codes
Example
Modify the user additional information definition with ID 1.
Request
PUT http://imc_host:8080/imcrs/user/additionalInfo/1
accept: application/xml
...
<userAdditionalInfo>
<fieldName>job</fieldName>
<required>true</required>
<fieldType>3</fieldType>
<fieldLen>12</fieldLen>
<defaultValue>google</defaultValue>
<priority>2</priority>
<showForPreRegisterUser>false</showForPreRegisterUser>
</userAdditionalInfo>
Response
HTTP/1.1 204 No Content
...
197
Interface URI
/user/additionalInfo/{id}
Access Method
HTTP
DELETE
Parameters
Path parameters
id
Returned Result
Status codes
Message header
HTTP/1.1 204 No Content
...
Example
Delete the user additional information definition with ID 1.
Request
DELETE http://imc_host:8080/imcrs/user/additionalInfo/1
accept: application/xml
...
Response
HTTP/1.1 204 No Content
Query IP Segment
Add IP Segment
Modify IP Segment
Release IP Segment
Query IP Addresses
Assign IP Address
199
Interface URI
/res/access/unauthorizedAccess
Access Method
HTTP
GET
Parameters
Query Parameters
resPrivilegeFilter
terminalIp
Terminal IP address.
String type, supporting wildcard characters. Optional. No default value.
terminalMac
terminalName
Terminal name.
String type, supporting wildcard characters. Optional. No default value.
deviceLabel
Device label.
String type. Optional. No default value.
deviceIp
Device IP address.
String type. Optional. No default value.
ifDesc
Interface description.
String type. Optional. No default value.
processStatus
Processing status.
Integer type. Optional. 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, the default value is used.
size
orderBy
desc
total
Returned Result
Status codes
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
<list>
<unauthorizedAccess>
<id>-6750808576775831498</id>
<deviceId>17</deviceId>
<deviceLabel>Quidway</deviceLabel>
<deviceIp>10.153.89.2</deviceIp>
<ifDesc>Ethernet1/0/31</ifDesc>
<processStatus>0</processStatus>
<terminalMac>00:e0:86:10:7f:50</terminalMac>
<terminalName/>
<terminalIp>10.153.89.16</terminalIp>
</unauthorizedAccess>
...
</list>
Elements
unauthorizedAccess sub-elements
terminalIp
Terminal IP address.
String type.
terminalMac
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.
processStatus
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
...
<list>
<unauthorizedAccess>
<id>-6750808576775831498</id>
<deviceId>17</deviceId>
<deviceLabel>Quidway</deviceLabel>
<deviceIp>10.153.89.2</deviceIp>
<ifDesc>Ethernet1/0/31</ifDesc>
<processStatus>0</processStatus>
<terminalMac>00:e0:86:10:7f:50</terminalMac>
<terminalName/>
<terminalIp>10.153.89.16</terminalIp>
</unauthorizedAccess>
...
</list>
Interface URI
/res/access/unauthorizedAccessLog
Access Method
HTTP
GET
Parameters
Query Parameters
resPrivilegeFilter
terminalIp
Terminal IP address.
String type, supporting wildcard characters. Optional. No default value.
terminalMac
terminalName
Terminal name.
String type, supporting wildcard characters. Optional. No default value.
deviceLabel
Device label.
String type. Optional. No default value.
deviceIp
Device IP address.
String type. Optional. No default value.
ifDesc
Interface description.
String type. Optional. No default value.
actionStatus
Action status.
Integer type. Optional. 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
orderBy
desc
total
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
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: 976
Message body
<list>
<unauthorizedAccessLog>
<id>1</id>
<actionStatus>1</actionStatus>
<terminalIp>10.153.89.182</terminalIp>
<terminalMac>00:e0:fc:00:39:01</terminalMac>
>
<terminalName/>
<deviceLabel>Quidway</deviceLabel>
<deviceIp>10.153.89.2</deviceIp>
<ifDesc>Ethernet1/0/14</ifDesc>
<deviceId>17</deviceId>
<conflictType>4</conflictType>
<conflictFindTime>1308747088</conflictFindTime>
<conflictFindTimeDesc>2011-06-22 20:51:28</conflictFindTimeDesc>
<conflictDesc>When the device 10.153.89.2 is polled, unauthorized MAC address 00:e0:fc:00:39:01 is detected with the
connecting interface 10.153.89.2-Ethernet1/0/14.
</conflictDesc>
</unauthorizedAccessLog>
...
</list>
Elements
unauthorizedAccessLog sub-elements
actionStatus
Action status. 1 for no action. 2 for initializing. 3 for action conflict. 4 for waiting for execution.
5 for executing. 6 for execution completed.
Integer type.
terminalIp
Terminal IP address.
String type.
terminalMac
terminalName
Terminal name.
String type.
deviceId
Device ID.
Long integer type.
Query Unauthorized Access Logs 205
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
Conflict description.
String type.
Example
Query and list unauthorized access logs.
Request
GET http://localhost:8080/imcrs/res/access/unauthorizedAccessLog
accept: application/xml
...
Response
HTTP/1.1 200 OK
Content-Type: application/xml
...
<list>
<unauthorizedAccessLog>
<id>1</id>
<actionStatus>1</actionStatus>
<terminalIp>10.153.89.182</terminalIp>
<terminalMac>00:e0:fc:00:39:01</terminalMac>
<terminalName/>
<deviceLabel>Quidway</deviceLabel>
<deviceIp>10.153.89.2</deviceIp>
<ifDesc>Ethernet1/0/14</ifDesc>
<deviceId>17</deviceId>
<conflictType>4</conflictType>
<conflictFindTime>1308747088</conflictFindTime>
<conflictFindTimeDesc>2011-06-22 20:51:28</conflictFindTimeDesc>
<conflictDesc>When the device 10.153.89.2 is polled, unauthorized MAC address 00:e0:fc:00:39:01 is detected with the
connecting interface
10.153.89.2-Ethernet1/0/14.</conflictDesc>
</unauthorizedAccessLog>
...
</list>
Interface URI
/res/access/historyAccessLog
Access Method
HTTP
GET
Parameters
Query Parameters
resPrivilegeFilter
terminalIp
Terminal IP address.
String type, supporting wildcard characters. Optional. No default value.
terminalMac
terminalName
Terminal name.
String type, supporting wildcard characters. Optional. No default value.
deviceLabel
Device label.
String type. Optional. No default value.
deviceIp
Device IP address.
String type. Optional. No default value.
ifDesc
Interface description.
String type. Optional. No default value.
vlanId
VLAN ID.
Integer type. Optional. 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
orderBy
desc
total
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
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: 976
Message body
<list>
<historyAccessLog>
<id>-8132800096806244989</id>
<terminalIp>10.153.88.171</terminalIp>
<terminalMac>00:0c:29:ff:e8:2d</terminalMac>
<terminalName/>
<deviceSymbolName>H3C</deviceSymbolName>
<deviceId>4</deviceId>
<deviceIp>10.153.89.1</deviceIp>
<ifDesc>GigabitEthernet4/0/3</ifDesc>
<vlanId>2</vlanId>
<upLineTime>1308794210</upLineTime>
<downLineTime>0</downLineTime>
</historyAccessLog>
...
</list>
Elements
unauthorizedAccessLog sub-elements
terminalIp
Terminal IP address.
String type.
terminalMac
terminalName
Terminal name.
String type.
deviceId
Device ID.
Long integer type.
deviceLabel
Device label.
String type.
deviceIp
Device IP address.
String type.
unauthorizedAccessLog sub-elements
ifDesc
Interface description.
String type.
vlanId
VLAN ID.
Integer type.
upLineTime
downLineTime
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
...
<list>
<historyAccessLog>
<id>-8132800096806244989</id>
<terminalIp>10.153.88.171</terminalIp>
<terminalMac>00:0c:29:ff:e8:2d</terminalMac>
<terminalName/>
<deviceSymbolName>H3C</deviceSymbolName>
<deviceId>4</deviceId>
<deviceIp>10.153.89.1</deviceIp>
<ifDesc>GigabitEthernet4/0/3</ifDesc>
<vlanId>2</vlanId>
<upLineTime>1308794210</upLineTime>
<downLineTime>0</downLineTime>
</historyAccessLog>
...
</list>
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
total
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, the default value is used.
size
orderBy
desc
210
Returned Result
Status codes
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
<list>
<ipMacLearnResult>
<deviceId>2</deviceId>
<deviceIp>10.153.89.1</deviceIp>
<ifIndex>33</ifIndex>
<ifDesc>GigabitEthernet4/0/3</ifDesc>
<vlanId>2</vlanId>
<learnIp>10.153.88.167</learnIp>
<learnMac>00:09:6b:b0:6e:14</learnMac>
<device>http://localhost:8080/imcrs/plat/res/device/2</device>
<iface>http://localhost:8080/imcrs/plat/res/device/2/interface/33</iface>
</ipMacLearnResult>
...
</list>
Elements
ipMacLearnResult sub-elements
deviceId
Location address.
String type.
deviceIp
Device IP address.
String type.
ifDesc
Interface description.
String type.
ifIndex
Interface index.
Long integer type.
vlanId
VLAN ID.
Integer type.
learnIp
Learned IP address.
String type.
learnMac
device
iface
211
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
...
<list>
<ipMacLearnResult>
<deviceId>2</deviceId>
<deviceIp>10.153.89.1</deviceIp>
<ifIndex>33</ifIndex>
<ifDesc>GigabitEthernet4/0/3</ifDesc>
<vlanId>2</vlanId>
<learnIp>10.153.88.167</learnIp>
<learnMac>00:09:6b:b0:6e:14</learnMac>
<device>http://localhost:8080/imcrs/plat/res/device/2</device>
<iface>http://localhost:8080/imcrs/plat/res/device/2/interface/33</iface>
</ipMacLearnResult>
...
</list>
212
Interface URI
/res/access/realtimeLocate
Access Method
HTTP
GET
Parameters
Query parameters
type
value
Location address.
String type. Required. The default value is an empty string.
total
Returned Result
Status codes
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: 976
Message body
<list>
<realtimeLocation>
<locateIp>10.153.89.1</locateIp>
<deviceIp>10.153.89.77</deviceIp>
<ifDesc>Ethernet0/6</ifDesc>
</realtimeLocation>
...
</list>
213
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
...
<list>
<realtimeLocation>
<locateIp>10.153.89.1</locateIp>
<deviceIp>10.153.89.77</deviceIp>
<ifDesc>Ethernet0/6</ifDesc>
</realtimeLocation>
...
</list>
214
Interface URI
/res/access/assignedIpScope
Access Method
HTTP
GET
Path parameters
None
Returned Result
Status codes
Message header
HTTP/1.1 200 OK
Message body
<assignedIpScope>
<percent>0.0</percent>
<assignedIpScope>
<id>-299</id>
<ip>System default IP segment</ip>
<name>Administrator.</name>
<description>Does not belong to any set of assigned IP addresses in the assigned IP segment range.</description>
<parentId>-300</parentId>
<percent>0.0</percent>
</assignedIpScope>
<assignedIpScope>
<id>1</id>
<ip>10.153.89.1-10.153.89.10</ip>
<startIp>10.153.89.1</startIp>
<endIp>10.153.89.10</endIp>
<name>1to10</name>
<description>10.153.89.1 to 10.153.89.10</description>
<parentId>-300</parentId>
<percent>0.0</percent>
<operatorGroup>http://localhost:8080/imcrs/plat/operatorGroup/1</operatorGroup>
<operatorGroup>http://localhost:8080/imcrs/plat/operatorGroup/2</operatorGroup>
<assignedIpScope>
<id>3</id>
<ip>10.153.89.1-10.153.89.4</ip>
<startIp>10.153.89.1</startIp>
<endIp>10.153.89.4</endIp>
<name>1to4</name>
<description>10.153.89.1 to 10.153.89.4</description>
<parentId>1</parentId>
<rightIpId>1</rightIpId>
<percent>0.0</percent>
</assignedIpScope>
</assignedIpScope>
...
</assignedIpScope>
215
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
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.
rightIpId
ID of the parent IP segment that the child IP segment inherit rights from.
Long integer type.
operatorGroup
216
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
...
<assignedIpScope>
<percent>0.0</percent>
<assignedIpScope>
<id>-299</id>
<ip>System default IP segment</ip>
<name>Administrator.</name>
<description>Does not belong to any set of assigned IP addresses in the assigned IP segment range.</description>
<parentId>-300</parentId>
<percent>0.0</percent>
</assignedIpScope>
<assignedIpScope>
<id>1</id>
<ip>10.153.89.1-10.153.89.10</ip>
<startIp>10.153.89.1</startIp>
<endIp>10.153.89.10</endIp>
<name>1to10</name>
<description>10.153.89.1 to 10.153.89.10</description>
<parentId>-300</parentId>
<percent>0.0</percent>
<operatorGroup>http://localhost:8080/imcrs/plat/operatorGroup/1</operatorGroup>
<operatorGroup>http://localhost:8080/imcrs/plat/operatorGroup/2</operatorGroup>
<assignedIpScope>
<id>3</id>
<ip>10.153.89.1-10.153.89.4</ip>
<startIp>10.153.89.1</startIp>
<endIp>10.153.89.4</endIp>
<name>1to4</name>
<description>10.153.89.1 to 10.153.89.4</description>
<parentId>1</parentId>
<rightIpId>1</rightIpId>
<percent>0.0</percent>
</assignedIpScope>
</assignedIpScope>
...
</assignedIpScope>
217
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
Message header
HTTP/1.1 200 OK
Message body
<assignedIpScope>
<id>1</id>
<ip>10.153.89.1-10.153.89.10</ip>
<startIp>10.153.89.1</startIp>
<endIp>10.153.89.10</endIp>
<name>1to10</name>
<description>10.153.89.1 to 10.153.89.10</description>
<parentId>-300</parentId>
<percent>0.0</percent>
<operatorGroupId>2</operatorGroupId>
<operatorGroupId>1</operatorGroupId>
<assignedIpScope>
<id>3</id>
<ip>10.153.89.1-10.153.89.4</ip>
<startIp>10.153.89.1</startIp>
<endIp>10.153.89.4</endIp>
<name>1to4</name>
<description>10.153.89.1 to 10.153.89.4</description>
<parentId>1</parentId>
<rightIpId>1</rightIpId>
<percent>0.0</percent>
</assignedIpScope>
</assignedIpScope>
218
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
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.
rightIpId
ID of the parent IP segment that the child IP segment inherit rights from.
Long integer type.
operatorGroupId
Query IP Segment
219
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
...
<assignedIpScope>
<id>1</id>
<ip>10.153.89.1-10.153.89.10</ip>
<startIp>10.153.89.1</startIp>
<endIp>10.153.89.10</endIp>
<name>1to10</name>
<description>10.153.89.1 to 10.153.89.10</description>
<parentId>-300</parentId>
<percent>0.0</percent>
<operatorGroupId>2</operatorGroupId>
<operatorGroupId>1</operatorGroupId>
<assignedIpScope>
<id>3</id>
<ip>10.153.89.1-10.153.89.4</ip>
<startIp>10.153.89.1</startIp>
<endIp>10.153.89.4</endIp>
<name>1to4</name>
<description>10.153.89.1 to 10.153.89.4</description>
<parentId>1</parentId>
<rightIpId>1</rightIpId>
<percent>0.0</percent>
</assignedIpScope>
</assignedIpScope>
Add IP Segment
Add an IP segment.
Interface URI
/res/access/assignedIpScope
Access Method
HTTP
POST
Message body
<assignedIpScope>
<startIp>10.153.89.21</startIp>
<endIp>10.153.89.30</endIp>
<name>21to30</name>
<description>10.153.89.21 to 10.153.89.30</description>
</assignedIpScope>
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. No default value.
description
Description.
String type. Optional. The default value is empty.
operatorGroupId
Returned Result
Status codes
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/7
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
...
<assignedIpScope>
<startIp>10.153.89.21</startIp>
<endIp>10.153.89.30</endIp>
<name>21to30</name>
<description>10.153.89.21 to 10.153.89.30</description>
</assignedIpScope>
Response
HTTP/1.1 201 Created
Location: http://localhost:8080/imcrs/res/access/assignedIpScope/7
Example 2
Add an IP segment ranging from 10.153.89.60 to 10.153.89.80, and grant rights to the IP
segment to operator groups with IDs 1, 2, and 4.
Request
POST http://localhost:8080/imcrs/res/access/assignedIpScope
accept: application/xml
Content-Type: application/xml; charset=UTF-8
...
<assignedIpScope>
<startIp>10.153.89.60</startIp>
<endIp>10.153.89.80</endIp>
<name>60to80</name>
<description>10.153.89.60 to 10.153.89.80</description>
<operatorGroupId>1</operatorGroupId>
<operatorGroupId>2</operatorGroupId>
<operatorGroupId>4</operatorGroupId>
</assignedIpScope>
Response
HTTP/1.1 201 Created
Location: http://localhost:8080/imcrs/res/access/assignedIpScope/12
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
<assignedIpScope>
<startIp>10.153.89.21</startIp>
<endIp>10.153.89.25</endIp>
<name>21to25</name>
<description>10.153.89.21 to 10.153.89.25</description>
</assignedIpScope>
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. No default value.
description
Description.
String type. Optional. No default value.
Returned Result
Status codes
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
...
<assignedIpScope>
<startIp>10.153.89.21</startIp>
<endIp>10.153.89.25</endIp>
<name>21to25</name>
<description>10.153.89.21 to 10.153.89.25</description>
</assignedIpScope>
Response
HTTP/1.1 201 Created
Location: http://localhost:8080/imcrs/res/access/assignedIpScope/8
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
<assignedIpScope>
<name>21to30 update</name>
<description>10.153.89.21 to 10.153.89.30 update</description>
</assignedIpScope>
Elements
assignedIpScope sub-elements
name
Owner.
String type. Optional. If the element does not exist, the value is not changed. If the element exists,
the value cannot be null.
description
Description.
String type. Optional. If the element does not exist, the value is not changed. If the element exists,
the value cannot be null.
operatorGroupId
Returned Result
Status codes
Example
Modify the IP segment with ID 13.
Request
PUT http://imc_host:8080/imcrs/asset/access/assignedIpScope/13
accept: application/xml
...
<assignedIpScope>
<name>21to30 update</name>
<description>10.153.89.21 to 10.153.89.30 update</description>
</assignedIpScope>
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
Message header
HTTP/1.1 204 No Content
...
Example
Release the IP segment with ID 13.
Request
DELETE http://localhost:8080/imcrs/res/access/assignedIpScope/13
accept: application/xml
...
Response
HTTP/1.1 204 No Content
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
orderBy
desc
Returned Result
Status codes
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: 12
Message body
<list>
<assignedIpInfo>
<ip>10.153.89.1</ip>
<name>H3C</name>
</assignedIpInfo>
<assignedIpInfo>
<ip>10.153.89.10</ip>
</assignedIpInfo>
<assignedIpInfo>
<ip>10.153.89.13</ip>
</assignedIpInfo>
...
</list>
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
...
<list>
<assignedIpInfo>
<ip>10.153.89.1</ip>
<name>H3C</name>
</assignedIpInfo>
<assignedIpInfo>
<ip>10.153.89.10</ip>
</assignedIpInfo>
<assignedIpInfo>
<ip>10.153.89.13</ip>
</assignedIpInfo>
...
</list>
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
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
<list>
<assignedIpInfo>
<ip>10.153.89.1</ip>
<name>H3C</name>
</assignedIpInfo>
<assignedIpInfo>
<ip>10.153.89.10</ip>
</assignedIpInfo>
...
</list>
Elements
assignedIpInfo sub-elements
id
ID of the IP address.
Long integer type.
ip
IP address.
String type.
name
Owner.
231
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
...
<list>
<assignedIpInfo>
<ip>10.153.89.1</ip>
<name>H3C</name>
</assignedIpInfo>
<assignedIpInfo>
<ip>10.153.89.10</ip>
</assignedIpInfo>
...
</list>
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
total
orderBy
desc
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
ip
IP address
String type. Optional. No default value.
name
Owner.
String type. Optional. No default value.
description
Description.
String type. Optional. No default value.
Returned Result
Status codes
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
<list>
<assignedIpInfo>
<id>4</id>
<ip>10.153.89.12</ip>
<parentId>2</parentId>
</assignedIpInfo>
<assignedIpInfo>
<id>5</id>
<ip>10.153.89.2</ip>
<parentId>3</parentId>
</assignedIpInfo>
...
</list>
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.
parentId
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
...
<list>
2</parentId>
</assignedIpInfo>
<assignedIpInfo>
<id>5</id>
<ip>10.153.89.2</ip>
<parentId>3</parentId>
</assignedIpInfo>
...
</list>
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
<assignedIpInfo>
<ip>10.153.89.8</ip>
<name>H3C111</name>
<description>10.153.89.8 rest</description>
</assignedIpInfo>
Elements
assignedIpInfo sub-elements
ip
IP address.
String type. Required. No default value.
name
Owner.
String type. Required. No default value.
description
Description.
String type. Optional. No default value.
Returned Result
Status codes
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/ip/15
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
...
<assignedIpInfo>
<ip>10.153.89.8</ip>
<name>H3C111</name>
<description>10.153.89.8 rest</description>
</assignedIpInfo>
Response
HTTP/1.1 201 Created
Location: http://localhost:8080/imcrs/res/access/assignedIpScope/ip/15
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
Message header
HTTP/1.1 204 No Content
...
Example
Release the IP segment with ID 13.
Request
DELETE http://imc_host:8080/imcrs/asset/access/assignedIpScope/ip/15
accept: application/xml
...
Response
HTTP/1.1 204 No Content
Interface URI
/res/access/macAccessBind
Access Method
HTTP
GET
Parameters
Query parameters
resPrivilegeFilter
terminalIp
Terminal IP address.
String type, supporting wildcard characters. Optional. No default value.
terminalMac
terminalName
Terminal name.
String type, supporting wildcard characters. Optional. No default value.
deviceLabel
Device label.
String type. Optional. No default value.
deviceIp
Device IP address.
String type. Optional. No default value.
ifDesc
Interface description.
String type. Optional. No default value.
bindType
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, the default value is used.
size
orderBy
desc
total
Returned Result
Status codes
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
<list>
<macAccessBind>
<id>3</id>
<deviceId>0</deviceId>
<deviceLabel/>
<deviceIp/>
<ifDesc/>
<terminalMac>10:20:30:40:50:60</terminalMac>
<terminalName>yourTerminal</terminalName>
<terminalIp/>
<bindType>1</bindType>
<link href="http://localhost:8080/imcrs/res/access/macAccessBind/3" op="GET" rel="self"/>
</macAccessBind>
...
</list>
Elements
For meanings of the fields in the message body, see Query Terminal Access Binding.
Example
Query and list terminal access bindings.
Request
GET http://localhost:8080/imcrs/res/access/macAccessBind
accept: application/xml
...
Response
HTTP/1.1 200 OK
Content-Type: application/xml
...
<list>
<macAccessBind>
<id>3</id>
<deviceId>0</deviceId>
<deviceLabel/>
<deviceIp/>
<ifDesc/>
<terminalMac>10:20:30:40:50:60</terminalMac>
<terminalName>yourTerminal</terminalName>
<terminalIp/>
<bindType>1</bindType>
<link href="http://localhost:8080/imcrs/res/access/macAccessBind/3" op="GET" rel="self"/>
</macAccessBind>
...
</list>
Interface URI
/res/access/macAccessBind/{id}
Access Method
HTTP
GET
Parameters
Path parameters
id
Returned Result
Status codes
Message header
HTTP/1.1 200 OK
Message body
<macAccessBind>
<id>1</id>
<deviceId>2</deviceId>
<deviceLabel>H3C</deviceLabel>
<deviceIp>10.153.89.1</deviceIp>
<ifDesc>GigabitEthernet4/0/3</ifDesc>
<terminalMac>11:22:33:44:55:66</terminalMac>
<terminalName>myTerminal</terminalName>
<terminalIp/>
<bindType>2</bindType>
<device>http://localhost:8080/imcrs/plat/res/device/2</device>
</macAccessBind>
Elements
macAccessBind sub-elements
id
terminalIp
Terminal IP address.
String type.
terminalMac
241
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
device
Example
Query information about the terminal access binding with ID 1.
Request
GET http://localhost:8080/imcrs/res/access/macAccessBind/1
accept: application/xml
...
Response
HTTP/1.1 200 OK
Content-Type: application/xml
...
<macAccessBind>
<id>1</id>
<deviceId>2</deviceId>
<deviceLabel>H3C</deviceLabel>
<deviceIp>10.153.89.1</deviceIp>
<ifDesc>GigabitEthernet4/0/3</ifDesc>
<terminalMac>11:22:33:44:55:66</terminalMac>
<terminalName>myTerminal</terminalName>
<terminalIp/>
<bindType>2</bindType>
<device>http://localhost:8080/imcrs/plat/res/device/2</device>
</macAccessBind>
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
Returned Result
Status codes
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: 257
Message body
<list>
<macAccessBindScanResult>
<id>515</id>
<deviceId>2</deviceId>
<deviceLabel>H3C</deviceLabel>
<deviceIp>10.153.89.1</deviceIp>
<ifDesc>GigabitEthernet4/0/17</ifDesc>
<terminalMac>00:00:00:11:11:01</terminalMac>
<terminalName/>
<terminalIp>10.153.89.66</terminalIp>
</macAccessBindScanResult>
...
</list>
Elements
For meanings of the fields in the message body, see Query Terminal Access Binding.
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
...
<list>
<macAccessBindScanResult>
<id>515</id>
<deviceId>2</deviceId>
<deviceLabel>H3C</deviceLabel>
<deviceIp>10.153.89.1</deviceIp>
<ifDesc>GigabitEthernet4/0/17</ifDesc>
<terminalMac>00:00:00:11:11:01</terminalMac>
<terminalName/>
<terminalIp>10.153.89.66</terminalIp>
</macAccessBindScanResult>
...
</list>
Interface URI
/res/access/macAccessBind
Access Method
HTTP
POST
Message body
<macAccessBind>
<terminalMac>1a:2a:3a:4c:1c:2c</terminalMac>
<terminalName>a1</terminalName>
<bindType>2</bindType>
<ifInfo>
<deviceId>2</deviceId>
<ifIndex>1</ifIndex>
</ifInfo>
</macAccessBind>
Elements
macAccessBind sub-elements
terminalMac
terminalName
Terminal name.
String type. Optional. No default value.
bindType
maintainer
Maintainer.
String type. Optional. No default value.
ifInfo
Interface information.
Element type. Required when bindType takes 2. Multiple elements are supported.
ifInfo/deviceId
Device ID.
Long integer type.
ifInfo/ifIndex
Interface index.
Long integer type.
Returned Result
Status codes
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
...
<macAccessBind>
<terminalMac>1a:2a:3a:4c:1c:2c</terminalMac>
<terminalName>a1</terminalName>
<bindType>2</bindType>
<ifInfo>
<deviceId>2</deviceId>
<ifIndex>1</ifIndex>
</ifInfo>
</macAccessBind>
Response
HTTP/1.1 201 Created
Location: http://localhost:8080/imcrs/res/access/macAccessBind/4
Example 2
Exclude MAC address 1a:2a:3a:4a:1a:2a from authentication.
Request
POST http://localhost:8080/imcrs/res/access/macAccessBind
accept: application/xml
Content-Type: application/xml; charset=UTF-8
...
<macAccessBind>
<terminalMac>1a:2a:3a:4a:1a:2a</terminalMac>
<terminalName>a1</terminalName>
<bindType>1</bindType>
</macAccessBind>
Response
HTTP/1.1 201 Created
Location: http://localhost:8080/imcrs/res/access/macAccessBind/1
Interface URI
/res/access/macAccessBind/{id}
Access Method
HTTP
PUT
Parameters
Path parameters
id
Message body
<macAccessBind>
<terminalName>a1</terminalName>
<bindType>2</bindType>
<ifInfo>
<deviceId>5</deviceId>
<ifIndex>1</ifIndex>
</ifInfo>
</macAccessBind>
Elements
For meanings of the fields in the message body, see Query Terminal Access Binding. If the
element does not exist, the value is not changed. If the element exists, the value cannot be null.
Returned Result
Status codes
Example
Modify the terminal access binding with ID 2.
Request
PUT http://localhost:8080/imcrs/res/access/macAccessBind/2
accept: application/xml
...
<macAccessBind>
<terminalName>a1</terminalName>
<bindType>2</bindType>
<ifInfo>
<deviceId>5</deviceId>
<ifIndex>1</ifIndex>
</ifInfo>
</macAccessBind>
Response
HTTP/1.1 204 No Content
...
Interface URI
/res/access/macAccessBind/{id}
Access Method
HTTP
DELETE
Parameters
Path parameters
id
Returned Result
Status codes
Message header
HTTP/1.1 204 No Content
...
Example
Delete the terminal access binding with ID 1.
Request
DELETE http://localhost:8080/imcrs/res/access/macAccessBind/1
accept: application/xml
...
Response
HTTP/1.1 204 No Content
Interface URI
/res/access/ifAccessBind
Access Method
HTTP
GET
Parameters
Query parameters
resPrivilegeFilter
terminalIp
Terminal IP address.
String type, supporting wildcard characters. Optional. No default value.
terminalMac
terminalName
Terminal name.
String type, supporting wildcard characters. Optional. No default value.
deviceLabel
Device label.
String type. Optional. No default value.
deviceIp
Device IP address.
String type. Optional. No default value.
ifDesc
Interface description.
String type. Optional. No default value.
bindType
start
The position where the first returned record is located in the whole returned result.
Integer type. Optional. Default value is 0. If a negative value, the default value is used.
size
orderBy
desc
total
Returned Result
Status codes
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
<list>
<ifAccessBind>
<id>1</id>
<deviceId>5</deviceId>
<deviceIp>10.153.89.1</deviceIp>
<deviceName>H3C</deviceName>
<ifDesc>GigabitEthernet4/0/7</ifDesc>
<bindType>1</bindType>
<terminalMac>2a:2b:2c:2d:2e:2f</terminalMac>
<terminalIp/>
<terminalName>2</terminalName>
<terminalMaintainer>2abcdef</terminalMaintainer>
<link href="http://localhost:8080/imcrs/res/access/ifAccessBind/1" op="GET" rel="self"/>
</ifAccessBind>
...
</list>
Elements
For meanings of the fields in the message body, see Query Switch Access Binding.
251
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
...
<list>
<ifAccessBind>
<id>1</id>
<deviceId>5</deviceId>
<deviceIp>10.153.89.1</deviceIp>
<deviceName>H3C</deviceName>
<ifDesc>GigabitEthernet4/0/7</ifDesc>
<bindType>1</bindType>
<terminalMac>2a:2b:2c:2d:2e:2f</terminalMac>
<terminalIp/>
<terminalName>2</terminalName>
<terminalMaintainer>2abcdef</terminalMaintainer>
<link href="http://localhost:8080/imcrs/res/access/ifAccessBind/1" op="GET" rel="self"/>
</ifAccessBind>
...
</list>
Interface URI
/res/access/ifAccessBind/{id}
Access Method
HTTP
GET
Parameters
Path parameters
id
Returned Result
Status codes
Message header
HTTP/1.1 200 OK
Message body
<ifAccessBind>
<id>1</id>
<deviceId>5</deviceId>
<deviceIp>10.153.89.1</deviceIp>
<deviceName>H3C</deviceName>
<ifDesc>GigabitEthernet4/0/7</ifDesc>
<bindType>1</bindType>
<terminalMac>2a:2b:2c:2d:2e:2f</terminalMac>
<terminalIp/>
<terminalName>2</terminalName>
<terminalMaintainer>2abcdef</terminalMaintainer>
<device>http://localhost:8080/imcrs/plat/res/device/5</device>
</ifAccessBind>
Elements
ifAccessBind sub-elements
id
terminalIp
Terminal IP address.
String type.
terminalMac
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
terminalMaintainer
Maintainer.
String type
device
Example
Query information about the switch access binding with ID 1.
Request
GET http://localhost:8080/imcrs/res/access/ifAccessBind/1
accept: application/xml
...
Response
HTTP/1.1 200 OK
Content-Type: application/xml
...
<ifAccessBind>
<id>1</id>
<deviceId>5</deviceId>
<deviceIp>10.153.89.1</deviceIp>
<deviceName>H3C</deviceName>
<ifDesc>GigabitEthernet4/0/7</ifDesc>
<bindType>1</bindType>
<terminalMac>2a:2b:2c:2d:2e:2f</terminalMac>
<terminalIp/>
<terminalName>2</terminalName>
<terminalMaintainer>2abcdef</terminalMaintainer>
<device>http://localhost:8080/imcrs/plat/res/device/5</device>
</ifAccessBind>
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
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: 257
Message body
<list>
<macAccessBindScanResult>
<id>515</id>
<deviceId>2</deviceId>
<deviceLabel>H3C</deviceLabel>
<deviceIp>10.153.89.1</deviceIp>
<ifDesc>GigabitEthernet4/0/17</ifDesc>
<terminalMac>00:00:00:11:11:01</terminalMac>
<terminalName/>
<terminalIp>10.153.89.66</terminalIp>
</macAccessBindScanResult>
...
</list>
Elements
For meanings of the fields in the message body, see Query Terminal Access Binding.
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
...
<list>
<macAccessBindScanResult>
<id>515</id>
<deviceId>2</deviceId>
<deviceLabel>H3C</deviceLabel>
<deviceIp>10.153.89.1</deviceIp>
<ifDesc>GigabitEthernet4/0/17</ifDesc>
<terminalMac>00:00:00:11:11:01</terminalMac>
<terminalName/>
<terminalIp>10.153.89.66</terminalIp>
</macAccessBindScanResult>
...
</list>
Interface URI
/res/access/ifAccessBind
Access Method
HTTP
POST
Message body
<ifAccessBind>
<terminalMac>18:28:38:47:17:26</terminalMac>
<terminalName>a2</terminalName>
<bindType>1</bindType>
<ifInfo>
<deviceId>5</deviceId>
<ifIndex>29</ifIndex>
</ifInfo>
</ifAccessBind>
Elements
ifAccessBind sub-elements
terminalMac
terminalName
Terminal name.
String type.
bindType
terminalMaintainer
Maintainer.
String type.
ifInfo
Interface information.
Element type. Required. No default value.
deviceId
Device ID.
Long integer type.
ifIndex
Interface index.
Long integer type.
Returned Result
Status codes
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
...
<ifAccessBind>
<terminalMac>18:28:38:47:17:26</terminalMac>
<terminalName>a2</terminalName>
<bindType>1</bindType>
<ifInfo>
<deviceId>5</deviceId>
<ifIndex>29</ifIndex>
</ifInfo>
</ifAccessBind>
Response
HTTP/1.1 201 Created
Location: http://localhost:8080/imcrs/asset/access/ifAccessBind/4
Example 2
Exclude the interface whose index is 32 of the device whose ID is 5 from authentication.
Request
POST http://imc_host:8080/imcrs/asset/access/ifAccessBind
accept: application/xml
Content-Type: application/xml; charset=UTF-8
...
<ifAccessBind>
<bindType>2</bindType>
<ifInfo>
<deviceId>5</deviceId>
<ifIndex>32</ifIndex>
</ifInfo>
</ifAccessBind>
Response
HTTP/1.1 201 Created
Location: http://localhost:8080/imcrs/asset/access/ifAccessBind/6
Interface URI
/res/access/ifAccessBind/{id}
Access Method
HTTP
PUT
Parameters
Path parameters
id
Message body
<ifAccessBind>
<terminalMac>11:21:31:41:11:21</terminalMac>
<terminalName>a1</terminalName>
<terminalMaintainer>tm1</terminalMaintainer>
<bindType>1</bindType>
</ifAccessBind>
Elements
For meanings of the fields in the message body, see Add Switch Access Binding. If the element
does not exist, the value is not changed. If the element exists, the value cannot be null.
Returned Result
Status codes
Example
Modify the switch access binding with ID 5.
Request
PUT http://localhost:8080/imcrs/res/access/ifAccessBind/5
accept: application/xml
...
<ifAccessBind>
<terminalMac>11:21:31:41:11:21</terminalMac>
<terminalName>a1</terminalName>
<terminalMaintainer>tm1</terminalMaintainer>
<bindType>1</bindType>
</ifAccessBind>
Response
HTTP/1.1 204 No Content
...
Interface URI
/res/access/ifAccessBind/{id}
Access Method
HTTP
DELETE
Parameters
Path parameters
id
Returned Result
Status codes
Message header
HTTP/1.1 204 No Content
...
Example
Delete the switch access binding with ID 3.
Request
DELETE http://localhost:8080/imcrs/res/access/ifAccessBind/3
accept: application/xml
...
Response
HTTP/1.1 204 No Content
261
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.
String type, supporting wildcard characters. Optional. No default value.
type
Type.
Long integer type. Optional. No default value.
orderBy
desc
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 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
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
<list>
<ipMacBind>
<id>1</id>
<ip>10.153.89.1</ip>
<mac>00:11:22:33:44:55</mac>
<name>H3C</name>
<type>9</type>
<link href="http://localhost:8080/imcrs/res/access/ipMacBind/1" op="GET" rel="self"/>
</ipMacBind>
...
</list>
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.1 200 OK
Content-Type: application/xml
...
<list>
<ipMacBind>
<id>1</id>
<ip>10.153.89.1</ip>
<mac>00:11:22:33:44:55</mac>
<name>H3C</name>
<type>9</type>
<link href="http://localhost:8080/imcrs/res/access/ipMacBind/1" op="GET" rel="self"/>
</ipMacBind>
...
</list>
Interface URI
/res/access/ipMacBind/{id}
Access Method
HTTP
GET
Parameters
Path parameters
id
Returned Result
Status codes
Message header
HTTP/1.1 200 OK
Message body
<ipMacBind>
<id>1</id>
<ip>10.153.89.1</ip>
<mac>00:11:22:33:44:55</mac>
</ipMacBind>
Elements
ipMacBind sub-elements
id
ip
IP address.
String type.
mac
MAC address.
String type.
name
Owner.
String type.
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
...
<ipMacBind>
<id>1</id>
<ip>10.153.89.1</ip>
<mac>00:11:22:33:44:55</mac>
</ipMacBind>
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
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: 15
Message body
<list>
<ipMacBindScanResult>
<id>16</id>
<ip>10.153.89.1</ip>
<mac>00:0f:e2:e1:ca:be</mac>
<name>H3C</name>
<type>9</type>
</ipMacBindScanResult>
...
</list>
Elements
For meanings of the fields in the message body, see Query IP-to-MAC Address Binding.
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
...
<list>
<ipMacBindScanResult>
<id>16</id>
<ip>10.153.89.1</ip>
<mac>00:0f:e2:e1:ca:be</mac>
<name>H3C</name>
<type>9</type>
</ipMacBindScanResult>
...
</list>
Interface URI
/res/access/ipMacBind
Access Method
HTTP
POST
Message body
<ipMacBind>
<ip>10.153.89.1</ip>
<mac>00:0f:e2:e1:ca:be</mac>
</ipMacBind>
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
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/ipMacBind/3
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
...
<ipMacBind>
<ip>10.153.89.1</ip>
<mac>00:0f:e2:e1:ca:be</mac>
</ipMacBind>
Response
HTTP/1.1 201 Created
Location: http://localhost:8080/imcrs/res/access/ipMacBind/4
Interface URI
/res/access/ipMacBind/{id}
Access Method
HTTP
DELETE
Parameters
Path parameters
id
Returned Result
Status codes
Message header
HTTP/1.1 204 No Content
...
Example
Delete the IP-to-MAC address binding with ID 3.
Request
DELETE http://localhost:8080/imcrs/res/access/ipMacBind/3
accept: application/xml
...
Response
HTTP/1.1 204 No Content
Interface URI
/res/access/strategy/conflict
Access Method
HTTP
GET
Parameters
None
Returned Result
Status codes
Message header
HTTP/1.1 200 OK
Message body
<accessStrategy>
<sendFaultType>1</sendFaultType>
<closeIfType>2</closeIfType>
<openIfType>1</openIfType>
<closeIfDelay>180</closeIfDelay>
<openIfDelay>180</openIfDelay>
</accessStrategy>
Elements
accessStrategy sub-elements
sendFaultType
closeIfType
Interface shutdown type. 0 for no shutdown. 1 for immediate shutdown. 2 for delayed shutdown.
Integer type.
openIfType
Whether or not to bring up the interface after it is shut down. 0 for no. 1 for yes.
Integer type.
closeIfDelay
openIfDelay
271
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
...
<accessStrategy>
<sendFaultType>1</sendFaultType>
<closeIfType>2</closeIfType>
<openIfType>1</openIfType>
<closeIfDelay>180</closeIfDelay>
<openIfDelay>180</openIfDelay>
</accessStrategy>
Interface URI
/res/access/strategy/unknown
Access Method
HTTP
GET
Parameters
None
Returned Result
Status codes
Message header
HTTP/1.1 200 OK
Message body
<accessStrategy>
<accessType>0</accessType>
<sendFaultType>1</sendFaultType>
<closeIfType>2</closeIfType>
<openIfType>1</openIfType>
<closeIfDelay>180</closeIfDelay>
<openIfDelay>180</openIfDelay>
</accessStrategy>
Elements
accessStrategy sub-elements
sendFaultType
closeIfType
Interface shutdown type. 0 for no shutdown. 1 for immediate shutdown. 2 for delayed shutdown.
Integer type.
openIfType
Whether or not to bring up the interface after it is shut down. 0 for no. 1 for yes.
Integer type.
closeIfDelay
openIfDelay
accessType
Whether or not the policy is valid when an unknown access is detected. 0 for yes. 1 for no.
Integer type.
Query Unknown Access Policy 273
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
...
<accessStrategy>
<accessType>0</accessType>
<sendFaultType>1</sendFaultType>
<closeIfType>2</closeIfType>
<openIfType>1</openIfType>
<closeIfDelay>180</closeIfDelay>
<openIfDelay>180</openIfDelay>
</accessStrategy>
274
Interface URI
/res/access/strategy/conflict
Access Method
HTTP
PUT
Parameters
None
Message body
<accessStrategy>
<sendFaultType>1</sendFaultType>
<closeIfType>2</closeIfType>
<openIfType>1</openIfType>
<closeIfDelay>180</closeIfDelay>
<openIfDelay>180</openIfDelay>
</accessStrategy>
Elements
accessStrategy sub-elements
sendFaultType
closeIfType
Interface shutdown type. 0 for no shutdown. 1 for immediate shutdown. 2 for delayed shutdown.
Integer type. Optional. If the element does not exist, the value is not changed. If the element exists,
the value cannot be null.
openIfType
Whether or not to bring up the interface after it is shut down. 0 for no. 1 for yes.
Integer type. Optional. If the element does not exist, the value is not changed. If the element exists,
the value cannot be null.
closeIfDelay
openIfDelay
Returned Result
Status codes
Example
Modify the conflict and unauthorized access policy.
Request
PUT http://imc_host:8080/imcrs/asset/access/strategy/conflict
accept: application/xml
...
<accessStrategy>
<accessType>0</accessType>
<sendFaultType>1</sendFaultType>
<closeIfType>2</closeIfType>
<openIfType>1</openIfType>
<closeIfDelay>180</closeIfDelay>
<openIfDelay>180</openIfDelay>
</accessStrategy>
Response
HTTP/1.1 204 No Content
...
Interface URI
/res/access/strategy/unknown
Access Method
HTTP
PUT
Parameters
None
Message body
<accessStrategy>
<accessType>0</accessType>
<sendFaultType>1</sendFaultType>
<closeIfType>2</closeIfType>
<openIfType>1</openIfType>
<closeIfDelay>180</closeIfDelay>
<openIfDelay>180</openIfDelay>
</accessStrategy>
Elements
accessStrategy sub-elements
sendFaultType
closeIfType
Interface shutdown type. 0 for no shutdown. 1 for immediate shutdown. 2 for delayed shutdown.
Integer type. Optional. If the element does not exist, the value is not changed. If the element exists,
the value cannot be null.
openIfType
Whether or not to bring up the interface after it is shut down. 0 for no. 1 for yes.
Integer type. Optional. If the element does not exist, the value is not changed. If the element exists,
the value cannot be null.
closeIfDelay
openIfDelay
accessType
Whether or not the policy is valid when an unknown access is detected.0 for yes. 1 for no.
Integer type. Optional. If the element does not exist, the value is not changed. If the element exists,
the value cannot be null.
Returned Result
Status codes
Example
Modify the unknown access policy.
Request
PUT http://localhost:8080/imcrs/res/access/strategy/unknown
accept: application/xml
...
<accessStrategy>
<accessType>0</accessType>
<sendFaultType>1</sendFaultType>
<closeIfType>2</closeIfType>
<openIfType>1</openIfType>
<closeIfDelay>180</closeIfDelay>
<openIfDelay>180</openIfDelay>
</accessStrategy>
Response
HTTP/1.1 204 No Content
...
Query Alarms
Recover Alarm
Acknowledge Alarm
Delete Alarm
279
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
ackStatus
timeRange
startAlarmTime
endAlarmTime
alarmDesc
Alarm description.
String type, supporting wildcard characters. Optional. No default value.
acker
paras
Alarm parameters.
String type, supporting wildcard characters. Optional. No default value.
customView
deviceIp
Device IP address.
String type, supporting wildcard characters and multiple elements. Optional. No default value.
deviceId
Device ID.
String type, supporting wildcard characters and multiple elements. Optional. No default value.
id
Alarm ID
Long integer type, supporting multiple elements. Optional. No default value.
alarmCategory
Alarm category.
Integer type. Optional. No default value.For the valid values, see Query Alarm Categories.
Query parameters
faultOid
originalType
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
orderBy
desc
total
Returned Result
Status codes
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: 150
Message body
<list>
<alarm>
<id>3655</id>
<OID>1.3.6.1.4.1.2011.10.4.1.1.2.6.4</OID>
<originalType>3</originalType>
<originalTypeDesc>iMC</originalTypeDesc>
<deviceId>347</deviceId>
<deviceIp>10.153.88.34</deviceIp>
<deviceName>Quidway</deviceName>
...
<alarmDetail>http://imc_host:port/imcrs/fault/alarm/3655</alarmDetail>
</alarm>
...
<link rel="next" href="http://imc_host:port/imcrs/fault/alarm?start=10&size=10"/>
</list>
For meanings of the fields in the returned value, see Query Alarm Information.
Query Alarms
281
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
...
<list>
<alarm>
<id>3655</id>
<OID>1.3.6.1.4.1.2011.10.4.1.1.2.6.4</OID>
<originalType>3</originalType>
<originalTypeDesc>iMC</originalTypeDesc>
<deviceId>347</deviceId>
<deviceIp>10.153.88.34</deviceIp>
<deviceName>Quidway</deviceName>
...
<alarmDetail>http://imc_host:port/imcrs/fault/alarm/3655</alarmDetail>
</alarm>
...
<link rel="previous" href="http://imc_host:port/imcrs/fault/alarm?start=0&size=10&alarmLevel=4"/>
<link rel="next" href="http://imc_host:port/imcrs/fault/alarm?start=20&size=10&alarmLevel=4"/>
</list>
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
Message header
The message header offers the following resource links with the Link attribute:
recover
Recover alarm
acknowledge
Acknowledge alarm
delete
Delete alarm
Message body
<alarmDetail>
<id>3665</id>
<OID>1.3.6.1.4.1.2011.10.4.1.1.2.6.4</OID>
<originalType>3</originalType>
<originalTypeDesc>iMC</originalTypeDesc>
<device>http://imc_host:8080/imcrs/plat/res/device/181</device>
<deviceIp>10.153.88.34</deviceIp>
<deviceName>Quidway</deviceName>
...
</alarmDetail>
Elements
alarmDetail sub-elements
id
OID
alarmDetail sub-elements
originalType
originalTypeDesc
deviceId
Device ID.
Long integer type.
deviceIp
Device IP address.
String type.
deviceName
Device name.
String type.
alarmLevel
Alarm level.
Integer type.
alarmLevelDesc
alarmCategory
Alarm category.
Integer type.
alarmCategoryDesc
faultTime
faultTimeDesc
recTime
recTimeDesc
Detailed information about the time when the alarm was recovered.
String type, in the format of yyyy-MM-dd HH:mm:ss.
recStatus
recStatusDesc
recUserName
ackTime
ackTimeDesc
Detailed information about the time when the alarm was acknowledged.
String type, in the format of yyyy-MM-dd HH:mm:ss.
ackStatus
ackStatusDesc
alarmDetail sub-elements
String type.
ackUserName
alarmDesc
Alarm description.
String type.
paras
Alarm parameters.
String type.
parentId
somState
remark
Alarm remarks.
String type.
genericId
Generic ID.
Integer type.
specificId
Specific ID.
Integer type.
eventName
reason
suggestion
Restoration suggestion.
String type.
experience
Maintenance experience.
String type.
tipMessage
defineType
customAlarmLevel
Custom level.
Integer 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: <http://imc_host:port/imcrs/fault/alarm/recover/3665>; rel=recover
Link: <http://imc_host:port/imcrs/fault/alarm/acknowledge/3665>; rel=acknowledge
Link: <http://imc_host:port/imcrs/fault/alarm/delete/3665>; rel=delete
...
<alarmDetail>
<id>3665</id>
<OID>1.3.6.1.4.1.2011.10.4.1.1.2.6.4</OID>
<originalType>3</originalType>
<originalTypeDesc>iMC</originalTypeDesc>
<device>http://imc_host:8080/imcrs/plat/res/device/181</device>
<deviceIp>10.153.88.34</deviceIp>
<deviceName>Quidway</deviceName>
...
</alarmDetail>
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
Message header
The message header offers the following resource links with the Link attribute:
recover
Recover alarm
acknowledge
Acknowledge alarm
delete
Delete alarm
Message body
<alarmDetail>
<id>51</id>
<OID>1.3.6.1.4.1.2011.10.4.2.2.2.6.11</OID>
<originalType>3</originalType>
<originalTypeDesc>iMC</originalTypeDesc>
<deviceId>0</deviceId>
<deviceIp>127.0.0.1</deviceIp>
<deviceName>NMS</deviceName>
<alarmLevel>5</alarmLevel>
...
</alarmDetail>
For meanings of the fields in the returned value, see Query Alarm Information.
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: <http://imc_host:port/imcrs/fault/alarm/recover/51>; rel=recover
Link: <http://imc_host:port/imcrs/fault/alarm/acknowledge/51>; rel=acknowledge
Link: <http://imc_host:port/imcrs/fault/alarm/delete/51>; rel=delete
...
<alarmDetail>
<id>51</id>
<OID>1.3.6.1.4.1.2011.10.4.2.2.2.6.11</OID>
<originalType>3</originalType>
<originalTypeDesc>iMC</originalTypeDesc>
<deviceId>0</deviceId>
<deviceIp>127.0.0.1</deviceIp>
<deviceName>NMS</deviceName>
<alarmLevel>5</alarmLevel>
...
</alarmDetail>
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
total
Returned Result
Status codes
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: 116
Message body
<list>
<alarm>
<id>324</id>
<OID>1.3.6.1.4.1.2011.10.4.1.2.2.6.2</OID>
<originalType>3</originalType>
<originalTypeDesc>iMC</originalTypeDesc>
<deviceId>94</deviceId>
<deviceIp>10.153.88.26</deviceIp>
<deviceName>daemon8826</deviceName>
...
<alarmDetail>http://imc_host:port/imcrs/fault/alarm/324</alarmDetail>
</alarm>
...
<link rel="next" href="http://imc_host:port/imcrs/fault/alarm/childAlarm/51?start=10&size=10"/>
</list>
For meanings of the fields in the returned value, see Query Alarm Information.
Example
Query and list the 12th to the 20th child alarms of the alarm with ID 51.
Request
GET http://imc_host:8080/imcrs/fault/alarm/childAlarm/51?start=12&size=8
accept: application/xml
...
Response
HTTP/1.1 200 OK
Content-Type: application/xml
...
<list>
<alarm>
<id>298</id>
<OID>1.3.6.1.4.1.2011.10.4.1.2.2.6.1</OID>
<originalType>3</originalType>
<originalTypeDesc>iMC</originalTypeDesc>
<deviceId>14</deviceId>
<deviceIp>10.153.89.84</deviceIp>
<deviceName>esximf</deviceName>
...
<alarmDetail>http://imc_host:port/imcrs/fault/alarm/298</alarmDetail>
</alarm>
...
<link rel="previous" href="http://imc_host:port/imcrs/fault/alarm/childAlarm/51?start=4&size=8"/>
<link rel="next" href="http://imc_host:port/imcrs/fault/alarm/childAlarm/51?start=20&size=8"/>
</list>
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
Returned Result
Status codes
Message header
Message body
<list>
<alarmDevice>
<device>http://imc_host:8080/imcrs/plat/res/device/181</device>
<alarmCount>3</alarmCount>
<alarmLevel>1</alarmLevel>
...
</alarmDevice>
</list>
Elements
alarmDevice sub-elements
deviceId
Device ID.
Long integer type.
alarmCount
alarmLevel
Alarm level.
Integer type.
291
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
...
<list>
<alarmDevice>
<device>http://imc_host:8080/imcrs/plat/res/device/181</device>
<alarmCount>3</alarmCount>
<alarmLevel>1</alarmLevel>
...
</alarmDevice>
</list>
Interface URI
/fault/trapEnterprise
Access Method
HTTP
GET
Parameters
Query parameters
total
Returned Result
Status codes
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: 495
Message body
<list>
<trapEnterprise>
<enterpriseId>1.3.6.1.4.1.43</enterpriseId>
<enterpriseName>3Com</enterpriseName>
<trapEvents>http://imc_host:port/imcrs/fault/trapEvent?trapEnterpriseId=1.3.6.1.4.1.43</trapEvents>
</trapEnterprise>
...
</list>
Elements
trapEnterprise sub-elements
enterpriseId
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
...
<list>
<trapEnterprise>
<enterpriseId>1.3.6.1.2.1.47.2</enterpriseId>
<enterpriseName>Entity MIB</enterpriseName>
<trapEvents>http://imc_host:8080/imcrs/fault/trapEvent?trapEnterpriseId=1.3.6.1.2.1.47.2</trapEvents>
</trapEnterprise>
...
</list>
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
Returned Result
Status codes
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: 133
Elements
trapEvent sub-elements
eventOID
eventName
Event name.
String type.
specificID
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
<list>
<trapEvent>
<eventOID>1.3.6.1.4.1.43.6.1</eventOID>
<eventName>3COM_1</eventName>
<specificID>1</specificID>
</trapEvent>
...
</list>
Interface URI
/fault/alarmCategory
Access Method
HTTP
GET
Returned Result
Status codes
Message body
<list>
<alarmCategory>
<id>1</id>
<baseClass>1</baseClass>
<subClass>1</subClass>
<baseDesc>Other Alarms</baseDesc>
<subDesc>Other Alarms</subDesc>
</alarmCategory>
<alarmCategory>
<id>2</id>
<baseClass>2</baseClass>
<subClass>1</subClass>
<baseDesc>Device Alarm</baseDesc>
<subDesc>Device Availability Alarm/subDesc>
</alarmCategory>
<alarmCategory>
<id>3</id>
<baseClass>2</baseClass>
<subClass>2</subClass>
<baseDesc>Device Alarm</baseDesc>
<subDesc>Interface\Link Status Alarm</subDesc>
</alarmCategory>
...
</list>
Elements
alarmCategory sub-elements
id
baseClass
baseDesc
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.1 200 OK
Content-Type: application/xml
...
<list>
<alarmCategory>
<id>2</id>
<baseClass>2</baseClass>
<subClass>1</subClass>
<baseDesc>Device alarm</baseDesc>
<subDesc>Device reachability alarm</subDesc>
</alarmCategory>
...
</list>
Interface URI
/fault/alarmLevel
Access Method
HTTP
GET
Returned Result
Status codes
Message body
<list>
<alarmLevel>
<id>255</id>
<desc>All levels</desc>
</alarmLevel>
<alarmLevel>
<id>1</id>
<desc>Critical</desc>
</alarmLevel>
<alarmLevel>
<id>2</id>
<desc>Major</desc>
</alarmLevel>
<alarmLevel>
<id>3</id>
<desc>Minor</desc>
</alarmLevel>
<alarmLevel>
<id>4</id>
<desc>Warning</desc>
</alarmLevel>
<alarmLevel>
<id>5</id>
<desc>Informational</desc>
</alarmLevel>
</list>
Elements
alarmLevel sub-elements
id
desc
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
...
<list>
<alarmLevel>
<id>1</id>
<desc>Critical</desc>
</alarmLevel>
...
</list>
Interface URI
/fault/alarmOriginalType
Access Method
HTTP
GET
Returned Result
Status codes
Message body
<list>
<alarmOriginalType>
<id>0</id>
<desc>All types</desc>
</alarmOriginalType>
<alarmOriginalType>
<id>1</id>
<desc>Trap</desc>
</alarmOriginalType>
<alarmOriginalType>
<id>2</id>
<desc>Syslog</desc>
</alarmOriginalType>
<alarmOriginalType>
<id>3</id>
<desc>iMC</desc>
</alarmOriginalType>
</list>
Elements
alarmOriginalType sub-elements
id
desc
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
...
<list>
<alarmOriginalType>
<id>1</id>
<desc>Trap</desc>
</alarmOriginalType>
...
</list>
Interface URI
/fault/alarmRecStatus
Access Method
HTTP
GET
Returned Result
Status codes
Message body
<list>
<alarmRecStatus>
<id>255</id>
<desc>All status</desc>
</alarmRecStatus>
<alarmRecStatus>
<id>1</id>
<desc>Recovered</desc>
</alarmRecStatus>
<alarmRecStatus>
<id>0</id>
<desc>Unrecovered</desc>
</alarmRecStatus>
</list>
Elements
alarmRecStatus sub-elements
id
Alarm recovery status ID, which uniquely identifies an alarm recovery state.
Integer type.
desc
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
...
<list>
<alarmRecStatus>
<id>1</id>
<desc>Recovered</desc>
</alarmRecStatus>
...
</list>
Interface URI
/fault/alarmAckStatus
Access Method
HTTP
GET
Returned Result
Status codes
Message body
<list>
<alarmAckStatus>
<id>255</id>
<desc>All status</desc>
</alarmAckStatus>
<alarmAckStatus>
<id>1</id>
<desc>Acknowledged</desc>
</alarmAckStatus>
<alarmAckStatus>
<id>0</id>
<desc>Unacknowledged</desc>
</alarmAckStatus>
</list>
Elements
alarmAckStatus sub-elements
id
Alarm acknowledgement status ID, which uniquely identifies an alarm acknowledge state.
Integer type.
desc
Interface URI
/fault/alarmTimeRange
Access Method
HTTP
GET
Returned Result
Status codes
Message body
<list>
<alarmTimeRange>
<id>255</id>
<desc>All alarms</desc>
</alarmTimeRange>
<alarmTimeRange>
<id>0</id>
<desc>Last 1 hour</desc>
</alarmTimeRange>
<alarmTimeRange>
<id>1</id>
<desc>Last 2 hours</desc>
</alarmTimeRange>
...
</list>
Elements
alarmTimeRange sub-elements
id
Alarm time range ID, which uniquely identifies an alarm time range.
Integer type.
desc
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
...
<list>
<alarmTimeRange>
<id>0</id>
<desc>Last 1 hour</desc>
</alarmTimeRange>
...
</list>
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
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
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
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.
310
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. If this parameter is not set,
then all levels of alarms will be forwarded. For the valid values, see Query Alarm Levels.
customView
deviceIp
Device IP address.
String type, supporting multiple elements. Optional. No default value.
ipSegment
IP segment.
String type, supporting multiple elements. Optional. No default value. The IP range is expressed with
a hyphen (-). For example, 192.168.0.1-192.168.0.254.
eventOid
Returned Result
Status codes
Message header
HTTP/1.1 202 Accepted
Content-Type: application/xml
311
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
...
312
313
Interface URI
/syslog/log/{id}
Access Method
HTTP
GET
Returned Result
Status codes
Message body
<log>
<id>1>/id>
<recvTime>2011-08-29 16:39:11</recvTime>
<deviceId>12</deviceId>
<deviceName>L07069A</deviceName>
<deviceIp>10.153.129.35</deviceIp>
<sysName>H3C </sysName>
<module>DHCP-SNP</module>
<severity>5</severity>
<digest>dhcp-snooping server guard</digest>
<repeats>3</repeats>
<content><182>Oct 12 11:02:52 19.82.2.20 Apr 2 00:04:42 2000 H3C %%DHCP-SNP/5/dhcp-snooping server guard:- 1 -Port 0
detect DHCP server in VLAN 1 MAC is 00e0-fc05-53b1 IP is 10.153.89.1!
</content>
</log>
Elements
log sub-elements
id
Syslog source type ID, which uniquely identifies a syslog source type.
Integer type.
recvTime
deviceId
Device ID.
Long integer type.
deviceName
Device name.
String type.
deviceIp
IP address.
String type.
sysName
System Name
String type.
module
Module name.
String type.
severity
Severity level.
Integer type.
314
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
...
<log>
<id>1>/id>
<recvTime>2011-08-29 16:39:11</recvTime>
<deviceId>12</deviceId>
<deviceName>L07069A</deviceName>
<deviceIp>10.153.129.35</deviceIp>
<sysName>H3C </sysName>
<module>DHCP-SNP</module>
<severity>5</severity>
<digest>dhcp-snooping server guard</digest>
<repeats>3</repeats>
<content><182>Oct 12 11:02:52 19.82.2.20 Apr 2 00:04:42 2000 H3C %%DHCP-SNP/5/dhcp-snooping server guard:- 1 -Port 0
detect DHCP server in VLAN 1 MAC is 00e0-fc05-53b1 IP is 10.153.89.1!
</content>
</log>
315
Interface URI
/syslog/log/
Access Method
HTTP
GET
Returned Result
Status codes
Message body
</list>
<log>
<id>1>/id>
<recvTime>2011-08-29 16:39:11</recvTime>
<deviceId>12</deviceId>
<deviceName>L07069A</deviceName>
<deviceIp>10.153.129.35</deviceIp>
<sysName>H3C </sysName>
<module>DHCP-SNP</module>
<severity>5</severity>
<digest>dhcp-snooping server guard</digest>
<repeats>3</repeats>
<content><182>Oct 12 11:02:52 19.82.2.20 Apr 2 00:04:42 2000 H3C %%DHCP-SNP/5/dhcp-snooping server guard:- 1 -Port 0
detect DHCP server in VLAN 1 MAC is 00e0-fc05-53b1 IP is 10.153.89.1!
</content>
</log>
...
</list>
Elements
log sub-elements
id
Syslog source type ID, which uniquely identifies a syslog source type.
Integer type.
recvTime
deviceId
Device ID.
Long integer type.
deviceName
Device name.
String type.
deviceIp
IP address.
String type.
sysName
System name.
String type.
module
Module name.
String type.
316
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
...
</list>
<log>
<id>1>/id>
<recvTime>2011-08-29 16:39:11</recvTime>
<deviceId>12</deviceId>
<deviceName>L07069A</deviceName>
<deviceIp>10.153.129.35</deviceIp>
<sysName>H3C </sysName>
<module>DHCP-SNP</module>
<severity>5</severity>
<digest>dhcp-snooping server guard</digest>
<repeats>3</repeats>
<content><182>Oct 12 11:02:52 19.82.2.20 Apr 2 00:04:42 2000 H3C %%DHCP-SNP/5/dhcp-snooping server guard:- 1 -Port 0
detect DHCP server in VLAN 1 MAC is 00e0-fc05-53b1 IP is 10.153.89.1!
</content>
</log>
...
<log>
<id>10</id>
<recvTime>2011-08-29 16:39:11</recvTime>
<deviceId>12</deviceId>
<deviceName>L07069A</deviceName>
<deviceIp>10.153.129.35</deviceIp>
<sysName>Monza_IRF </sysName>
<module>10PORTSEC</module>
<severity>2</severity>
<digest>LOGINFAILURE(l)</digest>
<repeats>3</repeats>
<content><182>Oct 12 11:02:52 19.82.2.20 Apr 3 03:23:53 2000 Monza_IRF %%10PORTSEC/2/LOGINFAILURE(l):- 8 OID:
1.3.6.1.4.1.2011.10.2.26.1.3.3(h3cSecureLoginFailure)
A user login failure occurs due to the user not being successfully
authorised
IfIndex: 503316834
Port:Ethernet8/0/42
MAC Addr: 0010-5ce8-89fa
VLAN id:999
PortNum:503316834
UserName: local@local
</content>
</log>
<link href="http://localhost:8080/imcrs/syslog/log/?start=10&size=10" op="GET" rel="next"/>
</list>
317
Interface URI
/syslog/filter/currentUnmanagedDeviceRuleState/
Access Method
HTTP
GET
Returned Result
Status codes
Message body
<list>
<unmanagedDeviceRuleStatus>
<status>1</status>
<desc>Enabled</desc>
</unmanagedDeviceRuleStatus>
<unmanagedDeviceRuleStatus>
<status>0</status>
<desc>Disabled</desc>
</unmanagedDeviceRuleStatus>
</list>
Elements
unmanagedDeviceRuleStatus sub-elements
status
desc
318
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
...
<unmanagedDeviceRuleStatus>
<status>0</status>
<desc>Disabled</desc>
</unmanagedDeviceRuleStatus>
319
Interface URI
/syslog/filter/unmanagedDeviceRuleStates/
Access Method
HTTP
GET
Returned Result
Status codes
Message body
<list>
<unmanagedDeviceRuleStatus>
<status>1</status>
<desc>Enabled</desc>
</unmanagedDeviceRuleStatus>
<unmanagedDeviceRuleStatus>
<status>0</status>
<desc>Disabled</desc>
</unmanagedDeviceRuleStatus>
</list>
Elements
unmanagedDeviceRuleStatus sub-elements
status
desc
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
...
<list>
<unmanagedDeviceRuleStatus>
<status>1</status>
<desc>Enabled</desc>
</unmanagedDeviceRuleStatus>
<unmanagedDeviceRuleStatus>
<status>0</status>
<desc>Disabled</desc>
</unmanagedDeviceRuleStatus>
</list>
321
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
Example
Change the status of the filtering rule for unmanaged devices to 1, which indicates the Enabled
state.
Request
PUT http://imc_host:8080/imcrs/syslog/filter/currentUnmanagedDeviceRuleState/1
accept: application/xml
...
Response
HTTP/1.1 204 No Content
...
The message body is empty.
Query Summaries
323
Query Summaries
Query and list summaries.
Interface URI
/perf/summary
Access Method
HTTP
GET
Parameters
None
Returned Result
Status codes
Message header
HTTP/1.1 200 OK
Message body
<list>
<summary>
<sumId>1</sumId>
<sumName>System</sumName>
<groupList>http://imc_host:8080/imcrs/perf/group/1</groupList>
</summary>
...
</list>
Elements
summary sub-elements
sumId
Summary ID.
Integer type.
sumName
Summary name.
String type.
groupList
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
...
<list>
<summary>
<sumId>1</sumId>
<sumName>System</sumName>
<groupList>http://imc_host:8080/imcrs/perf/group/1</groupList>
</summary>
...
</list>
Interface URI
/perf/group
Access Method
HTTP
GET
Parameters
None
Returned Result
Status codes
Message header
HTTP/1.1 200 OK
Message body
<list>
<group>
<sumId>1</sumId>
<groupId>1</groupId>
<groupName>CPU Usage</groupName>
<interfaceFlag>0</interfaceFlag>
<summary>http://imc_host:8080/imcrs/perf/summary/1</summary>
<perfTask>http://imc_host:8080/imcrs/perf/task/1,1</perfTask>
</group>
</list>
Elements
group sub-elements
sumId
Summary ID.
Integer type.
groupId
groupName
interfaceFlag
Interface flag.
Integer type.
summary
group sub-elements
String type
perfTask
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
...
<list>
<group>
<sumId>1</sumId>
<groupId>1</groupId>
<groupName>CPU Usage</groupName>
<interfaceFlag>0</interfaceFlag>
<summary>http://imc_host:8080/imcrs/perf/summary/1</summary>
<perfTask>http://imc_host:8080/imcrs/perf/task/1,1</perfTask>
</group>
....
</list>
Interface URI
/perf/task
Access Method
HTTP
GET
Parameters
Query parameters
name
Type name.
String type, supporting wildcard characters. Optional. No default value.
orderBy
desc
Returned Result
Status codes
Message header
HTTP/1.1 200 OK
Message body
<list>
<task>
<taskId>1</taskId>
<taskName>Interface Receiving Rate(bits/s)</taskName>
<taskDescr>Interface Receiving Rate</taskDescr>
<tempId>2048</tempId>
<alarmOneThresholdFirst>1.0E7</alarmOneThresholdFirst>
<alarmOneThresholdSecond>0.0</alarmOneThresholdSecond>
<alarmTwoTimes>3</alarmTwoTimes>
<componentID>0</componentID>
<unitId>220</unitId>
<sumId>1</sumId>
<groupId>6</groupId>
<perfTemplate>http://imc_host:8080/imcrs/perf/task/template/1</perfTemplate>
<tempUnitDependList>http://imc_host:8080/imcrs/perf/task/units/1</tempUnitDependList>
<tempUnit>http://imc_host:8080/imcrs/perf/task/unit/1</tempUnit>
</task>
...
</list>
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.
alarmTwoTimes
Repeat time of alarm 2, which is counted when the alarm continuously falls in the alarm
range.
Integer type.
componentID
Component ID.
Integer type.
unitId
sumId
Summary ID.
Integer type.
groupId
perfTemplate
Template URI.
String type.
tempUnitDependList
tempUnit
Unit URI.
String type.
Example
1. Query all performance tasks.
Request
GET http://imc_host:8080/imcrs/perf/task
accept: application/xml
...
Response
HTTP/1.1 200 OK
Content-Type: application/xml
...
<list>
<task>
<taskId>1</taskId>
<taskName>Interface Receiving Rate(bits/s)</taskName>
<taskDescr>Interface Receiving Rate</taskDescr>
<tempId>2048</tempId>
<alarmOneThresholdFirst>1.0E7</alarmOneThresholdFirst>
<alarmOneThresholdSecond>0.0</alarmOneThresholdSecond>
<alarmTwoTimes>3</alarmTwoTimes>
<componentID>0</componentID>
<unitId>220</unitId>
<sumId>1</sumId>
<groupId>6</groupId>
<perfTemplate>http://imc_host:8080/imcrs/perf/task/template/1</perfTemplate>
<tempUnitDependList>http://imc_host:8080/imcrs/perf/task/units/1</tempUnitDependList>
<tempUnit>http://imc_host:8080/imcrs/perf/task/unit/1</tempUnit>
</task>
...
</list>
Request
GET http://imc_host:8080/imcrs/perf/task/get/1
accept: application/xml
...
Response
HTTP/1.1 200 OK
Content-Type: application/xml
...
<task>
<taskId>1</taskId>
<taskName>Interface Receiving Rate(bits/s)</taskName>
<taskDescr>Interface Receiving Rate</taskDescr>
<tempId>2048</tempId>
<alarmOneThresholdFirst>1.0E7</alarmOneThresholdFirst>
<alarmOneThresholdSecond>0.0</alarmOneThresholdSecond>
<alarmTwoTimes>3</alarmTwoTimes>
<componentID>0</componentID>
<unitId>220</unitId>
<sumId>1</sumId>
<groupId>6</groupId>
<perfTemplate>http://imc_host:8080/imcrs/perf/task/template/1</perfTemplate>
<tempUnitDependList>http://imc_host:8080/imcrs/perf/task/units/1</tempUnitDependList>
<tempUnit>http://imc_host:8080/imcrs/perf/task/unit/1</tempUnit>
</task>
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
Message header
HTTP/1.1 200 OK
Message body
<list>
<perfInstance>
<deviceName>z00592z(10.153.88.22)</deviceName>
<taskId>1</taskId>
<instanceId>80</instanceId>
<instanceName>[Interface:Software Loopback Interface 1]</instanceName>
<ipAddress>10.153.88.22</ipAddress>
<unit/>
<value/>
</perfInstance>
...
</list>
Element description
VLAN sub-elements
deviceName
Device name.
String type.
taskId
Item ID
Integer type.
instanceId
Instance ID.
331
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
...
<list>
<perfInstance>
<deviceName>z00592z(10.153.88.22)</deviceName>
<taskId>1</taskId>
<instanceId>80</instanceId>
<instanceName>[Interface:Software Loopback Interface 1]</instanceName>
<ipAddress>10.153.88.22</ipAddress>
<unit/>
<value/>
</perfInstance>
...
</list>
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. The value is the seconds counted from 00:00 on January 1, 1970 to
the specified time. An empty value indicates that the latest data is queried.
endTime
End time.
Long integer type. Optional. The value is the seconds counted from 00:00 on January 1, 1970 to
the specified time.
Returned Result
Status codes
Message header
200 (OK): Success.
Message body
<list>
<perfSummaryData>
<taskId>1</taskId>
<taskName>Interface Receiving Rate(bits/s)</taskName>
<devId>1</devId>
<instId>504</instId>
<objIndex>1</objIndex>
<objIndexDesc>[interface:InLoopBack0]</objIndexDesc>
<averageValue>0.0</averageValue>
<maximumValue>0.0</maximumValue>
<minimumValue>0.0</minimumValue>
<currentValue>0.0</currentValue>
<summaryValue>0.0</summaryValue>
</perfSummaryData>
....
</list>
For meanings of the fields in the returned value, see Query Single-Index Single-Interface
Performance Summary Data (page 336).
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/summaryData?taskId=1&devId=25&dataGranularity=1
accept: application/xml
.
Response
Content-Type: application/xml
...
<list>
<perfSummaryData>
<taskId>1</taskId>
<taskName>Interface Receiving Rate(bits/s)</taskName>
<devId>1</devId>
<instId>504</instId>
<objIndex>1</objIndex>
<objIndexDesc>[interface:InLoopBack0]</objIndexDesc>
<averageValue>0.0</averageValue>
<maximumValue>0.0</maximumValue>
<minimumValue>0.0</minimumValue>
<currentValue>0.0</currentValue>
<summaryValue>0.0</summaryValue>
</perfSummaryData>
<perfSummaryData>
<taskId>1</taskId>
<taskName>Interface Receiving Rate(bits/s)</taskName>
<devId>1</devId>
<instId>505</instId>
<objIndex>2</objIndex>
<objIndexDesc>[interface:NULL0]</objIndexDesc>
<averageValue>0.0</averageValue>
<maximumValue>0.0</maximumValue>
<minimumValue>0.0</minimumValue>
<currentValue>0.0</currentValue>
<summaryValue>0.0</summaryValue>
</perfSummaryData>
<perfSummaryData>
<taskId>1</taskId>
<taskName>Interface Receiving Rate(bits/s)</taskName>
<devId>1</devId>
<instId>510</instId>
<objIndex>40</objIndex>
<objIndexDesc>[interface:LoopBack0]</objIndexDesc>
<averageValue>49.975</averageValue>
<maximumValue>49.975</maximumValue>
<minimumValue>49.975</minimumValue>
<currentValue>49.975</currentValue>
<summaryValue>49.975</summaryValue>
</perfSummaryData>
<perfSummaryData>
<taskId>1</taskId>
<taskName>Interface Receiving Rate(bits/s)</taskName>
<devId>1</devId>
<instId>511</instId>
<objIndex>42</objIndex>
<objIndexDesc>[interface:Ethernet1/0]</objIndexDesc>
<averageValue>13781.966</averageValue>
<maximumValue>13781.966</maximumValue>
<minimumValue>13781.966</minimumValue>
<currentValue>13781.966</currentValue>
<summaryValue>13781.966</summaryValue>
<minimumValue>13781.966</minimumValue>
<currentValue>13781.966</currentValue>
<summaryValue>13781.966</summaryValue>
</perfSummaryData>
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. 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. The value is the seconds counted from 00:00 on January 1,
1970 to the specified time.
objIndex
dataGranularity Data granularity. Integer type. Optional. No default value. Valid values include 0 (automatically
calculated data), 1 (original data), 2 (hourly data), and 3 (daily data).
Returned Result
Status codes
Message header
HTTP/1.1 200 OK
Message body
<perfSummaryData>
<taskId>1</taskId>
<taskName>Interface Receiving Rate(bits/s)</taskName>
<devId>1</devId>
<instId>504</instId>
<objIndex>1</objIndex>
<objIndexDesc>[interface:InLoopBack0]</objIndexDesc>
<averageValue>0.0</averageValue>
<maximumValue>0.0</maximumValue>
<minimumValue>0.0</minimumValue>
<currentValue>0.0</currentValue>
<summaryValue>0.0</summaryValue>
</perfSummaryData>
Elements
perfSummaryData sub-elements
taskId
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
taskNameWithUnit
devIP
Device IP address.
String type.
devDisplayName
averageValue
maximumValue
minimumValue
currentValue
summaryValue
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
...
<perfSummaryData>
<taskId>1</taskId>
<taskName>Interface Receiving Rate(bits/s)</taskName>
<devId>1</devId>
<instId>505</instId>
<objIndex>2</objIndex>
<objIndexDesc>[interface:NULL0]</objIndexDesc>
<averageValue>0.0</averageValue>
<maximumValue>0.0</maximumValue>
<minimumValue>0.0</minimumValue>
<currentValue>0.0</currentValue>
<summaryValue>0.0</summaryValue>
</perfSummaryData>
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. The value is the seconds counted from 00:00 on January 1,
1970 to the specified time.
endTime
End time. Long integer type. Optional. The value is the seconds counted from 00:00 on January 1,
1970 to the specified time.
instId
dataGranularity Data granularity. Integer type. Optional. No default value. Valid values include 0 (automatically
calculated data), 1 (original data), 2 (hourly data), and 3 (daily data).
Returned Result
Status codes
Message header
HTTP/1.1 200 OK
Message body
<list>
<perfDetailData>
<dataVal>3.0</dataVal>
<dataTime>2011-06-20T16:56:25+08:00</dataTime>
<dataTimeStr>2011-06-20 16:56:25</dataTimeStr>
<dataType>0</dataType>
<minVal>3.0</minVal>
<maxVal>3.0</maxVal>
<sumVal>3.0</sumVal>
<sumCount>1</sumCount>
</perfDetailData>
</list>
Elements
perfSummaryData sub-elements
dataVal
Data value.
Double-precision floating-point type.
dataTime
Data time.
String type.
dataTimeStr
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
Example
Query performance details of the monitor instance with ID 1, which belongs to the index with ID
2 on the device whose ID is 2.
Request
GET http://imc_host:port/imcrs/perf/summaryData/detail?devId=2&taskId=2&instID=1
accept: application/xml
...
Response
HTTP/1.1 200 OK
Content-Type: application/xml
...
<list>
<perfDetailData>
<dataVal>3.0</dataVal>
<dataTime>2011-06-20T16:56:25+08:00</dataTime>
<dataTimeStr>2011-06-20 16:56:25</dataTimeStr>
<dataType>0</dataType>
<minVal>3.0</minVal>
<maxVal>3.0</maxVal>
<sumVal>3.0</sumVal>
<sumCount>1</sumCount>
</perfDetailData>
</list>
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. The value is the seconds counted from 00:00 on January 1, 1970 to
the specified time.
topN
Number of entries.
Integer type. Optional. The default value is 5.
Returned Result
Status codes
Message header
HTTP/1.1 200 OK
Message body
<list>
<perfTopNData>
<taskId>1</taskId>
<devId>42</devId>
<instId>831</instId>
<objIndex>4228057</objIndex>
<objIndexDesc>[interface:GigabitEthernet1/1/3]</objIndexDesc>
<dataVal>18017.037</dataVal>
<thresholdQuadrant>0</thresholdQuadrant>
<alarmLevel>-1</alarmLevel>
</perfTopNData>
...
</list>
Elements
perfTopNData sub-elements
taskId
devId
Device ID.
Integer type.
instId
Instance ID.
Integer type.
objIndex
Object index.
String type.
objIndexDesc
dataVal
thresholdQuadrant
Threshold range.
Integer type.
alarmLevel
Alarm level.
Integer type.
Example
Query and list the top 5 performance data for index with ID 1.
Request
GET http://imc_host:port/imcrs/perf/topNData?taskId=1&topN=5
accept: application/xml
...
Response
HTTP/1.1 200 OK
Content-Type: application/xml
...
<list>
<perfTopNData>
<taskId>1</taskId>
<devId>31</devId>
<instId>611</instId>
<objIndex>289407425</objIndex>
<objIndexDesc>[interface:GigabitEthernet5/1/2]</objIndexDesc>
<dataVal>31191.175</dataVal>
<thresholdQuadrant>0</thresholdQuadrant>
<alarmLevel>-1</alarmLevel>
</perfTopNData>
<perfTopNData>
<taskId>1</taskId>
<devId>31</devId>
<instId>664</instId>
<objIndex>503316929</objIndex>
<objIndexDesc>[interface:GigabitEthernet8/1/2]</objIndexDesc>
<dataVal>20852.936</dataVal>
<thresholdQuadrant>0</thresholdQuadrant>
<alarmLevel>-1</alarmLevel>
</perfTopNData>
<perfTopNData>
<taskId>1</taskId>
<devId>42</devId>
<instId>831</instId>
<objIndex>4228057</objIndex>
<objIndexDesc>[interface:GigabitEthernet1/1/3]</objIndexDesc>
<dataVal>17566.926</dataVal>
<thresholdQuadrant>0</thresholdQuadrant>
<alarmLevel>-1</alarmLevel>
</perfTopNData>
<perfTopNData>
<taskId>1</taskId>
<devId>31</devId>
<instId>581</instId>
<objIndex>4228041</objIndex>
<objIndexDesc>[interface:GigabitEthernet1/1/1]</objIndexDesc>
<dataVal>16502.646</dataVal>
<thresholdQuadrant>0</thresholdQuadrant>
<alarmLevel>-1</alarmLevel>
</perfTopNData>
<perfTopNData>
<taskId>1</taskId>
<devId>31</devId>
<instId>534</instId>
<objIndex>4227634</objIndex>
<objIndexDesc>[interface:Ethernet1/0/2]</objIndexDesc>
<dataVal>14941.145</dataVal>
<thresholdQuadrant>0</thresholdQuadrant>
<alarmLevel>-1</alarmLevel>
</perfTopNData>
</list>
Interface URI
/perf/task
Access Method
HTTP
POST
Message body
<perfItem>
<itemName>Added Task</itemName>
<unitType>1</unitType>
<selectDefaultUnit>10</selectDefaultUnit>
<userAddUnit>bps</userAddUnit>
<unit>kb/s</unit>
<indexType>[index1[2]:interface:1:0]</indexType>
<indexDesc>1.3.6.1.2.1.2.2.1.2</indexDesc>
<itemFunction>((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.16'))/t</itemFunction>
</perfItem>
Element description
perfItem sub-elements
itemName
Index name.
String type. Required. No default value.
unitType
Unit type.
Integer type. Optional. No default value.
User-defined unit.
String type. Optional. No default value.
unit
Index unit.
String type. Optional. No default value.
indexType
Index type.
String type. Required. No default value. Valid values can be successfully created.
indexDesc
itemFunction
Index formula.
String type. Required. No default value. Valid values can be successfully created.
Returned Result
Status codes
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
...
<perfItem>
<itemName>Added Task</itemName>
<unitType>1</unitType>
<selectDefaultUnit>10</selectDefaultUnit>
<userAddUnit>bps</userAddUnit>
<unit>kb/s</unit>
<indexType>[index1[2]:interface:1:0]</indexType>
<indexDesc>1.3.6.1.2.1.2.2.1.2</indexDesc>
<itemFunction>((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.16'))/t</itemFunction>
</perfItem>
Response
HTTP/1.1 201 Created
Location: http://imc_host:port/imcrs/perf/task/1
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
Example
Delete the custom index with ID 234.
Request
DELETE http://imc_host:port/imcrs/perf/task/delete/800001
accept: application/xml
...
Response
HTTP/1.1 204 No Content
...
The message body is empty.
11 Report Management
The Report Management commands enable you to query and view history for periodic reports.
This category includes the following commands:
347
Interface URI
/report/task
Access Method
HTTP
GET
Parameters
Query parameters
TaskName
TemplateName
TaskType
Returned Result
Status codes
Message body
<list>
<reportTask>
<id>1</id>
<name>Change report</name>
<nextExecuteTime>2011-08-20T04:00:00+08:00</nextExecuteTime>
<templateId>29</templateId>
<templateName>Change report</templateName>
<files>http://localhost:8080/imcrs/report/task/file/1</files>
<link href="http://localhost:8080/imcrs/report/task/detail/1" op="GET" rel="self"/>
</reportTask>
</list>
Elements
reportTask sub-elements
id
name
Template ID.
reportTask sub-elements
Long integer type.
templateName
files
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
...
<list>
<reportTask>
<id>1</id>
<name>Change report</name>
<nextExecuteTime>2011-08-20T04:00:00+08:00</nextExecuteTime>
<templateId>29</templateId>
<templateName>Change report</templateName>
<link href="http://localhost:8080/imcrs/report/task/detail/1" op="GET" rel="self"/>
<files>http://localhost:8080/imcrs/report/task/file/1</files>
</reportTask>
</list>
Interface URI
/report/task/detail/{id}
Access Method
HTTP
GET
Parameters
Path parameters
id
Returned Result
Status codes
Message body
<reportTask>
<id>1</id>
<name>Change report</name>
<nextExecuteTime>2011-08-20T04:00:00+08:00</nextExecuteTime>
<templateId>29</templateId>
<templateName>Change report</templateName>
<files>http://localhost:8080/imcrs/report/task/file/1</files>
</reportTask>
Elements
reportTask sub-elements
id
name
Template ID.
Long integer type.
templateName
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.1 200 OK
Content-Type: application/xml
<reportTask>
<id>1</id>
<name>Change report</name>
<nextExecuteTime>2011-08-20T04:00:00+08:00</nextExecuteTime>
<templateId>29</templateId>
<templateName>Change report</templateName>
<files>http://localhost:8080/imcrs/report/task/file/1</files>
</reportTask>
351
Interface URI
/report/task/file/{id}
Access Method
HTTP
GET
Parameters
Path parameters
id
Returned Result
Status codes
Message body
<list>
<reportTaskResultFile>
<taskId>1</taskId>
<fileName>20101214.pdf</fileName>
<file>http://localhost:8080/imcrs/report/task/download?taskId=1&fileName=20101214.pdf</file>
</reportTaskResultFile>
<link href="http://localhost:8080/imcrs/report/task/file/1?start=10&size=10" op="GET" rel="next"/>
</list>
Elements
reportTaskResultFile sub-elements
taskId
fileName
file
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
...
<list>
<reportTaskResultFile>
<taskId>1</taskId>
<fileName>20101222.pdf</fileName>
<file>http://localhost:8080/imcrs/report/task/download?taskId=1&fileName=20101222.pdf</file>
</reportTaskResultFile>
</list>
Interface URI
/report/task/download
Access Method
HTTP
GET
Parameters
Query parameters
taskId
fileName
Returned Result
Status codes
Message body
The browser displays the download file dialog box or directly opens the file.
Example
Get the history file named 20100223.pdf for periodic report with ID 1.
Request
GET http://imc_host:8080/imcrs/report/task/download?taskId=1&filename=20101223.pdf
accept: application/pdf,application/msexcel,text/comma-separated-values
...
Response
The browser displays the download file dialog box or directly opens the file.
Query Assets
355
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. 5 for container. 6 for power module. 7 for fan. 8 for sensor.
9 for module. 10 for port. 11 for stack device.
assetSerialNum
assetNum
Asset number.
String type. Optional. No default value.
assetIsFRU
assetPhysicalFlag
assetVendorType
Asset OID.
String type. Optional. No default value.
assetDevice.name
Device name.
String type. Optional. No default value.
assetDevice.ip
Device IP address.
String type. Optional. No default value.
Returned Result
Status codes
Message body
<list>
<netAsset>
<devId>27</devId>
<phyIndex>1001</phyIndex>
<deviceIp>10.153.89.231</deviceIp>
<deviceName>aaa</deviceName>
<desc>WS-C3750E-24TD - Provisioned</desc>
<vendorType>1.3.6.1.4.1.9.12.3.1.3.589</vendorType>
<containedIn>1</containedIn>
<phyClass>3</phyClass>
<relPos>1</relPos>
<name>1</name>
<hardVersion/>
<firmwareVersion/>
<softVersion/>
<serialNum/>
<mfgName/>
<model/>
<alias/>
<isFRU>1</isFRU>
<cleiCode/>
<buildInfo/>
<bom/>
<boardNum/>
<serverDate>2011-08-17T09:34:32+08:00</serverDate>
<remark/>
<assetNumber>234</assetNumber>
<physicalFlag>0</physicalFlag>
<device>http://localhost:8080/imcrs/plat/res/device/27</device>
<asset>http://localhost:8080/imcrs/netasset/asset/detail?devId=27&phyIndex=1001</asset>
</netAsset>
</list>
Elements
netAsset sub-elements
devId
phyIndex
deviceName
Device name.
String type.
deviceIp
Device IP address.
String type.
desc
Asset description.
String type.
vendorType
Asset OID.
String type.
containedIn
phyClass
Asset type.
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
name
Asset name.
String type.
hardVersion
Hardware version.
String type.
firmwareVersion
Firmware version.
String type.
softVersion
Software version.
String type.
serialNum
Serial number.
String type.
mfgName
Manufacturer name.
String type.
model
Model.
String type.
alias
Alias.
String type.
isFRU
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
netAsset sub-elements
device
asset
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
...
<list>
<netAsset>
<devId>27</devId>
<phyIndex>1001</phyIndex>
<deviceIp>10.153.89.231</deviceIp>
<deviceName>aaa</deviceName>
<desc>WS-C3750E-24TD - Provisioned</desc>
<vendorType>1.3.6.1.4.1.9.12.3.1.3.589</vendorType>
<containedIn>1</containedIn>
<phyClass>3</phyClass>
<relPos>1</relPos>
<name>1</name>
<hardVersion/>
<firmwareVersion/>
<softVersion/>
<serialNum/>
<mfgName/>
<model/>
<alias/>
<isFRU>1</isFRU>
<cleiCode/>
<buildInfo/>
<bom/>
<boardNum/>
<serverDate>2011-08-17T09:34:32+08:00</serverDate>
<remark/>
<assetNumber>234</assetNumber>
<physicalFlag>0</physicalFlag>
<device>http://localhost:8080/imcrs/plat/res/device/27</device>
<asset>http://localhost:8080/imcrs/netasset/asset/detail?devId=27&phyIndex=1001</asset>
</netAsset>
</list>
Interface URI
/netasset/asset/detail
Access Method
HTTP
GET
Parameters
Query parameters
devId
Device ID.
Long integer type. Required. No default value.
phyIndex
Returned Result
Status codes
Message body
<netAsset>
<devId>27</devId>
<phyIndex>1001</phyIndex>
<deviceIp>10.153.89.231</deviceIp>
<deviceName>aaa</deviceName>
<desc>WS-C3750E-24TD - Provisioned</desc>
<vendorType>1.3.6.1.4.1.9.12.3.1.3.589</vendorType>
<containedIn>1</containedIn>
<phyClass>3</phyClass>
<relPos>1</relPos>
<name>1</name>
<hardVersion/>
<firmwareVersion/>
<softVersion/>
<serialNum/>
<mfgName/>
<model/>
<alias/>
<isFRU>1</isFRU>
<cleiCode/>
<buildInfo/>
<bom/>
<boardNum/>
<serverDate>2011-08-17T09:34:32+08:00</serverDate>
<remark/>
<assetNumber>234</assetNumber>
<physicalFlag>0</physicalFlag>
<device>http://localhost:8080/imcrs/plat/res/device/27</device>
</netAsset>
Elements
netAsset sub-elements
devId
phyIndex
deviceName
Device name.
String type.
deviceIp
Device IP address.
String type.
desc
Asset description.
String type.
vendorType
Asset OID.
String type.
containedIn
phyClass
Asset type.
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
name
Asset name.
String type.
hardVersion
Hardware version.
String type.
Software version.
String type.
serialNum
Serial number.
String type.
mfgName
Manufacturer name.
String type.
model
Model.
String type.
alias
Alias.
String type.
isFRU
361
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
device
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
<netAsset>
<devId>27</devId>
<phyIndex>1001</phyIndex>
<deviceIp>10.153.89.231</deviceIp>
<deviceName>aaa</deviceName>
<desc>WS-C3750E-24TD - Provisioned</desc>
<vendorType>1.3.6.1.4.1.9.12.3.1.3.589</vendorType>
<containedIn>1</containedIn>
<phyClass>3</phyClass>
<relPos>1</relPos>
<name>1</name>
<hardVersion/>
<firmwareVersion/>
<softVersion/>
<serialNum/>
<mfgName/>
<model/>
<alias/>
<isFRU>1</isFRU>
<cleiCode/>
<buildInfo/>
<bom/>
<boardNum/>
<serverDate>2011-08-17T09:34:32+08:00</serverDate>
<remark/>
<assetNumber>234</assetNumber>
<physicalFlag>0</physicalFlag>
<device>http://localhost:8080/imcrs/plat/res/device/27</device>
</netAsset>
Query VLANs
Add VLAN
Delete VLAN
Query VLANs
Query and list VLAN information on the device with certain criteria.
Interface URI
/vlan
Access Method
HTTP
GET
Parameters
Query parameters
devId
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
total
Returned Result
Status codes
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: 20
Message body
<list>
<vlan>
<vlanId>1</vlanId>
<vlanName>VLAN 0001</vlanName>
<vlanStatus>1</vlanStatus>
</vlan>
<vlan>
<vlanId>2</vlanId>
<vlanName>VLAN 0002</vlanName>
<vlanStatus>1</vlanStatus>
</vlan>
<vlan>
<vlanId>3</vlanId>
<vlanName>VLAN 0003</vlanName>
<vlanStatus>1</vlanStatus>
</vlan>
<vlan>
<vlanId>4</vlanId>
<vlanName>VLAN 0004</vlanName>
<vlanStatus>1</vlanStatus>
</vlan>
<vlan>
<vlanId>5</vlanId>
<vlanName>VLAN 0005</vlanName>
<vlanStatus>1</vlanStatus>
</vlan>
<vlan>
<vlanId>6</vlanId>
<vlanName>VLAN 0006</vlanName>
<vlanStatus>1</vlanStatus>
</vlan>
<vlan>
<vlanId>7</vlanId>
<vlanName>VLAN 0007</vlanName>
<vlanStatus>1</vlanStatus>
</vlan>
<vlan>
<vlanId>8</vlanId>
<vlanName>VLAN 0008</vlanName>
<vlanStatus>1</vlanStatus>
</vlan>
<vlan>
<vlanId>9</vlanId>
<vlanName>VLAN 0009</vlanName>
<vlanStatus>1</vlanStatus>
</vlan>
<vlan>
<vlanId>10</vlanId>
<vlanName>VLAN 0010</vlanName>
<vlanStatus>1</vlanStatus>
</vlan>
<link href="http://localhost:8080/imcrs/vlan?start=10&size=10&devId=8" op="GET" rel="next"/>
</list>
Elements
VLAN sub-elements
vlanId
vlanName
VLAN name.
String type.
vlanStatus
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
...
<list>
<vlan>
<vlanId>10</vlanId>
<vlanName>VLAN 0010</vlanName>
<vlanStatus>1</vlanStatus>
</vlan>
<vlan>
<vlanId>11</vlanId>
<vlanName>VLAN 0011</vlanName>
<vlanStatus>1</vlanStatus>
</vlan>
<vlan>
<vlanId>12</vlanId>
<vlanName>VLAN 0012</vlanName>
<vlanStatus>1</vlanStatus>
</vlan>
<vlan>
<vlanId>13</vlanId>
<vlanName>VLAN 0013</vlanName>
<vlanStatus>1</vlanStatus>
</vlan>
<vlan>
<vlanId>14</vlanId>
<vlanName>VLAN 0014</vlanName>
<vlanStatus>1</vlanStatus>
</vlan>
<vlan>
<vlanId>15</vlanId>
<vlanName>VLAN 0015</vlanName>
<vlanStatus>1</vlanStatus>
</vlan>
<vlan>
<vlanId>16</vlanId>
<vlanName>VLAN 0016</vlanName>
<vlanStatus>1</vlanStatus>
</vlan>
<vlan>
<vlanId>17</vlanId>
<vlanName>VLAN 0017</vlanName>
<vlanStatus>1</vlanStatus>
</vlan>
<vlan>
<vlanId>18</vlanId>
<vlanName>VLAN 0018</vlanName>
<vlanStatus>1</vlanStatus>
</vlan>
<vlan>
<vlanId>19</vlanId>
<vlanName>VLAN 0019</vlanName>
<vlanStatus>1</vlanStatus>
</vlan>
<link href="http://localhost:8080/imcrs/vlan?start=0&size=10&devId=8" op="GET" rel="previous"/>
<link href="http://localhost:8080/imcrs/vlan?start=20&size=10&devId=8" op="GET" rel="next"/>
</list>
Interface URI
/vlan/{vlanId}
Access Method
HTTP
GET
Parameters
Query parameters
vlanId
VLAN ID.
Integer type. Required. No default value.
devId
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
total
Returned Result
Status codes
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: 52
Message body
<list>
<interface>
<ifIndex>4227626</ifIndex>
</interface>
<interface>
<ifIndex>4227634</ifIndex>
</interface>
<interface>
<ifIndex>4227642</ifIndex>
</interface>
<interface>
<ifIndex>4227650</ifIndex>
</interface>
<interface>
<ifIndex>4227658</ifIndex>
</interface>
<interface>
<ifIndex>4227666</ifIndex>
</interface>
<interface>
<ifIndex>4227674</ifIndex>
</interface>
<interface>
<ifIndex>4227682</ifIndex>
</interface>
<interface>
<ifIndex>4227690</ifIndex>
</interface>
<interface>
<ifIndex>4227698</ifIndex>
</interface>
<link href="http://localhost:8080/imcrs/vlan/1?start=10&size=10&devId=8" op="GET" rel="next"/>
</list>
Elements
VLAN port sub-elements
ifIndex
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
...
<list>
<interface>
<ifIndex>4227698</ifIndex>
</interface>
<interface>
<ifIndex>4227706</ifIndex>
</interface>
<interface>
<ifIndex>4227714</ifIndex>
</interface>
<interface>
<ifIndex>4227722</ifIndex>
</interface>
<interface>
<ifIndex>4227730</ifIndex>
</interface>
<interface>
<ifIndex>4227738</ifIndex>
</interface>
<interface>
<ifIndex>4227746</ifIndex>
</interface>
<interface>
<ifIndex>4227754</ifIndex>
</interface>
<interface>
<ifIndex>4227762</ifIndex>
</interface>
<interface>
<ifIndex>4227770</ifIndex>
</interface>
<link href="http://localhost:8080/imcrs/vlan/1?start=0&size=10&devId=8" op="GET" rel="previous"/>
<link href="http://localhost:8080/imcrs/vlan/1?start=20&size=10&devId=8" op="GET" rel="next"/>
</list>
Add VLAN
Add a VLAN on the device.
Interface URI
/vlan
Access Method
HTTP
POST
Message body
<vlan>
<vlanId>1111</vlanId>
<vlanName>VLAN 1111</vlanName>
</vlan>
Parameters
VLAN sub-elements
devId
vlanId
VLAN ID.
Integer type. Required. No default value.
vlanName
VLAN name.
String type. Required. No default value.
Returned Result
Status codes
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/vlan?devId=13
Add VLAN
371
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
...
<vlan>
<vlanId>1111</vlanId>
<vlanName>VLAN 1111</vlanName>
</vlan>
Response
HTTP/1.1 201 Created
Location: http://localhost:8080/imcrs/vlan?devId=13
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
vlanId
VLAN ID.
Integer type. Required. No default value.
Returned Result
Status codes
Example
Delete the VLAN with ID 1111 from the device whose ID is 33.
Request
DELETE http://imc_host:8080/imcrs/vlan?devId=33&vlanId=1111
accept: application/xml
...
Response
None.
Interface URI
/vlan
Access Method
HTTP
PUT
Message body
<vlan>
<vlanId>1111</vlanId>
<vlanName>VLAN 1111</vlanName>
</vlan>
Parameters
Query parameters
devId
vlanId
VLAN ID
Integer type. Required. No default value.
vlanName
VLAN name.
String type. Required. No default value.
Returned Result
Status codes
Example
Change the name to "VLAN 111" for the VLAN with ID 1111 on the device whose ID is 13.
Request
PUT http://localhost:8080/imcrs/vlan?devId=13
accept: application/xml
...
<vlan>
<vlanId>1111</vlanId>
<vlanName>VLAN 1111</vlanName>
</vlan>
Response
HTTP/1.1 204 No Content
...
374
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
vlanId
VLAN ID
Integer type. Required. No default value.
vlanName
VLAN name.
String type. Required. No default value.
Returned Result
Status codes
If the operation succeeds, the Location field gives the URI of the VLAN resource where the port is
located. The message body is empty.
HTTP/1.1 201 Created
http://localhost:8080/imcrs/vlan/777?devId=33
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.1 201 Created
http://localhost:8080/imcrs/vlan/777?devId=33
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
vlanId
VLAN ID
Integer type. Required. No default value.
vlanName
VLAN name.
String type. Required. No default value.
Returned Result
Status codes
Example
Remove the port with index 1538 of the device with ID 33 from the VLAN whose ID is 777.
Request
DELETE http://imc_host:8080/imcrs/vlan/777?devId=33&ifIndex=1538
accept: application/xml
...
Response
None.
Interface URI
/vlan/access
Access Method
HTTP
GET
Parameters
Query parameters
devId
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
total
Returned Result
Status codes
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: 113
Message body
<list>
<accessIf>
<ifIndex>4227626</ifIndex>
<pvid>1</pvid>
</accessIf>
<accessIf>
<ifIndex>4227642</ifIndex>
<pvid>1</pvid>
</accessIf>
<accessIf>
<ifIndex>4227650</ifIndex>
<pvid>1</pvid>
</accessIf>
<accessIf>
<ifIndex>4227658</ifIndex>
<pvid>1</pvid>
</accessIf>
<accessIf>
<ifIndex>4227666</ifIndex>
<pvid>1</pvid>
</accessIf>
<link href="http://localhost:8080/imcrs/vlan/access?start=5&size=5&devId=13" op="GET" rel="next"/>
</list>
Elements
Access port sub-elements
ifIndex
pvid
Example
Query and list information about the first five access ports on the device whose ID is 33.
Request
GET http://imc_host:8080/imcrs/vlan/access?devId=13&start=0&size=5
accept: application/xml
...
Response
HTTP/1.1 200 OK
Content-Type: application/xml
...
<list>
<accessIf>
<ifIndex>4227626</ifIndex>
<pvid>1</pvid>
</accessIf>
<accessIf>
<ifIndex>4227642</ifIndex>
<pvid>1</pvid>
</accessIf>
<accessIf>
<ifIndex>4227650</ifIndex>
<pvid>1</pvid>
</accessIf>
<accessIf>
<ifIndex>4227658</ifIndex>
<pvid>1</pvid>
</accessIf>
<accessIf>
<ifIndex>4227666</ifIndex>
<pvid>1</pvid>
</accessIf>
<link href="http://localhost:8080/imcrs/vlan/access?start=5&size=5&devId=13" op="GET" rel="next"/>
</list>
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
destVlanId
ifIndex
Returned Result
Status codes
Example
Change the PVID to 4 for a port indexed 1794 on the device with ID 33.
Request
PUT http://imc_host:8080/imcrs/vlan/access?devId=33&destVlanId=4&ifIndex=1794
accept: application/xml
...
Response
None.
Interface URI
/vlan/hybrid
Access Method
HTTP
GET
Parameters
Query parameters
devId
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
total
Returned Result
Status codes
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: 7
Message body
<list>
<hybridIf>
<ifIndex>4227722</ifIndex>
<pvid>1</pvid>
<taggedVlans/>
<untagVlanFlag>false</untagVlanFlag>
<untaggedVlans/>
<forbidenVlanFlag>false</forbidenVlanFlag>
<forbiddenVlans/>
</hybridIf>
<hybridIf>
<ifIndex>4227730</ifIndex>
<pvid>78</pvid>
<taggedVlans/>
<untagVlanFlag>false</untagVlanFlag>
<untaggedVlans/>
<forbidenVlanFlag>false</forbidenVlanFlag>
<forbiddenVlans/>
</hybridIf>
<hybridIf>
<ifIndex>4227802</ifIndex>
<pvid>1</pvid>
<taggedVlans/>
<untagVlanFlag>false</untagVlanFlag>
<untaggedVlans/>
<forbidenVlanFlag>false</forbidenVlanFlag>
<forbiddenVlans/>
</hybridIf>
<hybridIf>
<ifIndex>4227818</ifIndex>
<pvid>1</pvid>
<taggedVlans>2</taggedVlans>
<untagVlanFlag>false</untagVlanFlag>
<untaggedVlans>1,5</untaggedVlans>
<forbidenVlanFlag>false</forbidenVlanFlag>
<forbiddenVlans/>
</hybridIf>
<hybridIf>
<ifIndex>289407098</ifIndex>
<pvid>1</pvid>
<taggedVlans/>
<untagVlanFlag>false</untagVlanFlag>
<untaggedVlans/>
<forbidenVlanFlag>false</forbidenVlanFlag>
<forbiddenVlans/>
</hybridIf>
<link href="http://localhost:8080/imcrs/vlan/hybrid?start=5&size=5&devId=13" op="GET" rel="next"/>
</list>
Elements
Hybrid port sub-elements
ifIndex
pvid
taggedVlans
Tagged VLANs.
String type.
untaggedVlans
Untagged VLANs.
String type.
forbiddenVlans
Forbidden VLANs.
String type.
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
...
<list>
<hybridIf>
<ifIndex>4227722</ifIndex>
<pvid>1</pvid>
<taggedVlans/>
<untagVlanFlag>false</untagVlanFlag>
<untaggedVlans/>
<forbidenVlanFlag>false</forbidenVlanFlag>
<forbiddenVlans/>
</hybridIf>
<hybridIf>
<ifIndex>4227730</ifIndex>
<pvid>78</pvid>
<taggedVlans/>
<untagVlanFlag>false</untagVlanFlag>
<untaggedVlans/>
<forbidenVlanFlag>false</forbidenVlanFlag>
<forbiddenVlans/>
</hybridIf>
<hybridIf>
<ifIndex>4227802</ifIndex>
<pvid>1</pvid>
<taggedVlans/>
<untagVlanFlag>false</untagVlanFlag>
<untaggedVlans/>
<forbidenVlanFlag>false</forbidenVlanFlag>
<forbiddenVlans/>
</hybridIf>
<hybridIf>
<ifIndex>4227818</ifIndex>
<pvid>1</pvid>
<taggedVlans>2</taggedVlans>
<untagVlanFlag>false</untagVlanFlag>
<untaggedVlans>1,5</untaggedVlans>
<forbidenVlanFlag>false</forbidenVlanFlag>
<forbiddenVlans/>
</hybridIf>
<hybridIf>
<ifIndex>289407098</ifIndex>
<pvid>1</pvid>
<taggedVlans/>
<untagVlanFlag>false</untagVlanFlag>
<untaggedVlans/>
<forbidenVlanFlag>false</forbidenVlanFlag>
<forbiddenVlans/>
</hybridIf>
<link href="http://localhost:8080/imcrs/vlan/hybrid?start=5&size=5&devId=13" op="GET" rel="next"/>
</list>
Interface URI
/vlan/hybrid
Access Method
HTTP
POST
Message body
POST http://imc_host:8080/imcrs/vlan/hybrid?devId=33
accept: application/xml
...
<hybridIf forbidenVlanFlag="false" forbiddenVlans="" ifIndex="2423" pvid="1" taggedVlans="4,5" untagVlanFlag="true"
untaggedVlans="3,7"/>
Parameters
Hybrid port sub-elements
devId
ifIndex
pvid
tagVlan
Tagged VLAN.
String type. Optional. The tagVlan and untagVlan parameters cannot be empty at the same time.
untagVlanFlag
untagVlan
Untagged VLAN.
String type. Optional. The tagVlan and untagVlan parameters cannot be empty at the same time.
forbidenVlanFlag
forbiddenVlans
Forbidden VLAN.
String type. Optional. This parameter is effective only to HP products.
Returned Result
Status codes
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
...
<hybridIf forbidenVlanFlag="false" forbiddenVlans="" ifIndex="2423" pvid="1" taggedVlans="4,5" untagVlanFlag="true"
untaggedVlans="3,7"/>
Response
HTTP/1.1 201 Created
Location: http://imc_host:port/imcrs/vlan/hybrid?devId=33
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
ifIndex
Returned Result
Status codes
Example
Delete the hybrid port with index 2434 from the device whose ID is 33.
Request
DELETE http://imc_host:8080/imcrs/vlan/hybrid?devId=33&ifIndex=2434
accept: application/xml
...
Response
None
Interface URI
/vlan/hybrid
Access Method
HTTP
PUT
Message body
PUT http://imc_host:8080/imcrs/vlan/hybrid?devId=33
accept: application/xml
...
<hybridIf forbidenVlanFlag="false" forbiddenVlans="" ifIndex="2423" pvid="1" taggedVlans="4,5" untagVlanFlag="true"
untaggedVlans="3,7"/>
Elements
Hybrid port sub-elements
devId
ifIndex
pvid
tagVlan
Tagged VLAN.
String type. Optional. The tagVlan and untagVlan parameters cannot be empty at the same time.
untagVlanFlag
untagVlan
Untagged VLAN.
String type. Optional. The tagVlan and untagVlan parameters cannot be empty at the same time.
forbidenVlanFlag
forbiddenVlans
Forbidden VLAN.
String type. Optional. This parameter is effective only to HP products.
Returned Result
Status codes
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
...
<hybridIf forbidenVlanFlag="false" forbiddenVlans="" ifIndex="2423" pvid="1" taggedVlans="4,5" untagVlanFlag="true"
untaggedVlans="3,7"/>
Response
None
Interface URI
/vlan/trunk
Access Method
HTTP
GET
Parameters
Query parameters
devId
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
total
Returned Result
Status codes
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: 6
Message body
<list>
<trunkIf>
<ifIndex>4227634</ifIndex>
<pvid>1</pvid>
<allowedVlans>1,10</allowedVlans>
</trunkIf>
<trunkIf>
<ifIndex>4227698</ifIndex>
<pvid>23</pvid>
<allowedVlans>1-1024</allowedVlans>
</trunkIf>
<trunkIf>
<ifIndex>4227706</ifIndex>
<pvid>23</pvid>
<allowedVlans>1-1024</allowedVlans>
</trunkIf>
<trunkIf>
<ifIndex>4227754</ifIndex>
<pvid>56</pvid>
<allowedVlans>1-1024</allowedVlans>
</trunkIf>
<trunkIf>
<ifIndex>503316850</ifIndex>
<pvid>1</pvid>
<allowedVlans>1</allowedVlans>
</trunkIf>
<link href="http://localhost:8080/imcrs/vlan/trunk?start=5&size=5&total=false&devId=13" op="GET" rel="next"/>
</list>
Elements
Trunk port sub-elements
ifIndex
pvid
allowedVlans
Allowed VLANs.
String type.
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
...
<list>
<trunkIf>
<ifIndex>4227634</ifIndex>
<pvid>1</pvid>
<allowedVlans>1,10</allowedVlans>
</trunkIf>
<trunkIf>
<ifIndex>4227698</ifIndex>
<pvid>23</pvid>
<allowedVlans>1-1024</allowedVlans>
</trunkIf>
<trunkIf>
<ifIndex>4227706</ifIndex>
<pvid>23</pvid>
<allowedVlans>1-1024</allowedVlans>
</trunkIf>
<trunkIf>
<ifIndex>4227754</ifIndex>
<pvid>56</pvid>
<allowedVlans>1-1024</allowedVlans>
</trunkIf>
<trunkIf>
<ifIndex>503316850</ifIndex>
<pvid>1</pvid>
<allowedVlans>1</allowedVlans>
</trunkIf>
<link href="http://localhost:8080/imcrs/vlan/trunk?start=5&size=5&total=false&devId=13" op="GET" rel="next"/>
</list>
391
Interface URI
/vlan/trunk
Access Method
HTTP
POST
Message body
POST http://imc_host:8080/imcrs/vlan/trunk?devId=33
accept: application/xml
...
<trunkIf allowedVlans="4,7" ifIndex="2423" pvid="1"/>
Parameters
Trunk port sub-elements
devId
ifIndex
pvid
allowedVlans
Allowed VLAN.
String type. Optional. No default value.
Returned Result
Status codes
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/trunk?devId=33
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
...
<trunkIf allowedVlans="4,7" ifIndex="2423" pvid="1"/>
Response
HTTP/1.1 201 Created
Location: http://imc_host:port/imcrs/vlan/trunk?devId=33
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
ifIndex
Returned Result
Status codes
Example
Delete the trunk port with index 2434 from the device whose ID is 33.
Request
DELETE http://imc_host:8080/imcrs/vlan/trunk?devId=33&ifIndex=2434
accept: application/xml
...
Response
None
Interface URI
/vlan/trunk
Access Method
HTTP
PUT
Message body
PUT http://imc_host:8080/imcrs/vlan/trunk?devId=33
accept: application/xml
...
<trunkIf allowedVlans="3,7" ifIndex="2423" pvid="1"/>
Elements
Trunk port sub-elements
devId
ifIndex
pvid
allowedVlans
Allowed VLAN.
String type. Optional. No default value.
Returned Result
Status codes
Example
Modify a trunk port on the device whose ID is 33. The new parameters are as follows: ifIndex=2434,
pvid=1, allowedVlan=3,7.
Request
PUT http://imc_host:8080/imcrs/vlan/trunk?devId=33
accept: application/xml
...
<trunkIf allowedVlans="3,7" ifIndex="2423" pvid="1"/>
Response
None
Modify Trunk Port 395
Interface URI
/vlan/vlanif
Access Method
HTTP
GET
Parameters
Query parameters
devId
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
total
Returned Result
Status codes
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
<list>
<vlanIf>
<vlanId>1</vlanId>
<isPrimary>true</isPrimary>
<enableDHCP>false</enableDHCP>
<ipAddress>10.153.89.12</ipAddress>
<ipMask>255.255.255.224</ipMask>
</vlanIf>
<vlanIf>
<vlanId>2</vlanId>
<isPrimary>true</isPrimary>
<enableDHCP>false</enableDHCP>
<ipAddress>12.4.3.2</ipAddress>
<ipMask>255.255.255.224</ipMask>
</vlanIf>
<vlanIf>
<vlanId>3</vlanId>
<isPrimary>true</isPrimary>
<enableDHCP>false</enableDHCP>
<ipAddress>10.0.0.1</ipAddress>
<ipMask>255.255.255.224</ipMask>
</vlanIf>
<vlanIf>
<vlanId>4</vlanId>
<isPrimary>true</isPrimary>
<enableDHCP>false</enableDHCP>
<ipAddress>5.3.6.9</ipAddress>
<ipMask>255.255.255.0</ipMask>
</vlanIf>
</list>
Elements
VLAN interface sub-elements
vlanId
isPrimary
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.
ipAddress
IP address.
String type.
ipMask
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
...
<list>
<vlanIf>
<vlanId>1</vlanId>
<isPrimary>true</isPrimary>
<enableDHCP>false</enableDHCP>
<ipAddress>10.153.89.12</ipAddress>
<ipMask>255.255.255.224</ipMask>
</vlanIf>
<vlanIf>
<vlanId>2</vlanId>
<isPrimary>true</isPrimary>
<enableDHCP>false</enableDHCP>
<ipAddress>12.4.3.2</ipAddress>
<ipMask>255.255.255.224</ipMask>
</vlanIf>
<vlanIf>
<vlanId>3</vlanId>
<isPrimary>true</isPrimary>
<enableDHCP>false</enableDHCP>
<ipAddress>10.0.0.1</ipAddress>
<ipMask>255.255.255.224</ipMask>
</vlanIf>
<vlanIf>
<vlanId>4</vlanId>
<isPrimary>true</isPrimary>
<enableDHCP>false</enableDHCP>
<ipAddress>5.3.6.9</ipAddress>
<ipMask>255.255.255.0</ipMask>
</vlanIf>
</list>
Interface URI
/vlan/vlanif/{vlanId}
Access Method
HTTP
GET
Parameters
Query parameters
vlanId
VLAN ID.
Integer type. Required. No default value.
devId
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
total
Returned Result
Status codes
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: 1
Message body
<list>
<vlanIf>
<vlanId>2</vlanId>
<isPrimary>true</isPrimary>
<enableDHCP>false</enableDHCP>
<ipAddress>12.4.3.2</ipAddress>
<ipMask>255.255.255.224</ipMask>
</vlanIf>
</list>
Elements
VLAN interface sub-elements
vlanId
isPrimary
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.
ipAddress
IP address.
String type.
ipMask
Example
Query and list the first five VLAN interfaces for the VLAN with ID 2 on the device whose ID is 13.
Request
GET http://localhost:8080/imcrs/vlan/vlanif/2?devId=13&start=0&size=5
accept: application/xml
...
Response
HTTP/1.1 200 OK
Content-Type: application/xml
...
<list>
<vlanIf>
<vlanId>2</vlanId>
<isPrimary>true</isPrimary>
<enableDHCP>false</enableDHCP>
<ipAddress>12.4.3.2</ipAddress>
<ipMask>255.255.255.224</ipMask>
</vlanIf>
</list>
Interface URI
/vlan/vlanif
Access Method
HTTP
POST
Message body
POST http://imc_host:8080/imcrs/vlan/vlanif?devId=3
accept: application/xml
...
<vlanIf enableDHCP="false" ipAddress="1.1.1.1" ipMask="255.0.0.0" isPrimary="true" vlanId="600"/>
Parameters
VLAN interface sub-elements
vlanId
isPrimary
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. Optional. The default value is false.
ipAddress
IP address.
String type. Optional. If the enableDHCP parameter is false then neither ipAddress or ipMask can
be empty.
ipMask
Returned Result
Status codes
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/vlanif?devId=3
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
...
<vlanIf enableDHCP="false" ipAddress="1.1.1.1" ipMask="255.0.0.0" isPrimary="true" vlanId="600"/>
Response
HTTP/1.1 201 Created
Location: http://imc_host:port/imcrs/vlan/vlanif?devId=3
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.
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. Optional. The default value is false.
ipAddress
IP address. String type. Optional. If the enableDHCP parameter is false then neither ipAddress or
ipMask can be empty.
ipMask
Network mask of an IP address. String type. Optional. If the enableDHCP parameter is false, then
neither ipAddress nor ipMask can be empty.
Returned Result
Status codes
Example
Delete a VLAN interface from 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
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
...
Response
None
14 ACL Management
The ACL Management category of commands enables you to query on and manage ACL devices
and applications. This category includes the following commands:
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. If a value smaller than 0 is input, the default value 0
is used.
size
total
Returned Result
Status codes
200(OK): Success.
Message header
When the total parameter is true, the Total field gives the total number of matched child time ranges.
No message body is included.
HTTP/1.1 200 OK
Total: 7
Message body
<list>
<aclDevice>
<deviceId>68</deviceId>
<deviceName>5500-EI(10.153.89.182)</deviceName>
<deviceIp>10.153.89.182</deviceIp>
<deviceModel>3Com S5500-52-PWR-EI</deviceModel>
<pollInterval>1440</pollInterval>
<lastPoll>2011-10-52 10:52:47</lastPoll>
<pollResult>1</pollResult>
<acl>http://imc_host:8080/imcrs/acl/res/acl/68</acl>
<aclResUse>http://imc_host:8080/imcrs/acl/res/aclUse/68</aclResUse>
<aclResTimerange>http://imc_host:8080/imcrs/acl/res/aclTimeRange/68</aclResTimerange>
</aclDevice>
...
</list>
Elements
ACL sub-elements
deviceId
deviceName
Device name.
String type.
deviceIp
Device IP address.
String type.
deviceModel
Device type.
String type.
pollInterval
Polling interval (in hours), which ranges from 0 to 168 and can be -1. The value of -1 indicates
that polling is disabled.
Long integer type.
lastPoll
pollResult
Last polling result: 0 for failure, 1 for success, and 2 for polling.
Integer type.
acl
aclResUse
aclResTimerange
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
...
<list>
<aclDevice>
<deviceId>74</deviceId>
<deviceName>H3C(10.153.89.195)</deviceName>
<deviceIp>10.153.89.195</deviceIp>
<deviceModel>H3C WX5002-128AP</deviceModel>
<pollInterval>1440</pollInterval>
<lastPoll>2011-08-59 20:59:11</lastPoll>
<pollResult>1</pollResult>
<acl>http://imc_host:8080/imcrs/acl/res/acl/74</acl>
<aclResUse>http://imc_host:8080/imcrs/acl/res/aclUse/74</aclResUse>
<aclResTimerange>http://imc_host:8080/imcrs/acl/res/aclTimeRange/74</aclResTimerange>
</aclDevice>
...
<link href="http://imc_host:8080/imcrs/acl/res/aclDevice?start=0&size=4&deviceIp=10"/>
<link href="http://imc_host:8080/imcrs/acl/res/aclDevice?start=6&size=4&deviceIp=10"/>
</list>
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
Example
Synchronize ACL configuration information for a device whose device ID is 68.
Request
PUT http://imc_host:8080/imcrs/acl/res/aclDevice/68/synchronize
accept: application/xml
...
Response
HTTP/1.1 204 No Content
Content-Type: application/xml
...
No message body is included.
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.
size
total
Returned Result
Status codes
200(OK): Success.
Message header
When the total parameter is true, the Total field gives the total number of matched records. No
message body is included.
HTTP/1.1 200 OK
Total: 7
Message body
<list>
<acl>
<aclId>1371</aclId>
<parentId>68</parentId>
<parentType>1</parentType>
<aclName>2345</aclName>
<aclNameType>1</aclNameType>
<aclType>2</aclType>
<aclMatchorder>1</aclMatchorder>
<aclDesc>dd</aclDesc>
<tmpName>1371</tmpName>
<tmpName/>
<updateFlag>0</updateFlag>
<aclRules>http://imc_host:8080/imcrs/acl/res/acl/68,1371</aclRules>
</acl>
...
</list>
Elements
ACL sub-elements
aclId
parentId
parentType
aclName
ACL name.
String type.
aclNameType
aclType
ACL type.
Long integer type.
aclMatchorder
aclDesc
ACL description.
String type.
tmpName
Template name.
String type.
tmpDesc
Template description.
String type.
useFlag
410
ACL Management
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
...
<list>
<acl>
<aclId>1391</aclId>
<parentId>25</parentId>
<parentType>1</parentType>
<aclName>2222</aclName>
<aclNameType>1</aclNameType>
<aclType>2</aclType>
<aclMatchorder>1</aclMatchorder>
<aclDesc>zxm</aclDesc>
<tmpName>1391</tmpName>
<tmpName/>
<updateFlag>0</updateFlag>
<aclRules>http://imc_host:8080/imcrs/acl/res/acl/25,1391</aclRules>
</acl>
...
<link href="http://imc_host:8080/imcrs/acl/res/acl/25?start=0&size=2" op="GET" rel="previous"/>
<link href="http://imc_host:8080/imcrs/acl/res/acl/25?start=4&size=2" op="GET" rel="next"/>
</list>
411
Interface URI
/acl/res/acl
Access Method
HTTP
POST
Message body
POST http://imc_host:8080/imcrs/acl/res/acl
accept: application/xml
...
<acl>
<parentId>68</parentId>
<aclName>2222</aclName>
<aclNameType>1</aclNameType>
<aclType>2</aclType>
<aclDesc>acl_2222</aclDesc>
<aclRuleList>
<aclRule>
<trName/>
<action>1</action>
<sourceAddr>192.168.10.0/255.255.10.10</sourceAddr>
<fragment>1</fragment>
<logging>1</logging>
<vpnIntance/>
...
</aclRule>
</aclRuleList>
</acl>
Elements
ACL sub-elements
parentId
parentType
aclName
ACL name.
String type.
aclNameType
aclType
ACL type.
Long integer type.
aclMatchorder
aclDesc
412
ACL Management
ACL description.
ACL sub-elements
String type.
tmpName
Template name.
String type.
tmpDesc
Template description.
String type.
useFlag
action
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.
protocol
Protocol.
Long integer type.
vpnIntance
VPN instance.
String type.
sourceAddr
Source address.
String type.
sourceWildcard
destAddr
destMask
sourcePortOper
sourcePort1
Source port 1.
413
Source port 2.
Long integer type.
destPortOper
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.
precedence
IP precedence.
Long integer type.
tos
ToS.
Long integer type.
dscp
DSCP.
Long integer type.
priority
802.3 precedence.
Long integer type.
formatType
Encapsulation type.
Long integer type.
srcVlanId
l2ProtocolCode
l2ProtocolMask
414
ACL Management
sourceMacAddr
sourceMacWildcard
destMacAddr
destMacMask
ifdesc
Interface description.
String type.
ruleString
Rule string.
String type.
Returned Result
Status codes
Example
Add a standard ACL on the device whose device ID is 68.
Request
POST http://imc_host:8080/imcrs/acl/res/acl
accept: application/xml
...
<acl>
<parentId>68</parentId>
<aclName>2222</aclName>
<aclNameType>1</aclNameType>
<aclType>2</aclType>
<aclDesc>acl_2222</aclDesc>
<aclRuleList>
<aclRule>
<trName/>
<action>1</action>
<sourceAddr>192.168.10.0/255.255.10.10</sourceAddr>
<fragment>1</fragment>
<logging>1</logging>
<vpnIntance/>
</aclRule>
</aclRuleList>
</acl>
415
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
...
<acl>
<parentId>68</parentId>
<aclName>3001</aclName>
<aclNameType>1</aclNameType>
<aclType>3</aclType>
<aclDesc>acl_3001</aclDesc>
<aclRuleList>
<aclRule>
<trName/>
<action>1</action>
<protocol>1</protocol>
<destAddr/>
<sourceAddr>192.168.10.0/255.255.10.10</sourceAddr>
<icmpType>21</icmpType>
<icmpCode>254</icmpCode>
<precedence>5</precedence>
<tos>10</tos>
<dscp>34</dscp>
<fragment>1</fragment>
<logging>1</logging>
<vpnIntance/>
</aclRule>
</aclRuleList>
</acl>
Response
HTTP/1.1 201 Created
Content-Type: application/xml
...
No message body is included.
3. Add an extended ACL with the protocol type being IGMP on the device whose device ID is 68.
Request
POST http://imc_host:8080/imcrs/acl/res/acl
accept: application/xml
...
<acl>
<parentId>68</parentId>
<aclName>3002</aclName>
<aclType>3</aclType>
<aclDesc>acl_3002</aclDesc>
<aclRuleList>
<aclRule>
<trName/>
<action>1</action>
416
ACL Management
<protocol>2</protocol>
<destAddr/>
<sourceAddr>192.168.10.0/255.255.10.10</sourceAddr>
<precedence>5</precedence>
<tos>10</tos>
<dscp>34</dscp>
<hpIgmpType>18</hpIgmpType>
<fragment>1</fragment>
<logging>1</logging>
<vpnIntance/>
</aclRule>
</aclRuleList>
</acl>
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.
Request
POST http://imc_host:8080/imcrs/acl/res/acl
accept: application/xml
...
<acl>
<parentId>68</parentId>
<aclName>3003</aclName>
<aclType>3</aclType>
<aclDesc>acl_3003</aclDesc>
<aclRuleList>
<aclRule>
<trName/>
<action>1</action>
<protocol>6</protocol>
<destAddr/>
<sourceAddr>192.168.10.0/255.255.10.10</sourceAddr>
<sourcePortOper>1</sourcePortOper>
<sourcePort1>55</sourcePort1>
<destPortOper>5</destPortOper>
<destPort1>554</destPort1>
<destPort2>555</destPort2>
<precedence>5</precedence>
<tos>10</tos>
<dscp>34</dscp>
<hpAck>1</hpAck>
<hpFin>0</hpFin>
<hpRst>1</hpRst>
<hpSyn>0</hpSyn>
<fragment>1</fragment>
<logging>1</logging>
<vpnIntance/>
</aclRule>
</aclRuleList>
</acl>
417
Response
HTTP/1.1 201 Created
Content-Type: application/xml
...
No message body is included.
Request
POST http://imc_host:8080/imcrs/acl/res/acl
accept: application/xml
...
<acl>
<parentId>68</parentId>
<aclName>4001</aclName>
<aclType>4</aclType>
<aclDesc>acl_4001</aclDesc>
<aclRuleList>
<aclRule>
<trName/>
<action>1</action>
<sourceMacAddr/>
<destMacAddr/>
<priority>-1</priority>
<formatType>-1</formatType>
<srcVlanId>25</srcVlanId>
<l2ProtocolType>2</l2ProtocolType>
<l2ProtocolCode>12</l2ProtocolCode>
<l2ProtocolMask>12</l2ProtocolMask>
</aclRule>
</aclRuleList>
</acl>
Response
HTTP/1.1 201 Created
Content-Type: application/xml
...
No message body is included.
6. Add a user-defined ACL without rule strings on the device whose device ID is 68.
Request
POST http://imc_host:8080/imcrs/acl/res/acl
accept: application/xml
...
<acl>
<parentId>68</parentId>
<aclName>5001</aclName>
<aclType>5</aclType>
<aclDesc>acl_5001</aclDesc>
<aclRuleList>
<aclRule>
<trName/>
<action>0</action>
<ruleString/>
</aclRule>
</aclRuleList>
</acl>
418
ACL Management
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
...
<acl>
<parentId>68</parentId>
<aclName>5002</aclName>
<aclType>5</aclType>
<aclDesc>acl_5002</aclDesc>
<aclRuleList>
<aclRule>
<trName/>
<action>1</action>
<ruleString>12:12:12#12:12:13#</ruleString>
</aclRule>
</aclRuleList>
</acl>
Response
HTTP/1.1 201 Created
Content-Type: application/xml
...
No message body is included.
419
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
409(Conflict): Failure.
Example
Delete ACL 1389 from a device.
Request
DELETE http://imc_host:8080/imcrs/acl/res/acl/1389
accept: application/xml
...
Response
HTTP/1.1 204 No Content
Content-Type: application/xml
...
No message body is included.
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.
size
total
Returned Result
Status codes
200(OK): Success.
Message header
When the total parameter is true, the Total field gives the total number of matched records. No
message body is included.
HTTP/1.1 200 OK
Total: 7
421
Message body
<list>
<aclUse>
<useId>10</useId>
<parentId>25</parentId>
<parentType>1</parentType>
<useType>1</useType>
<aclName>2222</aclName>
<useContext>Ethernet0/0</useContext>
<useCommand>firewall packet-filter 2222 inbound</useCommand>
<useDesc/>
<useFlag>0</useFlag>
</aclUse>
...
</list>
Elements
ACL application sub-elements
useId
parentId
parentType
useType
aclName
ACL name.
Long integer type.
useContext
useCommand
useDesc
useFlag
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
...
<list>
<aclUse>
<useId>10</useId>
<parentId>25</parentId>
<parentType>1</parentType>
<useType>1</useType>
<aclName>2222</aclName>
<useContext>Ethernet0/0</useContext>
<useCommand>firewall packet-filter 2222 inbound</useCommand>
<useDesc/>
<useFlag>0</useFlag>
</aclUse>
...
<link href="http://imc_host:port/imcrs/acl/res/aclUse/25?start=0&size=3" op="GET" rel="previous"/>
<link href="http://imc_host:port/imcrs/acl/res/aclUse/25?start=6&size=3" op="GET" rel="next"/>
</list>
Interface URI
/acl/res/aclUse
Access Method
HTTP
POST
Message body
POST http://imc_host:8080/imcrs/acl/res/aclUse
accept: application/xml
...
<aclUse>
<parentId>68</parentId>
<useType>1</useType>
<aclName>2001</aclName>
<useContext>Ethernet1/0/4</useContext>
<useDesc/>
<direct>0</direct>
</aclUse>
Elements
ACL application sub-elements
useId
parentId
parentType
useType
aclName
ACL name.
Long integer type.
useContext
useCommand
useDesc
useFlag
Returned Result
Status codes
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
...
<aclUse>
<parentId>68</parentId>
<useType>1</useType>
<aclName>2001</aclName>
<useContext>Ethernet1/0/4</useContext>
<useDesc/>
<direct>0</direct>
</aclUse>
Response
HTTP/1.1 201 Created
Content-Type: application/xml
...
No message body is included.
Interface URI
/acl/res/aclUse/{id}
Access Method
HTTP
DELETE
Parameters
Path parameters
id
Returned Result
Status codes
409(Conflict): Failure.
Message header
Example
Delete ACL application 15 from a device.
Request
DELETE http://imc_host:8080/imcrs/acl/res/aclUse/15
accept: application/xml
...
Response
HTTP/1.1 204 No Content
Content-Type: application/xml
...
No message body is included.
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.
size
Integer type. Optional. The default value is 10. If a value smaller than 0 is input, the default value
10 is used.
total
Returned Result
Status codes
200(OK): Success.
Message header
When the total parameter is true, the Total field gives the total number of matched records. No
message body is included.
HTTP/1.1 200 OK
Total: 7
Message body
<list>
<aclResTimeRange>
<trId>1371</trId>
<parentId>68</parentId>
<parentType>1</parentType>
<trName>1</trName>
<useFlag>0</updateFlag>
<aclChildTimeRanges>http://imc_host:8080/imcrs/acl/res/aclTimeRange/68,1371</aclChildTimeRanges>
</aclResTimeRange>
...
</list>
Elements
ACL time range sub-elements
trId
ACL time range ID, which uniquely identifies an ACL time range.
Long integer type.
parentId
parentType
trName
useFlag
aclChildTimeRange
Example
Query the basic time range information entries 2 through 4 on device whose device ID is 25.
Request
GET http://imc_host:8080/imcrs/acl/res/aclTimeRange/25?start=2&size=2
accept: application/xml
...
Response
HTTP/1.1 200 OK
Content-Type: application/xml
...
<list>
<aclResTimeRange>
<trId>51</trId>
<parentId>25</parentId>
<parentType>1</parentType>
<trName>1</trName>
<useFlag>0</useFlag>
<aclChildTimeRanges>http://imc_host:8080/imcrs/acl/res/aclTimeRange/25,51</aclChildTimeRanges>
</aclResTimeRange>
...
<link href="http://imc_host:8080/imcrs/acl/res/aclTimeRange/25?start=0&size=2" op="GET" rel="previous"/>
<link href="http://imc_host:8080/imcrs/acl/res/aclTimeRange/25?start=4&size=2" op="GET" rel="next"/>
</list>
Interface URI
/acl/res/aclTimeRange
Access Method
HTTP
POST
Message body
POST http://imc_host:8080/imcrs/acl/res/aclTimeRange
accept: application/xml
...
<aclResTimeRange>
<parentId>68</parentId>
<parentType>1</parentType>
<trName>a</trName>
<useFlag>0</useFlag>
<aclResChildTimeRangeList>
<aclResChildTimeRange>
<trChildType>0</trChildType>
<trPerDayofweek/>
<trStartTime>2010-04-06 15:12</trStartTime>
<trEndTime>2010-04-30 15:12</trEndTime>
</aclResChildTimeRange>
</aclResChildTimeRangeList>
</aclResTimeRange>
Elements
ACL time range sub-elements
trId
ACL time range ID, which uniquely identifies an ACL time range.
Long integer type.
parentId
parentType
trName
useFlag
aclChildTimeRange
Returned Result
Status codes
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
...
<aclResTimeRange>
<parentId>68</parentId>
<parentType>1</parentType>
<trName>a</trName>
<useFlag>0</useFlag>
<aclResChildTimeRangeList>
<aclResChildTimeRange>
<trChildType>0</trChildType>
<trPerDayofweek/>
<trStartTime>2010-04-06 15:12</trStartTime>
<trEndTime>2010-04-30 15:12</trEndTime>
</aclResChildTimeRange>
</aclResChildTimeRangeList>
</aclResTimeRange>
Response
HTTP/1.1 201 Created
Content-Type: application/xml
...
No message body is included.
Interface URI
/acl/res/aclTimeRange/{id}
Access Method
HTTP
DELETE
Parameters
Path parameters
id
Returned Result
Status codes
409(Conflict): Failure.
Message header
Example
Delete ACL time range 15 from a device.
Request
DELETE http://imc_host:8080/imcrs/acl/res/acl
TimeRange/15accept: application/xml
...
Response
HTTP/1.1 204 No Content
Content-Type: application/xml
...
No message body is included.
431
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
Returned Result
Status codes
200(OK): Success.
Message header
When the total parameter is true, the Total field gives the total number of matched child time ranges.
No message body is included.
HTTP/1.1 200 OK
Total: 7
Message body
<list>
<aclResChildTimeRange>
<trChildId>244</trChildId>
<aclTimeRangeId>80</aclTimeRangeId>
<trChildType>0</trChildType>
<trPerDayofweek/>
<trStartTime>2010-04-06 15:12</trStartTime>
<trEndTime>2010-04-30 15:12</trEndTime>
</aclResChildTimeRange>
...
</list>
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
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. When trChildType=1, the time type is
periodic.
2. For an absolute time range, the trPerDayofweek field is not required, and the start time and
end time are required. For example, to cover the time range 2011-08-01 08:00 to 2011-08-15
18:00, you must set trStartTime=2011-08-01 08:00 and trEndTime=2011-08-15 18:00.
3. For a periodic time range, set the trPerDayofweek field as follows: Sunday=0, Monday=1,
Tuesday=2, Wennesday=3, Thursday=4, Friday=5, Saturday=6, week=7, weekend=8, and
working days=9;
Example 1: To cover 08:00 to 18:00 of each Tuesday, you must set trPerDayofweek to 2,
trStartTime=08:00, and trEndTime=18:00;
Example 2: To cover 08:00 to 18:00 of working days, you must set trPerDayofweek to 9,
trStartTime=08:00, and trEndTime=18:00;
Example 3: To cover 08:00 to 18:00 on each day of a week, you must set trPerDayofweek
to 7, trStartTime=08:00, and trEndTime=18:00;
Example 4: to periodically cover 08:00 to 18:00 on each Monday, Wednesday, Tuesday,
and Saturday, you must set trPerDayofweek to 1:3:4:6, trStartTime=08:00, and
trEndTime=18:00;
4.
You can input the trStartTime and trEndTime in the format of yyyy-MM-dd HH:mm or HH:mm.
For example, 2011-08-01 08:00.
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
...
<list>
<aclResChildTimeRange>
<trChildId>244</trChildId>
<aclTimeRangeId>80</aclTimeRangeId>
<trChildType>0</trChildType>
<trStartTime>2010-04-06 15:12</trStartTime>
<trEndTime>2010-04-30 15:12</trEndTime>
</aclResChildTimeRange>
...
</list>
Error messages
Detailed questions
Subscription service
HP recommends that you register your product at the Subscriber's Choice for Business website:
http://www.hp.com/go/e-updates
After registering, you receive email notification of product enhancements, new driver versions,
firmware updates, and other product resources.
Warranty
The Hewlett-Packard Limited Warranty Statement for this product and the HP Software License
Terms which apply to any software accompanying this product are available on the HP networking
Web site at www.hp.com/networking/warranty. The customer warranty support and services
information are available on the HP networking Web site at www.hp.com/networking/support.
Additionally, your HP authorized network reseller can provide you with assistance, both with
services that they offer and with services offered by HP.
Documentation
For the latest documentation, visit the HP website, www.hp.com, and select the Support &
Troubleshooting link.
From the product page, choose the Manuals link to the documentation associated with your
product.
Contacting HP 435
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
Website addresses
Bold text
Italic text
Text emphasis
Monospace text
Code variables
Command variables
IMPORTANT:
CAUTION:
NOTE:
TIP:
Documents
Purposes
Product description
and specifications
Marketing brochures
Hardware
specifications and
installation
HP IMC Probe Installation Guide Provides a complete guide to IMP Probe installation and
deployment.
Documents
Purposes
SQL Server 2008 R2 Installation Guides you through installing SQL Server 2008 R2 for IMC.
and Configuration Guide
Oracle 11g Installation and
Configuration Guide (for Linux)
Software
configuration
Operations and
maintenance
Online Help
Read me
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.