200-901 · Question #317
Refer to the exhibit. An engineer sends the request to collect data over Cisco AMP for Endpoints API. The Engineer must list guide and hostname data for all computers, but the first request returns…
The correct answer is A. next_url = response_json['metadata']['links']['next']. https://github.com/CiscoSecurity/amp-03-pagination/blob/master/01_paginate.py while 'next' in response_json['metadata']['links']: next_url = response_json['metadata']['links']['next'] response = session.get(next_url) response_json = response.json() for computer in…
Question
Refer to the exhibit. An engineer sends the request to collect data over Cisco AMP for Endpoints API. The Engineer must list guide and hostname data for all computers, but the first request returns only 500 items out of 2,000. Then, the engineer adds the loop to collect all the data. What must be added to the script where the code is missing to complete the requests? A. B. C. D.
Exhibit
Options
- Anext_url = response_json['metadata']['links']['next']
- Bnext_url = response_json['metadata']['next']
- Cnext_url = response_json['next']
- Dnext_url = response_json['metadata']['links']
How the community answered
(24 responses)- A71% (17)
- B4% (1)
- C8% (2)
- D17% (4)
Explanation
https://github.com/CiscoSecurity/amp-03-pagination/blob/master/01_paginate.py while 'next' in response_json['metadata']['links']: next_url = response_json['metadata']['links']['next'] response = session.get(next_url) response_json = response.json() for computer in response_json['data']: print(computer['connector_guid'], computer['hostname'])
Topics
Community Discussion
No community discussion yet for this question.
