Retrieving information about cloud objects
You can retrieve information about a specific cloud object by using a GET request. However, you must know the globally unique identifier (GUID) and uniform resource identifer (URI) of the object in which you are interested.
The following example shows a sequence of HTTP requests that you might use to find the URIs of all the network containers in a pod and then retrieve information about one of the network containers.
Send a POSTrequest to search for a list of pods:
POST /csm/Pod/search
Host: apiServer.Calbro.com:8080
Authentication-Token: Your-Token
{"timeout" : -1;}The HTTP response to the request includes the following JSON document that contains a list of pods. The JSON document shows that your cloud has one pod and that the pod has several network containers. The network containers for the pod are listed in the containers object that is embedded in the resultsarray. The sample response contains a SearchResults object. However, you might receive a Task object in the response rather than a SearchResults object, depending on how you set your timeout value in the request and how long the system takes to process your request. For information about tasks, see Synchronous-and-asynchronous-operations.
{
"cloudClass" : "com.bmc.cloud.model.beans.SearchResults",
"guid" : "e732a930-5949-48c3-8338-f163c388af4f",
"pageNo" : 0,
"pageSize" : -1,
"results" : [
{
"cloudClass" : "com.bmc.cloud.model.beans.Pod",
"containerBlueprints" :
[ "/containerblueprint/be70ab10-c850-4b80-8e1d-efbb7a4ea587" ],
"containers" : [
"/networkcontainer/aa67935f-f636-4801-b941-563317e4f3ae",
"/networkcontainer/48681735-3535-4e8e-83e0-0cf5d95a7e94",
"/networkcontainer/b1ed722c-09a8-4614-bf41-818e86b119db",
"/networkcontainer/0806a334-6a4a-4ec1-8776-f58cc808a197"
],
"externalID" : "392d97a1-efec-423c-a99d-848e1fe1ac35:Austin Pod",
"guid" : "2ea252f2-a4f3-4671-8e26-f7a480165aed",
"isOnboarded" : true,
"location" : "/location/OI-C1121702FB304D90870689BAEDD139E7",
"name" : "Austin Pod",
"owner" : "CalbroAdmin",
"provider" : "/provider/392d97a1-efec-423c-a99d-848e1fe1ac35",
"reconciliationID" : "OI-738b64479a584e558dd99394eece23a1",
"staticPools" :
[ "/staticpool/4d54ba05-d9f2-40c1-b3e9-eb92a6305afe" ],
"tokenID" : "Austin Pod"
}
],
"totalRows" : 1
}- Identify the network container that you want more information about and save its URI. This example uses the first network container, which has the URI /networkcontainer/aa67935f-f636-4801-b941-563317e4f3ae.
Send a GET request with the saved URI embedded in the request:
GET /csm/networkcontainer/aa67935f-f636-4801-b941-563317e4f3aeThe JSON document in the response contains detailed information about the network container that is identified by the URI /networkcontainer/aa67935f-f636-4801-b941-563317e4f3ae. The guidreferenced in the JSON document is identical to the one in the URI.
[{
"cloudClass" : "com.bmc.cloud.model.beans.NetworkContainer",
"containerBlueprint" :
"/containerblueprint/be70ab10-c850-4b80-8e1d-efbb7a4ea587",
"externalID" : "392d97a1-efec-423c-a99d-848e1fe1ac35:Austin Pod:Sol NC",
"guid" : "aa67935f-f636-4801-b941-563317e4f3ae",
"isOnboarded" : true,
"name" : "Sol NC",
"owner" : "CalbroAdmin",
"pod" : "/pod/2ea252f2-a4f3-4671-8e26-f7a480165aed",
"provider" : "/provider/392d97a1-efec-423c-a99d-848e1fe1ac35",
"reconciliationID" : "OI-53593909177d4942972020540fa93285",
"tokenID" : "Sol NC",
"zones" : [ "/zone/7b9af0d4-2858-4629-b117-5d7810993bcd" ]
}]