• 入门
  • 告警
     
  • 可用性
     
  • 业务视图
     
  • 仪表盘
     
  • 设备
     
  • 发现
  • 企业版
  • 事件
  •  
  • 接口
     
  • 监视器
     
  • 通知
     
  • 报表
     
  • 设置
     
  • 子网
  • 无线
     

OpManager REST API

OpManager 提供用于从 OpManager 添加和获取数据的 REST API。使用这些 API,您可以将 OpManager 与第三方 IT 管理/服务台软件集成。

OpManager REST API 如何工作?

API使用 API密钥。API密钥对于每 OpManager帐户都是唯一的,并且对于所有API请求都是必需的。

生成 API 密钥

要生成 API 密钥,请转到 OpManager Web 客户端中的设置 > REST API 并且点击生成 Key.

告警

列出告警

方法: GET

描述: 列出 OpManager 中生成的所有告警。

示例URL: https://localhost:8060/api/json/alarm/listAlarms?apiKey=***************

参数名称
描述
apiKey*
访问您的 OpManager 服务器的 API 密钥。
deviceName
告警的设备名称
severity
告警的严重性
category
告警的设备类别
period
应列出告警的时间段
entity
具体告警的告警页面url中看到的告警实体, 例: https://localhost:8060/apiclient/ember/index.jsp#/Alarms/Alarm/Details/deviceDown_121212,这里的deviceDown_121212是告警实体
alarmCode
告警的告警代码
eventType
告警事件类型

告警属性

方法: GET

描述: 列出特定告警的告警属性

示例URL: https://localhost:8060/api/json/alarm/alarmProperties?apiKey=***************&entity=entity1_Poll

参数名称
描述
apiKey*
访问您的 OpManager 服务器的 API 密钥。
entity
告警实体
alarmSpecific
Boolean 来说明是否是特定告警。
deviceID
告警的MOID

添加备注

方法: POST

描述: 此 API 用于向告警添加备注

示例URL: https://localhost:8060/api/json/alarm/addNotes?apiKey=***************

参数名称
描述
apiKey*
访问您的 OpManager 服务器的 API 密钥。
entity*
告警实体
notes
待添加的备注说明
type
是否选择了单个或多个告警

确认告警

方法: POST

描述: 此 API 用于确认告警

示例URL: https://localhost:8060/api/json/alarm/acknowledgeAlarm?apiKey=***************

参数名称
描述
apiKey*
访问您的 OpManager 服务器的 API 密钥。
entity*
告警实体
type
是否选择了单个或多个告警

取消确认告警

方法: POST

描述: 此 API 用于取消确认告警

示例URL: https://localhost:8060/api/json/alarm/unAcknowledgeAlarm?apiKey=***************

参数名称
描述
apiKey*
访问您的 OpManager 服务器的 API 密钥。
entity*
告警实体
type
是否选择了单个或多个告警

清除告警

方法: POST

描述: 此 API 用于清除告警。

示例URL: https://localhost:8060/api/json/alarm/clearAlarm?apiKey=***************&entity=coldStart_trap

参数名称
描述
apiKey*
访问您的 OpManager 服务器的 API 密钥。
entity*
指定告警的告警页面url中的告警实体,例如 https://localhost:8060/apiclient/ember/index.jsp#/Alarms/Alarm/Details/deviceDown_121212,这里的deviceDown_121212是告警实体
type
是否选择了单个或多个告警

删除告警

方法: POST

描述: 删除告警API

示例URL: https://localhost:8060/api/json/alarm/deleteAlarm?apiKey=***************&entity=coldStart_trap

参数名称
描述
apiKey*
访问您的 OpManager 服务器的 API 密钥。
entity*
指定告警的告警页面url中的告警实体,例如: https://localhost:8060/apiclient/ember/index.jsp#/Alarms/Alarm/Details/deviceDown_121212,这里的deviceDown_121212是告警实体
type
是否选择了单个或多个告警

按照告警排名靠前的设备

方法: GET

描述: 按照告警排名靠前的设备

示例URL: https://localhost:8060/api/json/alarm/getTopDevicesByAlarms?apiKey=***************

参数名称
描述
apiKey*
访问您的 OpManager 服务器的 API 密钥。
eventType*
告警事件类型

获取注解

方法: GET

描述: 这个API是用来获取告警的注释

示例URL: https://localhost:8060/api/json/alarm/getAnnotation?apiKey=***************

参数名称
描述
apiKey*
访问您的 OpManager 服务器的 API 密钥。
entity*
告警实体

可用性

获取可用性响应

方法: GET

描述: 给定设备的ICMP/Ping 响应。

示例URL: https://localhost:8060/api/json/device/getPingResponse?apiKey=***************&deviceName=192.168.49.4

