300-435 · Question #46
Which curl command is used to update the SNMP community of network ID "1234567" to read-only?
The correct answer is B. curl -L -H 'X-Cisco-Meraki-API-Key: <Key>' \ -H 'Content-Type: application/json' \ -X PUT --data-binary '{ \ "access":"community", \ "communityString":"readonly"}' \ 'https://api.meraki.com/api/v0/networks/1234567/snmpSet'. The correct curl command uses a PUT request to the Meraki API endpoint /networks/{networkId}/snmpSet, specifying access:"community" and communityString:"readonly" in the JSON payload to update the SNMP community string.
Question
Options
- Acurl -L -H 'X-Cisco-Meraki-API-Key: <Key>'
-H 'Content-Type: application/json'
-X PUT --data-binary '{
"access":"users",
"communityString":"readonly"}'
'https://api.meraki.com/api/v0/networks/1234567/snmpSet' - Bcurl -L -H 'X-Cisco-Meraki-API-Key: <Key>'
-H 'Content-Type: application/json'
-X PUT --data-binary '{
"access":"community",
"communityString":"readonly"}'
'https://api.meraki.com/api/v0/networks/1234567/snmpSet' - Ccurl -L -H 'X-Cisco-Meraki-API-Key: <Key>'
-H 'Content-Type: application/json'
-X PUT --data-binary '{
"access":"users",
"username":"snmp",
"passphase":"readonly"}'
'https://api.meraki.com/api/v0/networks/1234567/snmpSet' - Dcurl -L -H 'X-Cisco-Meraki-API-Key: <Key>'
-H 'Content-Type: application/json'
-X POST --data-binary '{
"access":"community",
"communityString":"readonly"}'
'https://api.meraki.com/api/v0/networks/1234567/snmpSet'
How the community answered
(24 responses)- A4% (1)
- B83% (20)
- C4% (1)
- D8% (2)
Why each option
The correct `curl` command uses a `PUT` request to the Meraki API endpoint `/networks/{networkId}/snmpSet`, specifying `access:"community"` and `communityString:"readonly"` in the JSON payload to update the SNMP community string.
The `access` parameter is incorrectly set to `users`, which is used for SNMPv3 user-based authentication, not for setting an SNMP community string.
The `curl` command correctly uses the `PUT` HTTP method to update the existing SNMP settings and provides the `access` parameter set to `community` along with the desired `communityString` value of `readonly` in the JSON payload, which is the standard way to configure SNMP community strings via the Meraki API.
The JSON payload structure with `username` and `passphase` is designed for configuring SNMPv3 users, not for updating an SNMP community string.
The `POST` HTTP method is generally used for creating new resources, whereas `PUT` is the appropriate method for updating an existing resource like SNMP settings.
Concept tested: Meraki API SNMP community update
Source: https://developer.cisco.com/meraki/api-v1/#!update-network-snmp-settings
Topics
Community Discussion
No community discussion yet for this question.