Search API (GET method)
Search API (GET method) uses the GET method to search the CIs. It searches the CIs based on the identifier that you provide. The identifier can be partial or complete. For example, if you want to search the CIs identified by sim in their names, the details of the CIs that have sim in their names are retrieved. The supported identifiers are as follows:
- Name of the CI
- Uniform Resource Identifier of the CI
- Identifier of the CI (CI_ID or RECON_ID)
You must provide authentication credentials by using the login API before accessing the data. For information about authentication, see Web-services-authentication.
URL to access the search API (GET method)
The generic format of a URL for the search API (GET method) is as follows:
http|https://<serverHost>:<port>/bppmws/api/CI/<stringToSearch>/search?<queryParam1>&<queryParam2>&...<queryParamn>
Entry | Description |
---|---|
http|https | Type of protocol to send the request. Infrastructure Management support both HTTP and HTTPS protocols. |
serverHost | Host name of the BMC TrueSight Infrastructure Management 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. |
stringToSearch | String to be searched to identify the CIs |
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 string that is provided in the stringToSearch parameter, and the search is case insensitive. The supported identifier types are as follows:
The default value is RECON_ID. Example: |
Subtype | Subtype of the specified resource. The supported subtypes are as follows:
The default value is vCenter. |
slot=slotName:slotValue | Based on the slot name and its value, the CIs that match the search string are filtered. You can filter the search results based on the following slot names:
The CLASS option retrieves the CIs that belong to the subclasses of the specified class. You can use the usage API to get a list of supported classes. The PriorityWatchdog option retrieves CIs based on its value. The supported values are YES and NO. |
page | Page number of the paginated data from which you want to retrieve the data. When your request generates a huge volume of data, the response data is paginated with page numbers. This parameter helps to retrieve data from any particular page by using the page number. This parameter is applicable only when you send the web service request from a Central Server. |
resultSize | Indicates whether you want to retrieve the details of the CIs or partial details of the CIs. The supported values are as follows:
The default value for this parameter is default. |
Response information of the search API (GET method)
The response to the search API (GET method) depends on the search string and the query parameters that you pass.
A sample JSON response is as follows:
"cis": {
"count": 1,
"status": "OK",
"ciList": [
{
"id": "OI-43ab1727d1344f22958e60c12890c824",
"className": "BMC_ResourcePool",
"hasProviders": true,
"hasConsumers": true,
"attributeMap": {
"Name": "ATUL-VRP-POOL",
"status": "OK",
"mc_udid": "OI-43ab1727d1344f229c12890c824",
"CLASS": "BMC_ResourcePool",
"sub_status": "NONE",
"sla_rollup_status": "NO_SLAS",
"computed_priority": "PRIORITY_5",
"direct_events_count": "0",
"pn_predict_to_occur_time": "0",
"highest_pn_predicted_severity": "",
"any_open_event_max_sev": "OK",
"any_event_max_sev": "OK",
"impacting_open_event_max_sev": "OK",
"maintenance_mode": "NO",
"OwnerName": "",
"OwnerContact": "",
"ShortDescription": "n/a",
"manual_status": "NONE",
"schedule_status": "IN"
},
"hostUri": "HTTPS://vl-pun-ngp-qa07.bmc.com:443"
}
]
},
"statusCodes": [
"200"
],
"statusCode": "200",
"statusMsg": "OK",
"responseTimeStamp": "2012-02-20T12:19:11",
"statusMessages": [
"OK"
]
}