参数名称
描述
apiKey*
访问您的 OpManager 服务器的 API 密钥。
deviceName*
设备名称 - 在设备快照页面的 URL 或 listDevices API 响应中的“deviceName”属性值中看到的被管实体名称。

获取跟踪响应

方法: GET

描述: 跟踪给定设备的路由命令响应

示例URL: https://localhost:8060/api/json/device/getTraceResponse?apiKey=***************&deviceName=192.168.49.4

参数名称
描述
apiKey*
访问您的OpManager服务器的 API 密钥。
deviceName*
设备名称 - 在设备快照页面的 URL 或 listDevices API 响应中的“deviceName”属性值中看到的被管实体名称。

获取停机设备

方法: GET

描述: 列出当前处于停机状态且设备状态为“危急的”的设备

示例URL: https://localhost:8060/api/json/discovery/getDownDevices?apiKey=******************

参数名称
描述
apiKey*
访问您的 OpManager 服务器的 API 密钥。

获取可用性图表数据

方法: GET

描述: 获取给定设备或接口的可用性图表。

示例URL: https://localhost:8060/api/json/device/getAvailabilityGraphData?apiKey=******************&isFluidic=true&name=opmserver.mydomain.com

参数名称
描述
apiKey*
访问您的 OpManager 服务器的 API 密钥。
name*
设备或接口的名称 - 在设备/接口快照页面的 URL 中看到的被管实体名称或 listDevices API 的“deviceName”属性值或 listInterfaces API 响应中的“interfaceName”属性值 [示例: opmserver.mydomain.com 或 IF-10.10.24.223-115]
instance
如果为接口请求可用性图,则设置 instance=Interface。如果正在获取接口数据,则为必填字段。此 API 还可用于获取其他监视器的可用性。[示例: 接口|URL|windows服务|服务|进程]
isFluidic*
默认情况下将值设置为 TRUE(用于内部目的)

列出停机时间表

方法: GET

描述: 提供在 OpManager 中创建的停机时间表列表。

示例URL: https://localhost:8060/api/json/admin/listDownTimeSchedules?apiKey=****************

参数名称
描述
apiKey*
访问您的OpManager 服务器的 API 密钥。

集合管理

方法: POST

描述: 管理或取消管理当前添加到 OpManager 中的设备、接口或 URL 监视器。

示例URL: https://localhost:8060/api/json/device/setManaged?manage=true&apiKey=***************

参数名称
描述
apiKey*
访问您的 OpManager 服务器的 API 密钥。
manage*
如果 manage=true 则启用对设备或接口的监控,如果 manage=false 则禁用监控
name*
设备或接口的名称。(在设备/接口快照页面的 URL 或 listDevices API 响应中的“deviceName”属性值中看到的被管实体名称)
type
如果被管实体是接口,则将类型设置为“接口”。如果被管实体是 Url 监视器,则将类型设置为“URL”。
isInterface
此参数仅在为type参数。如果被管实体是接口,则将此参数的值设置为“true”。默认情况下,实体将被假定为设备,因此管理设备不需要传递此参数。

业务视图

获取业务视图

方法: GET

描述: 列出在OpManager 中创建的所有业务视图。

示例URL: https://localhost:8060/api/json/businessview/getBusinessView?apiKey=***************

参数名称
描述
apiKey*
访问您的 OpManager 服务器的 API 密钥。

获取业务视图

方法: GET

描述: 列出给定业务视图中的所有可用设备

示例URL: https://localhost:8060/api/json/businessview/getBusinessDetailsView?apiKey=***************&bvName=ProductionSite_bv

参数名称
描述
apiKey*
访问您的 OpManager 服务器的 API 密钥。
bvName*
以“_bv”文本为后缀的业务视图的名称。

仪表板

获取小窗件数据

方法: GET

描述: 此 API用于获取要为给定小窗件ID 加载的数据。

示例URL: https://localhost:8060/api/json/dashboard/getWidgetData?apiKey=***************&widgetID=495

参数名称
描述
apiKey*
访问您的 OpManager 服务器的 API 密钥。
widgetID*
要获取其数据的小窗件 ID。
widgetName
小窗件的名称。
widgetType
小窗件类型。

获取小窗件列表

方法: GET

描述: 此 API 用于列出要为给定仪表板加载的小窗件。

示例URL: https://localhost:8060/api/json/dashboard/getWidgetsList?apiKey=***************&dashboardName=dashboardname

参数名称
描述
apiKey*
访问您的 OpManager 服务器的 API 密钥。
dashboardName*
仪表板的名称。

设备

列出设备

方法: GET

描述: 列出所有添加到 OpManager 中的设备。

示例URL: https://localhost:8060/api/json/device/listDevices?apiKey=****************&

