nerdexam
Cisco

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.

Controller-Based Network Automation

Question

Which curl command is used to update the SNMP community of network ID "1234567" to read-only?

Options

How the community answered

(24 responses)
  • A
    4% (1)
  • B
    83% (20)
  • C
    4% (1)
  • D
    8% (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.

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'

The `access` parameter is incorrectly set to `users`, which is used for SNMPv3 user-based authentication, not for setting an SNMP community string.

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'Correct

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.

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'

The JSON payload structure with `username` and `passphase` is designed for configuring SNMPv3 users, not for updating an SNMP community string.

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'

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

#Meraki API#SNMP Configuration#REST API#curl

Community Discussion

No community discussion yet for this question.

Full 300-435 Practice