nerdexam
Cisco

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…

Understanding and Using APIs

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

200-901 question #317 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)
  • A
    71% (17)
  • B
    4% (1)
  • C
    8% (2)
  • D
    17% (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

#API Pagination#REST API#Cisco Secure Endpoint API#Python Scripting

Community Discussion

No community discussion yet for this question.

Full 200-901 Practice