参数名称
描述
apiKey*
访问您的 OpManager 服务器的 API 密钥。
isFluidic
默认情况下将值设置为“true”。(用于内部目的)
type
获取属于给定设备类型的设备列表。 [示例: type=Cisco2081]
category
获取属于给定设备类别的设备列表 [示例:服务器、交换机等]
app
获取包含给定应用程序并在 OpManager 中监控的设备列表 [示例:MSSQL、Exchange、域控制器]
bvName
获取给定业务视图地图名称下的设备列表
vendor
获取具有给定供应商名称的设备列表。
protocol
按协议过滤设备 [示例: all|SNMP|WMI|CLI|VIWebService|VIWMI|CLI|XenService|PrismAPI|NetAppAPI|SMI]
severity
按严重性过滤设备 [示例:1(严重的)、2(有问题的)、3(需要关注的)、4(服务中断)、5(正常)、7(未管理)]
selectedVTypes
按虚拟设备类型过滤设备 [示例: VMware-VM|VMware-Host|HyperV-VM|Xen-VM|VMware-vCenter|Xen-Host|HyperV-Host]
groupName
按组名过滤设备
customFields
获取与设备关联的自定义字段值。如果您使用适用于 12.x 以上 OpManager 版本的 v2 API,请设置为“true”。[示例: /api/json/v2/device/listDevices]
getInterfaces
获取具有关联接口的设备。布尔值: TRUE/FALSE
page
批量获取设备。这应该与 'rows' 参数结合使用。 [示例: page=1, rows=200, page=2, rows=200]
rows
批量获取设备。这应该与 'page' 参数结合使用 [示例: page=1, rows=200, page=2, rows=200]
sortByType
将排序类型定义为升序或降序  [示例, sortByType=asc Or sortByType=desc]
sortByColumn
按列对设备列表进行排序 [示例: displayName, interfaceCount, ipaddress, type, etc.]

获取设备备注

方法: GET

描述: 提供与给定设备相关的自定义字段值,例如建筑物、机柜、序列号等。

示例URL: https://localhost:8060/api/json/device/getDeviceNotes?apiKey=***************&name=192.168.49.1

参数名称
描述
apiKey*
访问您的 OpManager 服务器的 API 密钥。
name*
设备名称 - 在设备快照页面的 URL 中看到的被管实体名称或 listDevices API 响应中的“deviceName”属性值。

获取基础设施详情视图

方法: GET

描述: 提供设备的类别详细信息,例如设备名称、设备显示名称、状态、IP 地址、设备类型和相关的性能监视器值。

示例URL: https://localhost:8060/api/json/discovery/getInfrastructureDetailsView?apiKey=**************&categoryName=Server

参数名称
描述
apiKey*
访问您的 OpManager 服务器的 API 密钥。
categoryName*
设备类别的名称。 [示例: Server, Desktop, etc]

获取设备摘要

方法: GET

描述: 提供设备快照页面中的设备详细信息

示例URL: https://localhost:8060/api/json/device/getDeviceSummary?apiKey=**************&name=opmserver.testdomain.com

参数名称
描述
apiKey*
访问您的 OpManager 服务器的 API 密钥。
name*
设备名称 - 在设备快照页面的 URL 或 listDevices API 响应中的“deviceName”属性值中看到的被管实体名称。
isFluidic
默认情况下将值设置为 TRUE。(用于内部目的)
snapType
设备快照的类型。如果仅在 OpManager 中监控设备,则将值设置为“MonitoringDevice”。如果为此设备启用了flow监控,请将值设置为“flow设备”
RouterID
如果 snapType 设置为“FlowDevice”,则为设备的路由器 ID。

虚拟设备

列出虚拟设备

方法: GET

描述: 列出所选虚拟类型的所有实体。

示例URL: https://localhost:8060/api/json/device/listVirtualDevices?apiKey=***************&virtualDeviceType=VM

参数名称
描述
apiKey*
访问您的 OpManager 服务器的 API 密钥。
virtualDeviceType*
您要列出的虚拟实体的类型。(允许的值: VHOST, VDATASTORE, VM, VCENTER, HyperV-Host, HyperV-VM, HyperV-Disk, Xen-Host, Xen-VM, Xen-SR, Xen-Pool, Nutanix-Cluster, Nutanix-Host, Nutanix-VM)

获取设备全部详细信息

方法: GET

描述: 列出设备的基本详细信息和可用性

示例URL: https://localhost:8060/api/json/v2/device/getDeviceCompleteDetails?apiKey=***************&name=devicename

参数名称
描述
apiKey*
访问您的 OpManager 服务器的 API 密钥。
name*
设备名称

发现

添加设备

方法: POST

描述: 允许您将单个设备添加到 OpManager 以进行监控。

示例URL: https://localhost:8060/api/json/discovery/addDevice?apiKey=***************&name=opmserver.mydomain.com

参数名称
描述
apiKey*
访问您的 OpManager 服务器的 API 密钥。
deviceName*
设备的主机名、FQDN 名称或 IP 地址
credentialName
用于访问设备以获取设备信息的凭据名称。

