Courseiva
Understanding and Using APIsmediumMultiple ChoiceObjective-mapped

200-901 Understanding and Using APIs Practice Question

A developer is writing a Postman test to verify that a Meraki API response returns HTTP status 200 and contains a list of networks. Which code snippet correctly implements this test?

Answer choices

Why each option matters

Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.

Correct answer & explanation

pm.test("Check networks", function() { pm.expect(pm.response.json()).to.have.property('networks'); pm.response.to.have.status(200); });

pm.test with pm.response.to.have.status and pm.expect checks the status and response body.

Answer analysis

Option-by-option breakdown

For each option: why learners choose it and why it is or isn't the right answer here.

  • pm.response.to.have.status(200);

    Why it's wrong here

    Not inside a test function.

  • pm.test("Status 200", function() { pm.response.to.have.status(200); });

    Why it's wrong here

    Does not check body.

  • pm.test("Check networks", function() { pm.expect(pm.response.json()).to.have.property('networks'); pm.response.to.have.status(200); });

    Why this is correct

    Correctly checks both status and body.

  • pm.test("Success", function() { pm.expect(pm.response.code).to.equal(200); });

    Why it's wrong here

    Status check only.

About these practice questions

One of 989 original 200-901 practice questions on Courseiva, each with a full explanation and wrong-answer analysis — not exam dumps or protected exam content. Learn why practice questions differ from exam dumps →

How Courseiva writes practice questions · Editorial policy

JA

Written by Johnson Ajibi, MSc IT Security

Senior Network & Security Engineer · founder of Courseiva

This 200-901 practice question is part of Courseiva's free Cisco certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the 200-901 exam.