Cisco Prime Infrastructure API
Prime Infrastructure API Documentation

GET statisticsService/hosts

Fetches the details of Hosts

Since Product Version: 3.1

Resource Information

Rate Limiting?

Yes

Sorting?

No

Paging?

No

Filtering?

No

Aggregation?

No

Response Formats

xml

json

User Group

NBI Read

HTTP Methods

GET

DevNet Discussions

Resource URL

/webacs/api/v2/op/statisticsService/hosts

Request Parameters

Attribute Source Description

datacenter String

query

OptionalPattern to match the Datacenter name. If you do not specify any, all the Datacenters are considered.

cluster String

query

OptionalPattern to match the Cluster name. If you do not specify any, all the Clusters are considered.

host String

query

OptionalPattern to match the Hypervisor name. If you do not specify any, all the Clusters are considered.

children Boolean

query

OptionalParameter that needs to be set to true to fetch children of the Hypervisor. Children of a cluster are VMs that are part of it.

Range String

query

OptionalPagination range.

firstResult Integer

query

OptionalTBD

maxResults Integer

query

OptionalTBD

sort String

query

Optional

Response Parameters

Attribute Description

resources ResourceDetailsDTO[]

Sample Payloads

Sample payloads are for information only. They are automatically generated and the values included may not be representative of actual valid data values.

Sample XML Response Payload

https://localhost/webacs/api/v2/op/statisticsService/hosts?datacenter="DC1"&cluster="CL1"&host="HOST1"&firstResult=0&maxResults=10&sort=-dnsConfigName

<?xml version="1.0" ?>
<mgmtResponse responseType="operation" requestUrl="https://localhost/webacs/api/v2/op/statisticsService/hosts?datacenter=&amp;quot;DC1&amp;quot;&amp;amp;cluster=&amp;quot;CL1&amp;quot;&amp;amp;host=&amp;quot;HOST1&amp;quot;&amp;amp;firstResult=0&amp;amp;maxResults=10&amp;amp;sort=-dnsConfigName
					" rootUrl="https://localhost/webacs/api/v2/op">
  <resourcesDTO>
    <resources>
      <resources>
        <childrenLink>String value</childrenLink>
        <description>String value</description>
        <details>
          <item key="String value">
            <value xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="xs:string">String value</value>
          </item>
        </details>
        <metricsLink>String value</metricsLink>
        <name>String value</name>
        <type>String value</type>
      </resources>
    </resources>
  </resourcesDTO>
</mgmtResponse>

Sample JSON Response Payload

https://localhost/webacs/api/v2/op/statisticsService/hosts.json?datacenter="DC1"&cluster="CL1"&host="HOST1"&firstResult=0&maxResults=10&sort=-dnsConfigName

{
  "mgmtResponse" : {
    "@requestUrl" : "https://localhost/webacs/api/v2/op/statisticsService/hosts?datacenter=&quot;DC1&quot;&amp;cluster=&quot;CL1&quot;&amp;host=&quot;HOST1&quot;&amp;firstResult=0&amp;maxResults=10&amp;sort=-dnsConfigName\n\t\t\t\t\t",
    "@responseType" : "operation",
    "@rootUrl" : "https://localhost/webacs/api/v2/op",
    "resourcesDTO" : [ {
      "resources" : {
        "resources" : [ {
          "childrenLink" : "String value",
          "description" : "String value",
          "details" : [ {
            "@key" : "String value",
            "value" : "String value"
          } ],
          "metricsLink" : "String value",
          "name" : "String value",
          "type" : "String value"
        } ]
      }
    } ]
  }
}