企业版

列出探针

方法: GET

描述: 这个 API 是为了列出所有的探针

示例URL: https://localhost:8060/api/json/admin/listProbes?apiKey=***************

参数名称
描述
apiKey*
访问您的 OpManager 服务器的 API 密钥。

事件

列出事件

方法: GET

描述: 列出事件历史。

示例URL: https://localhost:8060/api/json/events/listEvents?apiKey=***************&deviceName=opmrouter

参数名称
描述
apiKey*
访问您的 OpManager 服务器的 API 密钥。
deviceName
要为其列出事件的设备名称
entity
事件实体
period
应列出事件的时间段
severity
告警的严重性
category
告警的设备类别
eventType
告警事件类型

列出所有逻辑组

方法: GET

描述: 列出 OpManager 中所有可用的组。还提供基本的组信息,例如成员计数和组健康状况。

示例URL: https://localhost:8060/api/json/admin/listAllLogicalGroups?apiKey=***************

参数名称
描述
apiKey*
访问您的 OpManager 服务器的 API 密钥。

获取逻辑组信息

方法: GET

描述: 提供给定组的详细信息(例如成员计数、组状态等)。

示例URL: https://localhost:8060/api/json/admin/getLogicalGroupInfo?apiKey=***************&groupName=NorthBayRegion-4201&period=3&snapType=LogicalDeviceGroup

参数名称
描述
apiKey*
访问您的 OpManager 服务器的 API 密钥。
groupName*
在后缀中附加 MOID 的组名称。如 -
period
获取可用性数据的时间。[示例: 十二小时(16),今天(6),昨天(7),本周(8),最近7天(4),上周(9),本月(10),最近30天(5),上个月( 11),自定义(23)]
snapType
组快照类型。[示例: 逻辑组|逻辑接口组|逻辑设备组]

获取逻辑组告警

方法: GET

描述: 获取从给定组的成员(设备/接口)生成的告警。

示例URL: https://localhost:8060/api/json/admin/getLogicalGroupAlerts?apiKey=***************&groupName=bvgcty-4201

参数名称
描述
apiKey*
访问您的 OpManager 服务器的 API 密钥。
groupName
提供与给定设备相关的自定义字段值,例如建筑物、机柜、序列号等。

列出逻辑组成员

方法: GET

描述: 提供有关给定组中可用成员的信息。

示例URL: https://localhost:8060/api/json/admin/listLogicalGroupMembers?apiKey=***************&groupName=NorthBayRegion-4201

参数名称
描述
apiKey*
访问您的 OpManager 服务器的 API 密钥。
groupName
后缀为“-”的设备/接口组的名称 '。 '. [示例: - ]

添加到组

方法: POST

描述: 允许您将设备添加到指定的组。

示例URL: https://localhost:8060/api/json/device/addToGroup?apiKey=***************&groupType=device&selectedMembers=10.1.1.20,opmserver

参数名称
描述
apiKey*
访问您的 OpManager 服务器的 API 密钥。
groupName*
后缀带有 MOID 的设备/接口组的名称。 [示例: - ]
groupType*
Type of the group [示例: device|interface]
selectedMembers*
以逗号分隔的字符串形式提供的设备名称。设备名称是在设备快照页面 URL 或 listDevices API 响应的“deviceName”属性中看到的被管实体名称

接口

列出接口

方法: GET

描述: 列出 OpManager 中监控的所有接口

示例URL: https://localhost:8060/api/json/device/listInterfaces?apiKey=***************&isFluidic=true&rows=100&page=1&sortByColumn=statusNum&sortByType=desc

参数名称
描述
apiKey*
访问您的 OpManager 服务器的 API 密钥。
isFluidic
默认情况下将值设置为“true”(用于内部目的)
rows
批量获取接口列表。这应该与 'page' 参数结合使用[示例: page=1, rows=200, page=2, rows=200]
page
批量获取接口列表。这应该与 'rows' 参数结合使用[示例: page=1, rows=200, page=2, rows=200]
sortByColumn
使用列对接口列表进行排序 [示例: inSpeed, displayName, ipaddress, outSpeed, statusNum, severity -[示例:1(严重的)、2(有问题的)、3(需要关注的)、4(服务中断)、5(正常)、7(未管理)]]
sortByType
定义接口列表的升序或降序排序[Example, sortByType=asc Or sortByType=desc]
severity
过滤接口的严重性。 [示例:1(严重的)、2(有问题的)、3(需要关注的)、4(服务中断)、5(正常)、7(未管理)]]
type
带接口类型的过滤器接口。 [示例: Ethernet,Software Loopback, etc]
intfProps
获取其他接口属性,例如 ifName(接口 ifName)、moid(用于接口/设备的内部被管对象标识符)、物理地址

