See the following example for retrieving the previous 2 minutes of data for a an edge gateway by displaying 1 record per page. The example returns two pages of data.

For the complete list of metrics, see Edge Gateway Metrics.

Note

To retrieve edge gateway metrics, the edge gateway must be upgraded to use Advanced Networking Services. You can verify that the gateway is upgraded by checking the gateway query results for the element:

<EdgeGatewayRecord advancedNetworkingEnabled="true" ... "/>

See Query the vCloud API for IDs for the information about querying vCloud Director for gateway details.

Request Header 1 – Retrieve the First Page of Metrics

POST https://us-california-1-3.vchs.vchs.vmware.com/hybridity/api/metrics/gateways/c872d1b0-40fb-46cc-aa81-725c22bb099d?count=1
Accept: application/json
Content-Type: application/json
X-Vcloud-Authorization: "d6eFLOqQYfuEn2MJTp7BQ2ISEO+ZYaEgTcqBy8wZQ6js="

Request Body 1 – Specify the Collection Interval

"relativeStartTime":{"interval":2,"unit":"MINUTE"},"relativeEndTime":{"interval":0,"unit":"MINUTE"

Response Body 1

{
  "count": 2,
  "rows": [
    {
      "entityId": "c872d1b0-40fb-46cc-aa81-725c22bb099d",
      "interval": "2",
      "timestamp": 1456267200,
      "vdc": "0b75613c-c0ed-4d5a-b3bb-9ad62e8e1e1c",
      "metrics": [
        {
          "name": "interface.packetsIn.average.CloudExtNet",
          "value": "0.250065294"
        },
        {
          "name": "interface.packetsOut.average.CloudExtNet",
          "value": "0.0"
        },
        {
          "name": "interface.bytesIn.average.CloudExtNet",
          "value": "0.109928871"
        },
        {
          "name": "interface.bytesOut.average.CloudExtNet",
          "value": "0.0"
        },
        {
          "name": "interface.packetsIn.average.RoutedOrgvdcNetwork",
          "value": "0.0"
        },
        {
          "name": "interface.packetsOut.average.RoutedOrgvdcNetwork",
          "value": "0.0"
        },
        {
          "name": "interface.bytesIn.average.RoutedOrgvdcNetwork",
          "value": "0.0"
        },
        {
          "name": "interface.bytesOut.average.RoutedOrgvdcNetwork",
          "value": "0.0"
        },
        {
          "name": "interface.packetsIn.average.vnic2",
          "value": "0.0"
        },
        {
          "name": "interface.packetsOut.average.vnic2",
          "value": "0.0"
        },
        {
          "name": "interface.bytesIn.average.vnic2",
          "value": "0.0"
        },
        {
          "name": "interface.bytesOut.average.vnic2",
          "value": "0.0"
        },
        {
          "name": "interface.packetsIn.average.vnic3",
          "value": "0.0"
        },
        {
          "name": "interface.packetsOut.average.vnic3",
          "value": "0.0"
        },
        {
          "name": "interface.bytesIn.average.vnic3",
          "value": "0.0"
        },
        {
          "name": "interface.bytesOut.average.vnic3",
          "value": "0.0"
        },
        {
          "name": "interface.packetsIn.average.vnic4",
          "value": "0.0"
        },
        {
          "name": "interface.packetsOut.average.vnic4",
          "value": "0.0"
        },
        {
          "name": "interface.bytesIn.average.vnic4",
          "value": "0.0"
        },
        {
          "name": "interface.bytesOut.average.vnic4",
          "value": "0.0"
        },
        {
          "name": "interface.packetsIn.average.vnic5",
          "value": "0.0"
        },
        {
          "name": "interface.packetsOut.average.vnic5",
          "value": "0.0"
        },
        {
          "name": "interface.bytesIn.average.vnic5",
          "value": "0.0"
        },
        {
          "name": "interface.bytesOut.average.vnic5",
          "value": "0.0"
        },
        {
          "name": "interface.packetsIn.average.vnic6",
          "value": "0.0"
        },
        {
          "name": "interface.packetsOut.average.vnic6",
          "value": "0.0"
        },
        {
          "name": "interface.bytesIn.average.vnic6",
          "value": "0.0"
        },
        {
          "name": "interface.bytesOut.average.vnic6",
          "value": "0.0"
        },
        {
          "name": "interface.packetsIn.average.vnic7",
          "value": "0.0"
        },
        {
          "name": "interface.packetsOut.average.vnic7",
          "value": "0.0"
        },
        {
          "name": "interface.bytesIn.average.vnic7",
          "value": "0.0"
        },
        {
          "name": "interface.bytesOut.average.vnic7",
          "value": "0.0"
        },
        {
          "name": "interface.packetsIn.average.vnic8",
          "value": "0.0"
        },
        {
          "name": "interface.packetsOut.average.vnic8",
          "value": "0.0"
        },
        {
          "name": "interface.bytesIn.average.vnic8",
          "value": "0.0"
        },
        {
          "name": "interface.bytesOut.average.vnic8",
          "value": "0.0"
        },
        {
          "name": "interface.packetsIn.average.vnic9",
          "value": "0.0"
        },
        {
          "name": "interface.packetsOut.average.vnic9",
          "value": "0.0"
        },
        {
          "name": "interface.bytesIn.average.vnic9",
          "value": "0.0"
        },
        {
          "name": "interface.bytesOut.average.vnic9",
          "value": "0.0"
        },
        {
          "name": "loadbalancer.lbSessions.roundup_average",
          "value": "0.0"
        },
        {
          "name": "loadbalancer.lbHttpReqs.roundup_average",
          "value": "0.0"
        },
        {
          "name": "loadbalancer.lbBpsIn.average",
          "value": "0.0"
        },
        {
          "name": "loadbalancer.lbBpsOut.average",
          "value": "0.0"
        },
        {
          "name": "sslvpn.bytesOut.average",
          "value": "0.0"
        },
        {
          "name": "sslvpn.bytesIn.average",
          "value": "0.0"
        },
        {
          "name": "sslvpn.activeClientCount.roundup_average",
          "value": "0.0"
        },
        {
          "name": "sslvpn.authFailureCount.roundup_average",
          "value": "0.0"
        },
        {
          "name": "sslvpn.sessionsCreatedCount.roundup_average",
          "value": "0.0"
        },
        {
          "name": "ipsec.tunnelCount.roundup_average",
          "value": "0.0"
        },
        {
          "name": "ipsec.bytesIn.average",
          "value": "0.0"
        },
        {
          "name": "ipsec.bytesOut.average",
          "value": "0.0"
        },
        {
          "name": "firewall.connections.roundup_average",
          "value": "2.0"
        },
        {
          "name": "interface.connected.latest.CloudExtNet",
          "value": "true"
        },
        {
          "name": "interface.connected.latest.RoutedOrgvdcNetwork",
          "value": "true"
        },
        {
          "name": "interface.connected.latest.vnic2",
          "value": "false"
        },
        {
          "name": "interface.connected.latest.vnic3",
          "value": "false"
        },
        {
          "name": "interface.connected.latest.vnic4",
          "value": "false"
        },
        {
          "name": "interface.connected.latest.vnic5",
          "value": "false"
        },
        {
          "name": "interface.connected.latest.vnic6",
          "value": "false"
        },
        {
          "name": "interface.connected.latest.vnic7",
          "value": "false"
        },
        {
          "name": "interface.connected.latest.vnic8",
          "value": "false"
        },
        {
          "name": "interface.connected.latest.vnic9",
          "value": "false"
        },
        {
          "name": "firewall.ruleCount.latest",
          "value": "0.0"
        },
        {
          "name": "edge.featureStatus.latest.l2vpn",
          "value": "not_configured"
        },
        {
          "name": "edge.featureStatus.latest.routing",
          "value": "Applied"
        },
        {
          "name": "edge.featureStatus.latest.firewall",
          "value": "Applied"
        },
        {
          "name": "edge.featureStatus.latest.syslog",
          "value": "not_configured"
        },
        {
          "name": "edge.featureStatus.latest.dhcp",
          "value": "not_configured"
        },
        {
          "name": "edge.featureStatus.latest.highAvailability",
          "value": "not_configured"
        },
        {
          "name": "edge.featureStatus.latest.ipsec",
          "value": "not_configured"
        },
        {
          "name": "edge.featureStatus.latest.loadBalancer",
          "value": "down"
        },
        {
          "name": "edge.featureStatus.latest.nat",
          "value": "not_configured"
        },
        {
          "name": "edge.featureStatus.latest.dns",
          "value": "not_configured"
        },
        {
          "name": "edge.featureStatus.latest.sslvpn",
          "value": "not_configured"
        },
        {
          "name": "edge.status.latest",
          "value": "GREEN"
        }
      ],
      "edgeId": "c872d1b0-40fb-46cc-aa81-725c22bb099d"
    },
  ],
  "next": "MTQ2MTc5NjY4MHxhMTE1MmE1Ni1hZjBkLTRlYWItOTU0MS0zZjQwYWE5MTAwMzg="
}

Request Header 2

POST https://us-california-1-3.vchs.vchs.vmware.com/hybridity/api/metrics/gateways/c872d1b0-40fb-46cc-aa81-725c22bb099d?count=1&next="MTQ2MTc5NjY4MHxhMTE1MmE1Ni1hZjBkLTRlYWItOTU0MS0zZjQwYWE5MTAwMzg="
Accept: application/json
Content-Type: application/json
X-Vcloud-Authorization: "d6eFLOqQYfuEn2MJTp7BQ2ISEO+ZYaEgTcqBy8wZQ6js="

Request Body 2 – Specify the Collection Interval

"relativeStartTime":{"interval":2,"unit":"MINUTE"},"relativeEndTime":{"interval":0,"unit":"MINUTE"

Response Body 2

{
  "count": 1,
  "rows": [
    {
      "entityId": "a1152a56-af0d-4eab-9541-3f40aa910038",
      "interval": "2",
      "timestamp": 1456267200,
      "vdc": "0b75613c-c0ed-4d5a-b3bb-9ad62e8e1e1c",
      "metrics": [
        {
          "name": "interface.packetsIn.average.CloudExtNet",
          "value": "0.0"
        },
        {
          "name": "interface.packetsOut.average.CloudExtNet",
          "value": "0.0"
        },
        {
          "name": "interface.bytesIn.average.CloudExtNet",
          "value": "0.0"
        },
        …
      "edgeId": "a1152a56-af0d-4eab-9541-3f40aa910038"
    }
]
}