A script calls requests.get(objects_url, headers=h, params={'name': 'web'}) and then requests.post(objects_url, headers=h, json={'name': 'Web2', 'type': 'Host', 'value': '10.1.1.20'}). What do the two calls do?
Select an answer to reveal the explanation.
Short Explanation
Think of GET as reading the catalog and POST as filling in an order form. The params ride in the URL as a question, and the json is the form you hand over. The trap is mixing up where each piece travels, or assuming a GET changes anything.
Full Explanation
REST maps HTTP methods to intent. GET retrieves a representation of resources and should not change server state; in requests, the params argument is encoded into the URL query string, so the server receives something like objects_url?name=web and can return only matching objects. POST submits a new resource to a collection; the json argument serializes the dictionary into the request body and sets the content type to application/json, so the server creates a new host object named Web2. Describing the GET as creating a filter object assigns write behavior to a read method; and POST to a collection creates a resource, whereas updating an existing one is normally PUT or PATCH against that object's own URL. Saying both calls push changes to devices also confuses methods; additionally, on centralized managers, creating an object changes the manager's configuration but does not deploy it to managed firewalls until a separate deployment occurs. The claim that params go in the body and json goes in the URL inverts how requests builds the two calls. Exam caveat: also recognize PUT (replace), PATCH (partial update) and DELETE (remove). Operational check: inspect r.request.url and r.request.body for each call, and confirm the POST returned 201 Created with the new object's identifier.