获取接口汇总

方法: GET

描述: 供接口的基本细节,如ifIndex、ifName、ifDesc、ifAlias、父设备、Rx/Tx Traffic等。

示例URL: https://localhost:8060/api/json/device/getInterfaceSummary?apiKey=***************&interfaceName=IF-172.24.146.225-4429

参数名称
描述
apiKey*
访问您的 OpManager 服务器的 API 密钥。
interfaceName*
在接口快照页面的 URL 中看到的接口的 ManagedObject 名称。

获取一览报表接口详情

方法: GET

描述: 为给定的接口提供整合的可用性和性能监控健康报表数据。

示例URL: https://localhost:8060/api/json/v2/device/getIntfAtAGlanceReportDetails?apiKey=***************&InterfaceName=IF-192.168.49.4-3820&period=Today

参数名称
描述
apiKey*
访问您的 OpManager 服务器的 API 密钥。
InterfaceName*
接口名称 - 在接口快照页面的 URL 中看到的被管实体名称或 listInterfaces API 响应中的“interfaceName”属性值。
period*
需要接口数据的时间段。 [示例: 十二小时,今天,昨天,本周,最近7天,上周,本月,最近30天,上个月,自定义]
startDate
起始时间。 仅当在时间段参数值中选择了“自定义”时间时,此参数才适用
endDate
截止时间。 仅当在时间段参数值中选择了“自定义”时间时,此参数才适用

获取接口中断报表详情

方法: GET

描述: 为给定接口的合并带宽报表(Rx/Tx 流量)提供数据。

示例URL: https://localhost:8060/api/json/v2/device/getIntfBWOutageReportDetails?apiKey=***************&interfaceName=IF-192.168.49.4-3836&period=Today

参数名称
描述
apiKey*
访问您的 OpManager 服务器的 API 密钥。
interfaceName*
接口名称 - 在接口快照页面的 URL 中看到的被管实体名称或 listInterfaces API 响应中的“interfaceName”属性值
period*
需要接口图的时间段。 [示例: 十二小时,今天,昨天,本周,最近7天,上周,本月,最近30天,上个月,自定义]
startDate
起始时间时间。 仅当在时间段参数值中选择了“自定义”时间时,此参数才适用
endDate
截止时间。 仅当在时间段参数值中选择了“自定义”时间时,此参数才适用

获取接口

方法: GET

描述: 提供设备中监控的接口列表。

示例URL: https://localhost:8060/api/json/device/getInterfaces?apiKey=***************&name=opmserver.testdomain.com

参数名称
描述
apiKey*
访问您的 OpManager 服务器的 API 密钥。
name*
父设备的名称 - 在设备快照页面的 URL 或 listDevices API 响应中的“deviceName”属性值中看到的父设备的被管实体名称e

获取接口注释

方法: GET

描述: 获取与给定接口关联的自定义字段值。

示例URL: https://opmserver:8060/api/json/device/getInterfaceNotes?apiKey=************&interfaceName=IF-opmserver.testdomain.com-4505

参数名称
描述
apiKey*
访问您的 OpManager 服务器的 API 密钥。
interfaceName*
接口名称 - 在接口快照页面的 URL 中看到的被管实体名称或 listInterfaces API 响应中的“interfaceName”属性值

获取接口图表

方法: GET

描述: 获取给定接口的收集数据(例如流量、错包和丢包等)。

示例URL: https://localhost:8060/api/json/device/getInterfaceGraphs?apiKey=***************&interfaceName=IF-192.168.49.106-329&graphName=rxutilization

参数名称
描述
apiKey*
访问您的 OpManager 服务器的 API 密钥。
interfaceName*
接口名称 - 在接口快照页面的 URL 中看到的被管实体名称或 listInterfaces API 响应中的“interfaceName”属性值
graphName
接口图名称[示例: 全部包|流量|利用率|错包|丢包|包|错包速度]
isFluidic
默认设置为“true”(用于内部目的)
period
需要接口图的时间段。 [示例: 十二小时,今天,昨天,本周,最近7天,上周,本月,最近30天,上个月,自定义]
startDate
起始时间。 仅当在时间段参数值中选择了“自定义”时间时,此参数才适用
endDate
截止时间。 仅当在时间段参数值中选择了“自定义”时间时,此参数才适用

监视器

获取设备关联监视器

方法: GET

描述: 列出与设备关联的所有监视器

示例URL: https://localhost:8060/api/json/device/getDeviceAssociatedMonitors?apiKey=***************&name=devicename

参数名称
描述
apiKey*
访问您的 OpManager 服务器的 API 密钥。
name*
设备名称

性能监视器

获取性能监视器

方法: GET

描述: 列出特定设备的所有可用性能监视器(基于设备的类别和类型)

