Home > Cloud Cruiser 3 > REST API reference > Resources > Get a resource group by ID

Get a resource group by ID

Retrieves a resource group and its containing resource summaries by group ID.

URL syntax

http://<ccServerURL
>/rest/v1/resources/group/<groupId
>

HTTP method

GET

Request

URL path parameters (required)

groupId (type: int)

URL query parameters (optional)
?startFrom=<x
>&count=<y
>

Default: startFrom=1&count=-1

Request body

None

Response

Content-Type
application/xml
Response body

XML text with root element resourceGroup and the following XML schema:

<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:ns1="http://www.cloudcruiser.com/webservices/v1/Common" xmlns:tns="http://www.cloudcruiser.com/webservices/v1/Resource" targetNamespace="http://www.cloudcruiser.com/webservices/v1/Resource">
<xs:element name="resourceGroup" type="tns:ResourceGroup"/>
  <xs:complexType name="ResourceGroup">
    <xs:sequence>
      <xs:element name="name" type="xs:string"/>
      <xs:element maxOccurs="unbounded" minOccurs="0" name="resource" type="tns:ResourceSummary"/>
    </xs:sequence>
    <xs:attribute name="id" type="xs:int"/>
    <xs:attribute name="totalResources" type="xs:int"/>
    <xs:attribute name="retrievedResources" type="xs:int"/>
    <xs:attribute name="startFrom" type="xs:int"/>
  </xs:complexType>
 
  <xs:complexType name="ResourceSummary">
   <xs:sequence>
     <xs:element name="name" type="xs:string"/>
     <xs:element minOccurs="0" name="description" type="xs:string"/>
     <xs:element name="active" type="xs:boolean"/>
     <xs:element name="hidden" type="xs:boolean"/>
     <xs:element name="resourceType" type="resourceType"/>
   </xs:sequence>
   <xs:attribute name="id" type="xs:int"/>
  </xs:complexType>
 
  <xs:simpleType name="resourceType">
    <xs:restriction base="xs:string">
      <xs:enumeration value="STANDARD"/>
      <xs:enumeration value="BUNDLED"/>
      <xs:enumeration value="DISCOUNT_SURCHARGE"/>
      <xs:enumeration value="PASSTHROUGH"/>
    </xs:restriction>
  </xs:simpleType>
</xs:schema>

JAXB type

com.cloudcruiser.server.webservices.v1.dto.resource.ResourceGroup

Example

URL
http://localhost:8080/rest/v1/resources/group/1?startFrom=5&count=2
Java
ResourceGroup resourceGroup= resourceServiceProxy.getResourceGroupById(1);
Response body
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<resourceGroup xmlns="http://www.cloudcruiser.com/webservices/v1/Resource" id="1" totalResources="30" retrievedResources="2" startFrom="5">
  <name>VMware vCenter</name>
  <resource id="10015">
    <name>vcenter.cpu.cpu2</name>
    <description>CPU (2)</description>
    <active>true</active>
    <hidden>false</hidden>
    <resourceType>STANDARD</resourceType>
  </resource>
  <resource id="10016">
    <name>vcenter.cpu.cpu3</name>
    <description>CPU (3)</description>
    <active>true</active>
    <hidden>false</hidden>
    <resourceType>STANDARD</resourceType>
  </resource>
</resourceGroup>
Last modified

Tags

This page has no custom tags.

Classifications

This page has no classifications.
© Copyright 2018 Hewlett Packard Enterprise Development LP