exam questions

Exam 300-435 All Questions

View all questions & answers for the 300-435 exam

Exam 300-435 topic 1 question 84 discussion

Actual exam question from Cisco's 300-435
Question #: 84
Topic #: 1
[All 300-435 Questions]


Refer to the exhibit. A Python script must be created to deactivate vSmart Policy Cisco SD-WAN vManage Configuration APIs. The documentation states the URL is as shown in the exhibit for this REST call using POST, and that `policyId` is a required request parameter. Which line of Python code makes this call, assuming the variable `s` is a valid Requests session object and the variable `policy-id` is the policyId?

  • A. s.port('https://vmanage:8443/dataservice/template/policy/vsmart/activate?policyId=%s' % policy_id)
  • B. s.port('https://vmanage:8443/dataservice/template/policy/vsmart/activate/%s' % policy_id)
  • C. s.port('https://vmanage:8443/dataservice/template/policy/vsmart/activate&policyId=%s' % policy_id)
  • D. s.port('https://vmanage:8443/dataservice/template/policy/vsmart/activate/', data = {'policyId': policy_id})
Show Suggested Answer Hide Answer
Suggested Answer: B 🗳️

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
dexilec82
2 months, 1 week ago
Selected Answer: B
There are typos here the question is to deactivate but the answers are all active assuming the question is to activate the correct answer is B and also there is no s.port i think this is s.post to deactivate, just replace active with deactivate
upvoted 1 times
...
samael666
5 months, 2 weeks ago
Selected Answer: B
correct sintax
upvoted 1 times
...
squirrel88x
12 months ago
Selected Answer: B
Correct answer is B See how %s is used in Python to replace a string https://stackoverflow.com/questions/54394758/python-s-f-d-etc
upvoted 1 times
...
Slavey
1 year, 3 months ago
I am not aware of method port in request library. I think it is answer D import json, requests payload = {'command': 'summary'} r = requests.post('http://localhost:4028', data=json.dumps(payload))
upvoted 1 times
...
Lyndongarcia09
3 years, 3 months ago
It should be B https://developer.cisco.com/docs/sdwan/#!sd-wan-vmanage-v20-6
upvoted 3 times
...
genkiro2020
3 years, 3 months ago
B is also correct: s.port("https://vmanage:8443/dataservice/template/policy/vsmart/activate/%s%) , without the "policy_id"
upvoted 3 times
...
Wocilon
3 years, 5 months ago
B is the correct answer. Source: https://docs.python.org/3/tutorial/inputoutput.html#old-string-formatting
upvoted 3 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