示例URL: https://localhost:8060/api/json/device/getPerformanceMonitors?apiKey=***************&deviceName=devicename&category=Desktop&type=Windows 2008 R2

参数名称
描述
apiKey*
访问您的 OpManager 服务器的 API 密钥。
deviceName*
设备名称
category*
设备类别
type*
设备类型

获取性能监视器详细信息

方法: GET

描述: 列出来自特定设备的关联性能监视器的详细信息

示例URL: https://localhost:8060/api/json/device/getPerformanceMonitorDetails?apiKey=***************&name=devicename&policyName=WMI-CPUUtilization&graphName=WMI-CPUUtilization&checkNumeric=true

参数名称
描述
注释
apiKey*
访问您的 OpManager 服务器的 API 密钥。
-
name*
设备名称
-
policyName*
性能监视器的策略名称
-
graphName*
性能监视器的图形名称。
可以从getDeviceAssociatedMonitors API获取“policyName”和“graphName”值
checkNumeric*
true (或者) false。
-

添加性能监视器

方法: POST

描述: 向设备添加一个新的性能监视器(或多个性能监视器)

示例URL: https://localhost:8060/api/json/device/addPerformanceMonitors?apiKey=***************&name=devicename&selectedMonitors=1166,3337,304,204,205,203,3327

参数名称
描述
注释
apiKey*
访问您的 OpManager 服务器的 API 密钥。
-
name*
设备名称
-
selectedMonitors*
要添加的性能监视器的 GraphID(多个值以逗号分隔)。
GraphID 值可以从getPerformanceMonitors API获得

删除性能监视器

方法: POST

描述: 从设备中删除性能监视器

示例URL: https://localhost:8060/api/json/device/deletePerformanceMonitors?apiKey=***************&name=devicename&pollId=332,213

参数名称
描述
注释
apiKey*
访问您的 OpManager 服务器的 API 密钥。
-
name*
设备名称
-
pollId*
性能监视器的 pollId(多个值以逗号分隔)。
pollId 值可以从getDeviceAssociatedMonitors API获得

测试监视器

方法: POST

描述: 在特定设备中测试性能监视器

示例URL: https://localhost:8060/api/json/device/TestMonitor?apiKey=***************&name=devicename&policyName=WMI-MemoryUtilization&graphName=WMI-MemoryUtilization

参数名称
描述
注释
apiKey*
访问您的 OpManager 服务器的 API 密钥。
-
name*
设备名称
-
policyName*
监视器的策略名称
-
graphName*
监视器的图表名称。
可以从getDeviceAssociatedMonitors API获取
instanceName
实例名称(仅适用于 MSSQL 监视器)。
-

进程监视器

获取关联的进程监视器

方法: GET

描述: 获取与设备关联的进程监视器列表

示例URL: https://localhost:8060/api/json/device/getAssociatedProcessMonitors?apiKey=***************&deviceName=devicename

参数名称
描述
apiKey*
访问您的 OpManager 服务器的 API 密钥。
deviceName*
设备名称

关联进程监视器

方法: POST

描述: 关联进程监视器到设备

示例URL: https://localhost:8060/api/json/device/associateProcessMonitor?apiKey=***************&deviceName=devicename&processId=408,8,68&protocol=WMI

参数名称
描述
注释
apiKey*
访问您的 OpManager 服务器的 API 密钥。
-
deviceName*
设备名称。
-
processId*
需要关联的进程ID
processId 值可以从getAssociatedProcessMonitors API获得

获取关联的服务监视器

方法: GET

描述: 获取与设备关联的服务监视器列表

示例URL: https://localhost:8060/api/json/device/getAssociatedServiceMonitors?apiKey=***************&name=devicename

参数名称
描述
apiKey*
访问您的 OpManager 服务器的 API 密钥。
name*
设备名称

关联服务监视器

方法: POST

描述: 关联服务监视器到设备

示例URL: https://localhost:8060/api/json/admin/associateServiceMonitor?apiKey=***************&deviceName=devicename&serviceName=DNS,FTP,Echo

参数名称
描述
apiKey*
访问您的 OpManager 服务器的 API 密钥。
deviceName*
要关联服务的设备的名称。以逗号分隔的名称提供批量关联
serviceName*
服务名称(多个值以逗号分隔)。

Windows 服务监视器

获取设备关联的 Windows 服务监视器

方法: GET

描述: 列出设备的关联 Windows 服务监视器

示例URL: https://localhost:8060/api/json/device/getDeviceAssociatedWindowsServiceMonitors?apiKey=***************&name=devicename

参数名称
描述
apiKey*
访问您的 OpManager 服务器的 API 密钥。
name*
设备名称

URL 监视器

列出URL监视器

方法: GET

描述: 列出 OpManager 中所有可用的全局 URL 监视器

示例URL: https://localhost:8060/api/json/admin/listURLMonitors?apiKey=***************

