使用管理 REST API 显示与资源统计信息收集相关的属性

您可以使用 IBM® App Connect Enterprise 管理 REST API 来显示与集成服务器上资源统计信息收集相关的属性。

准备工作

请参阅下列主题:

过程

使用以下 REST API 方法之一查询集成服务器的资源统计信息属性。

  • 对于独立集成服务器:
    GET http://hostname:port/apiv2/statistics/resource-stats

    例如,使用以下 curl 命令:

    curl -X GET http://hostname:port/apiv2/statistics/resource-stats
    如果命令成功,那么将返回 HTTP 状态码 200 和类似如下的响应:
    {
      "hasChildren": false,
      "name": "resource-stats",
      "type": "resourceStats",
      "uri": "/apiv2/statistics/resource-stats",
      "properties": {
        "name": "Resource",
        "outputFormat": "inherit",
        "reportingOn": true,
        "type": "Resource"
      },
      "descriptiveProperties": {},
      "active": {
        "reportingOn": true
      },
      "actions": {
        "unavailable": {
          "start-collection": "/apiv2/statistics/resource-stats/start-collection"
        },
        "available": {
          "stop-collection": "/apiv2/statistics/resource-stats/stop-collection"
        }
      },
      "children": {},
      "links": []
    }
    
  • 对于由集成节点管理的集成服务器:
    GET http://hostname:port/apiv2/servers/integrationServerName/statistics/resource-stats

    例如,要显示集成节点所管理的集成服务器 ACESERV1 上的资源统计信息属性,请运行以下 curl 命令:

    curl -X GET http://hostname:port/apiv2/servers/ACESERV1/statistics/resource-stats
    如果命令成功,那么将返回 HTTP 状态码 200 和类似如下的响应:
    {
      "hasChildren": false,
      "name": "resource-stats",
      "type": "resourceStats",
      "uri": "/apiv2/servers/ACESERV1/statistics/resource-stats",
      "properties": {
        "name": "Resource",
        "outputFormat": "inherit",
        "reportingOn": true,
        "type": "Resource"
      },
      "descriptiveProperties": {},
      "active": {
        "reportingOn": true
      },
      "actions": {
        "unavailable": {
          "start-collection": "/apiv2/servers/ACESERV1/statistics/resource-stats/start-collection"
        },
        "available": {
          "stop-collection": "/apiv2/servers/ACESERV1/statistics/resource-stats/stop-collection"
        }
      },
      "children": {},
      "links": []
    }