exam questions

Exam 350-401 All Questions

View all questions & answers for the 350-401 exam

Exam 350-401 topic 1 question 576 discussion

Actual exam question from Cisco's 350-401
Question #: 576
Topic #: 1
[All 350-401 Questions]

A company recently decided to use RESTCONF instead of NETCONF, and many of their NETCONF scripts contain the operation <edit-config>
(operation="create"). Which RESTCONF operation must be used to replace these statements?

  • A. PUT
  • B. CREATE
  • C. GET
  • D. POST
Show Suggested Answer Hide Answer
Suggested Answer: D 🗳️

Comments

Chosen Answer:
This is a voting comment (?). It is better to Upvote an existing comment if you don't have anything to add.
Switch to a voting comment New
Ado_68
Highly Voted 2 years, 6 months ago
RESTCONF NETCONF GET <get>, <get-config> POST <edit-config> (operation=”create”) PUT <edit-config> (operation=”create/replace”) Selected Answer D PATCH <edit-config> (operation=”merge”) DELETE <edit-config> (operation=”delete”)
upvoted 12 times
...
PALURDIN
Highly Voted 2 years, 8 months ago
Selected Answer: D
RESTCONF does not have CREATE method.
upvoted 10 times
aaabattery
2 years, 1 month ago
https://www.cisco.com/c/en/us/td/docs/dcn/nx-os/nexus9000/101x/programmability/cisco-nexus-9000-series-nx-os-programmability-guide-release-101x/m-n9k-agent-restconf-101x.pdf
upvoted 1 times
...
...
a67c04a
Most Recent 8 months, 3 weeks ago
Selected Answer: A
Going with A. The question says replace = PUT.
upvoted 1 times
eXPlosion
1 month, 2 weeks ago
Wrong, you did not read the question
upvoted 1 times
...
...
[Removed]
11 months, 2 weeks ago
Selected Answer: D
D is correct
upvoted 2 times
...
ZarNi
1 year ago
Selected Answer: A
The PUT method is used to create or replace the entire resource identified by the Request-URI (Uniform Resource Identifier). If the resource does not exist, it is created. If the resource already exists, it is replaced with the new representation specified in the request payload. Therefore, when migrating from NETCONF scripts that use <edit-config> (operation="create") to RESTCONF, the corresponding operation to use is PUT.
upvoted 1 times
...
teems5uk
1 year, 3 months ago
Selected Answer: A
While POST can be used for creating resources, the more direct equivalent to <edit-config> with operation="create" in NETCONF is the PUT method. PUT is used when you want to update or create a resource at a specific URI. In summary, for the scenario described in the question, where <edit-config> with operation="create" is used in NETCONF scripts, the appropriate RESTCONF operation is PUT (option A).
upvoted 1 times
...
Dan_T_P
1 year, 4 months ago
Selected Answer: D
so from https://www.cisco.com/c/en/us/td/docs/ios-xml/ios/prog/configuration/171/b_171_programmability_cg/restconf_protocol.html#id_125840 it is either PUT (create or replace) or POST (create or operation like reload) however looking at the question key wording is that scripts contain the "operation" so from the link answer =>POST
upvoted 2 times
...
asusarla
1 year, 9 months ago
imo, I'm going with PUT...the keyword in the question says "replace" PUT: (Create or Replace) Request: If the specified command is not present on the device, the POST request creates it ; however, if it is already present in the running configuration, the command will be replaced by this request https://www.cisco.com/c/en/us/td/docs/ios-xml/ios/prog/configuration/171/b_171_programmability_cg/restconf_protocol.html#id_125840
upvoted 1 times
Alondrix
1 year, 6 months ago
You are interpreting as replacing information on the device. The question is asking to replace the NETCONF command with the RESTCONF command.
upvoted 2 times
...
...
CisR
1 year, 10 months ago
It could be A or D. A if they mean use RESTCONF to replace the text in the NETCONF script (therefore a PUT as that is the replace operator, you are replacing some text with something else) D if they mean reword the NETCONF script by some means to do the same thing as it did before, which was a 'create' (and therefore a POST)
upvoted 1 times
...
Bluntedcase
1 year, 10 months ago
I think it's A. Here from Cisco: https://www.cisco.com/c/en/us/td/docs/ios-xml/ios/prog/configuration/171/b_171_programmability_cg/restconf_protocol.html#id_125840 "PUT: (Create or Replace) Request: If the specified command is not present on the device, the POST request creates it ; however, if it is already present in the running configuration, the command will be replaced by this request."
upvoted 1 times
Bluntedcase
1 year, 10 months ago
I've realised my mistake.... of course it's a new command in order to replace the CREATE from NETCONF. That's why POST would be correct, imo
upvoted 1 times
...
...
net_eng10021
1 year, 11 months ago
Why would A not work? PUT <edit-config> (operation=”create/replace”)
upvoted 1 times
...
MO_2022
2 years, 4 months ago
Selected Answer: D
POST <edit-config> (operation=”create”)
upvoted 3 times
...
BryCR
2 years, 6 months ago
Has to be POST D https://www.cisco.com/c/en/us/td/docs/dcn/nx-os/nexus9000/101x/programmability/cisco-nexus-9000-series-nx-os-programmability-guide-release-101x/m-n9k-agent-restconf-101x.pdf
upvoted 1 times
...
doron1122
2 years, 6 months ago
why no A ? PUT: This method creates or replaces the target resource.
upvoted 3 times
doron1122
2 years, 6 months ago
https://www.ipspace.net/kb/CiscoAutomation/070-netconf.html
upvoted 1 times
...
net_eng10021
1 year, 11 months ago
I'm wondering the same thing...why not A? PUT <edit-config> (operation=”create/replace”)
upvoted 2 times
...
...
jj970us
2 years, 8 months ago
Selected Answer: D
POST: This method creates a data resource or invokes an operations resource.
upvoted 4 times
...
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.

Upvoting a comment with a selected answer will also increase the vote count towards that answer by one. So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.

SaveCancel
Loading ...
exam
Someone Bought Contributor Access for:
SY0-701
London, 1 minute ago