HP OneView REST API Reference

appliance/device-read-community-string
appliance-device-read-community-string.html[10/17/2013 10:35:49 AM]
Updated: October 16, 2013 4:57
MDT
API Specifications Create Read Update Delete
/rest/appliance/device-read-community-string POST GET
Resource Model
DeviceCommunityString
HP OneView REST API Reference
appliance/device-read-community-string
The device read community string is used by the appliance to establish SNMP communication with devices managed by the
appliance.
URI: /rest/appliance/device-read-community-string
Method API
GET Retrieves the global community string.
Request
Header
Attributes Description
REST API Request Headers NOTE: The X-API-Version header is required for all APIs. For the
current release, this must be set to "X-API-Version:3"
Response Description
DeviceCommunityString The device read community string
Response Codes
REST API Response Codes
Examples
GET https://{appl}/rest/appliance/device-read-community-string
Response body
{
"uri": "/rest/appliance/device-read-community-
string",
"communityString": "public"
}
POST Update the device read community string. Although this updates the device read community string
on the appliance itself, this does not result in an update of the community string on devices within
the appliance. Follow these steps in order to cause an update of the SNMP community string for
the devices in an enclosure. (Consult the REST API documentation for details about each of the
following REST API calls.) 1. Call POST https://{appl}/rest/appliance/device-read-community-
string to set the community string. 2. Call GET https://{appl}/rest/enclosures to get a list of
enclosure ids. 3. Call PUT https://{appl}/rest/enclosures/{id}/refreshState for each enclosure id.
Follow these steps to cause an update of the community string for a rack-mounted server.
(Consult the REST API documentation for details about each of the following REST API calls.) 1.
Call POST https://{appl}/rest/appliance/device-read-community-string to set the community string.
2. Call GET https://{appl}/rest/server-hardware?filter="position=0" to get a list of rack-mount server
ids. 3. Call PUT https://{appl}/rest/server-hardware/{id}/refreshState for each rack-mounted server
id.
Request Header Attributes Description