参数名称
描述
apiKey*
访问您的 OpManager 服务器的 API 密钥。

脚本监视器

列出脚本监视器

方法: GET

描述: 列出 OpManager 中所有可用的脚本模板

示例URL: https://localhost:8060/api/json/admin/listScriptMonitors?apiKey=***************

参数名称
描述
apiKey*
访问您的 OpManager 服务器的 API 密钥。

通知

列出通知配置文件

方法: GET

描述: 此 API 用于列出在 OpManager 中创建的所有通知配置文件。

示例URL: https://localhost:8060/api/json/admin/listNotificationProfiles?apiKey=***************&isGlobal=true&profileFilter=All&deviceName=devicename

参数名称
描述
apiKey*
访问您的 OpManager 服务器的 API 密钥。
isGlobal
false - 用于设备特定的配置文件过滤器。
profileFilter
全部 - 对于全局配置文件和其他类型的配置文件(发送+电子邮件、发送+短信、发送+调制解调器+短信、运行+系统+命令等)
deviceName
要关联的设备名称。

关联通知配置文件

方法: POST

描述: 此 API 用于将通知配置文件关联到设备。

示例URL: https://localhost:8060/api/json/admin/associateNotificationProfiles?apiKey=***************&deviceName=devicename&profiles=501

参数名称
描述
apiKey*
访问您的 OpManager 服务器的 API 密钥
deviceName*
要关联的设备名称
profiles*
要关联的配置文件的 ProfileID。

报表

报表

方法: GET

描述: 这个 API 是为了列出所有的报表

示例URL: https://localhost:8060/api/json/reports/getReportsList?apiKey=***************&isFavouriteNeeded=true&hideintegratedReports=true&hideHardwareReport=true

参数名称
描述
apiKey*
访问您的 OpManager 服务器的 API 密钥。
isFavouriteNeeded
布尔值显示是否为收藏报表
hideintegratedReports
布尔值显示是否为集成报表
hideHardwareReport
布尔值显示是否为硬件报表

获取报表数据

方法: GET

描述: 获取所需报表数据的 API。

示例URL: https://localhost:8060/api/json/reports/getReportsData?apiKey=***************&reportID=84&isExcludeDays=true&excludedDays=Monday,Tuesday&category=Desktop&bview=All&time=Last_Month&timeWindow=8-20&isBusinessHour=false&showType=0&top=1000&viewAs=json

参数名称
描述
apiKey*
访问您的 OpManager 服务器的 API 密钥。
reportID
单个报表的唯一 ID。
viewAs
查看生成的报表数据的格式。
time
获取报表数据的时间段。
isExcludeDays
布尔值确认是否排除天数。
excludedDays
要在报表数据中排除的日期。
category
查看报表数据的类别。
logicalGroup
查看报表数据的逻辑组。
bview
业务视图查看报表数据。
timeWindow
获取报表数据的时间窗口。
showType
显示报表数据的顶部或底部内容。
top
显示报表数据的顶部。
startTime
自定义时间段的开始时间。
endTime
自定义时间段的结束时间。
startHour
自定义时间段的开始小时。
endHour
自定义时间段的结束小时。
customerId
要过滤的探针ID。
customerName
要过滤的探针名称。
fromEmailid
要发送的报表的发件邮件 ID。
toEmailid
要发送报表的收件邮件 ID。
emailSubject
邮件主题。
isBusinessHour
布尔值显示是否工作时间数据。
businessRuleID
之前创建的业务规则的 ID。

列出业务规则

方法: GET

描述: 这个 api 可用于列出所有创建的工作时间规则。

示例URL: https://localhost:8060//api/json/admin/listBusinessRules?apiKey=***************

参数名称
描述
apiKey*
访问您的 OpManager 服务器的 API 密钥。

添加业务规则

方法: POST

描述: 该api用于配置周一到周日的工作时间规则。

示例URL: https://localhost:8060/api/json/admin/addBusinessRules?apiKey=***************&businessRuleName=Rule1&description=Indian standard time shift 1.&timeSettings={"monday":"1-5","tuesday":"3-6","wednesday":"3-5","thursday":"2-5","friday":"5-13"}

参数名称
描述
apiKey*
访问您的 OpManager 服务器的 API 密钥。
description
业务规则的描述。
businessRuleName
工作时间规则的名称。
timeSettings
时间配置为周一至周日。

删除业务规则

方法: POST

描述: 这个api是删除已经创建的工作时间规则。

示例URL: https://localhost:8060//api/json/admin/deleteBusinessRules?apiKey=***************&businessRuleId=1

参数名称
描述
apiKey*
访问您的 OpManager 服务器的 API 密钥。
businessRuleId
工作时间规则的 ID。

查看业务规则

方法: GET

描述: 这个api是查看已经创建的工作时间规则。

示例URL: https://localhost:8060//api/json/admin/viewBusinessRules?apiKey=***************&businessRuleId=1

