Retrieving infrastructure details of a CI


The graph API uses the GET method to retrieve the infrastructure details of a CI. You must provide authentication credentials by using the login API before accessing the data. For information about the authentication process, see Web-services-authentication.

URL to access the details API

The generic format of a URL for the graph API is as follows:

http|https://<serverHost>:<port>/bppmws/api/CI/<identifier1>
/graph?<queryParam1>&<queryParam2>&...<queryParamn>

Information
Example

http://bppmwsserver:80/bppmws/api/CI/cluster1/graph?idType=
TOKEN_ID&SubType=CLUSTER&sourcelevel=2&targetlevel=3

Entry

Description

http|https

Type of protocol to send the request. BMC ProactiveNet web services support both HTTP and HTTPS protocols.

serverHost

Host name of the BMC ProactiveNet Server

port

Port number through which communication is established. The default port number is 80 if you use the HTTP
protocol and 443 if you use the HTTPS protocol.

identifier1

Identifier of the CI for which the details are retrieved. The graph API searches for an exact match of the specified identifier.
The supported identifiers are as follows:

  • CI_ID
  • RECON_ID
  • Name of the CI
  • TOKEN_ID

The default value is TOKEN_ID.

queryParam1, queryParam2, queryParamn

Additional parameters that you want to provide in the request

Available query parameters (optional)

idType

Type of identifier based on which the search must be run. All the specified identifier type values are searched
for the identifier value provided in the id parameter. The supported identifier types are as follows:

  • CI_ID
  • RECON_ID
  • Name
  • TOKEN_ID

Example: 
where, test is the identifier of the CI, and idType=CI_IDindicates the identifier type.

The default value is TOKEN_ID.

Subtype

Subtype of the specified resource. The supported subtypes are as follows:

  • Cluster
  • Host
  • VMs
  • Storage
  • VDC
  • vCenter

The default value is vCenter.

relationshipType

Type of relationship between the source device and the consumer device.
The supported relationship types are as follows:

  • INFRASTRUCTURE
  • IMPACT
  • TOPOLOGY

The default value is INFRASTRUCTURE.

sourceLevel

With the specified resource as the root component, the level to go down to identify the source devices.

The default value is 2. It means that the devices, which are two level down to the specified resource,
are identified as the source devices.

targetLevel

With the specified resource as the root component, the level to go down to identify the target devices.

The default value is 1. It means that the devices, which are one level down to the resource,
are identified as the target devices.

routingTargets

Name of the cells for the target devices if the devices exist in a different BMC ProactiveNet Server.
This attribute is applicable only when your environment has a distributed service model.

You can provide multiple values, separated by commas.

slot

Based on the slot name and its value, the CIs that match the search string are filtered. You can filter the search results based
only on the className slot. The syntax is slot:slotName=slotValue.

For example, slot:slotName=BMC_ComputerSystem

JSON response to the graph API

A sample JSON response is as follows:

 {
     "response": {
           "id": "bppmwsserver_1",
           "className": "BMC_ComputerSystem",
           "hasProviders": false,
           "hasConsumers": false,
           "attributeMap": {
                 "PNReadAcl": "[]",
                 "WriteSecurity": "[Full Access]",
                 "VirtualSystemType": "Other",
                 "impact_sla_rollup_status": "NO_SLAS",
                 "DATABASE_event_max_sev": "OK",
                 "NETWORK_event_max_sev": "OK",
                 "PriorityWatchdog": "NO",
                 "self_status": "OK",
                 "UsingOrganization": "",
                 "SelfPriorityFunction": "BASE_PRIORITY",
                 "USER_TRANSACTIONS_event_max_sev": "OK",
                 "Priority": "PRIORITY_5",
                 "ReadSecurity": "[Full Access]",
                 "PrimaryCapability": "Server",
                 "PriorityOut": "PRIORITY_5",
                 "CLASS": "BMC_ComputerSystem",
                 "status": "OK",
                 "self_priority": "PRIORITY_5",
                 "HostName": "bppmwsserver",
                 "manual_status": "NONE",
                 "manual_status_providers_count": "0",
                 "computed_priority": "PRIORITY_5",
                 "consolidate_function": "HIGHEST_VAL",
                 "sla_rollup_status": "NO_SLAS",
                 "TokenId": "0",
                 "impact_status": "NONE",
                 "impact_priority": "PRIORITY_5",
                 "sub_status": "NONE",
                 "UsingOrganizationId": "-1",
                 "OTHER_event_max_sev": "OK",
                 "isVirtual": "No",
                 "any_event_max_sev": "OK",
                 "Name": "bppmwsserver.calbro.com",
                 "mc_udid": "bppmwsserver_1",
                 "mc_modification_time": "1313131741",
                 "ComponentAliases":
"[BMC_ComputerSystem:bppmwsserver:calbro.com]"
            },
           "hostUri": null
      },
     "search": "bppmwsserver_1",
     "statusCode": "200",
     "statusMsg": "OK",
     "responseTimeStamp": "2011-08-19T01:09:30"
}

 

Tip: For faster searching, add an asterisk to the end of your partial query. Example: cert*

BMC ProactiveNet 9.6