参数名称
描述
apiKey*
访问您的 OpManager 服务器的 API 密钥。
businessRuleId
工作时间规则的 ID。

更新业务规则

方法: POST

描述: 这个api用于更新配置的工作时间规则从周一到周日。

示例URL: https://localhost:8060/api/json/admin/updateBusinessRules?apiKey=***************&businessRuleName=Rule1&description=Indian standard time shift 1.&timeSettings={"monday":"1-5","tuesday":"3-6","wednesday":"3-5","thursday":"2-5","friday":"5-13"}&businessRuleId=1

参数名称
描述
apiKey*
访问您的 OpManager 服务器的 API 密钥。
description
业务规则的描述。
businessRuleName
工作时间规则的名称。
timeSettings
时间配置周一至周日。
businessRuleId
工作时间规则的 ID。

获取报表数据

方法: POST

描述: 用于获取报表生成器报表数据的 API。

示例URL: https://localhost:8060//api/json/admin/getReportData?apiKey=***************&deviceList=moname1,moname2&monitorList=DevicesAvailability,ResponseTime,WMI-CPUUtilization,MSSQLDataFilesSizeKB&timePeriod=Last_Month&view=table&timeWindow=0-24&startDate=2020-11-09&endDate=2020-11-18-18

参数名称
描述
apiKey*
访问您的 OpManager 服务器的 API 密钥。
deviceList
获取报表数据的设备列表。
monitorList
监控列表以获取报表数据。
timePeriod
获取报表数据的时间段。
view
以表格/图形格式查看报表。
tableView
以实例/监视器方式显示报表数据。
combinedTable
显示组合表结果的布尔值。
startDate
报表数据的开始日期。
endDate
报表数据的结束日期。
startHour
报表数据的开始时间。
endHour
报表数据的结束时间。
timeWindow
获取报表数据的时间窗口。

列出所有高级报表

方法: GET

描述: 这个 api 可用于获取所有创建的高级报表。

示例URL: https://localhost:8060//api/json/admin/listAllAdvancedReports?apiKey=***************

参数名称
描述
apiKey*
访问您的 OpManager 服务器的 API 密钥。

设置

获取类别列表

方法: POST

描述: 列出所有可用的设备类别

示例URL: https://localhost:8060/api/json/device/getCategoryList?apiKey=***************

参数名称
描述
apiKey*
访问您的 OpManager 服务器的 API 密钥。

子网

列出子网

方法: GET

描述: 列出 OpManager 中监控的所有子网

示例URL: https://localhost:8060/api/json/device/listSubnets?apiKey=***************

参数名称
描述
apiKey*
访问您的 OpManager 服务器的 API 密钥。

无线

获取无线网络详细信息

方法: GET

描述: 列出无线 LAN 控制器中每个 SSID 的接入点、客户端数量和网络使用情况

示例URL: https://localhost:8060/api/json/wireless/getWirelessNetworkDetails?apiKey=***************&deviceName=CiscoWirelessController

参数名称
描述
apiKey*
访问您的 OpManager 服务器的 API 密钥。
deviceName*
WLC 设备的名称(在设备快照页面的 URL 或 listDevices API 响应中的“deviceName”属性值中看到的被管实体名称)

获取无线AP列表

方法: GET

描述: 列出 WLC 设备中的所有接入点。

示例URL: https://localhost:8060/api/json/wireless/getWirelessAPList?apiKey=***************&deviceName=CiscoWirelessController

参数名称
描述
apiKey*
访问您的 OpManager 服务器的 API 密钥。
deviceName*
WLC 设备的名称(在设备快照页面的 URL 或 listDevices API 响应中的“deviceName”属性值中看到的被管实体名称)

获取SSID客户端列表

方法: GET

描述: 列出与给定 WLC设备关联的所有 SSID客户端。

示例URL: https://localhost:8060/api/json/wireless/getSSIDClientList?apiKey=***************&deviceName=CiscoWirelessController

参数名称
描述
apiKey*
访问您的 OpManager 服务器的 API 密钥。
deviceName*
WLC 设备的名称(在设备快照页面的 URL 或 listDevices API 响应中的“deviceName”属性值中看到的被管实体名称)

获取客户端详细信息

方法: GET

描述: 获取连接到 WLC 设备给定 SSID 的客户端设备。

示例URL: https://localhost:8060/api/json/wireless/getClientDetails?apiKey=***************&deviceName=CiscoWirelessController&ssidName=WorkstationNetwork

参数名称
描述
apiKey*
访问您的 OpManager 服务器的 API 密钥。
deviceName*
WLC 设备的名称(在设备快照页面的 URL 或 listDevices API 响应中的“deviceName”属性值中看到的被管实体名称)
ssidName*
与 WLC 关联的无线网络的 SSID 名称