Day 12 of challenge - AssertionError

Hi,

I’m working on the “Day 12: Postman API” in the “30 days of Postman - for developers”.
When I sent a GET request on “Get a collection” and “Get an Environment”, I received the error message, “AssertionError: expected PostmanResponse{ …(10) } to have property ‘code’ of 200, but got 404”. Please refer to my one of screen shots attached here.

I believe that the wrong environment variables, collectionId and environmentId, causes this error. Please refer to the other screen shot attached here.

I entered the Variable and the Initial value and the Current value as they are written in the instruction.

Could someone advise me to solve this issue?

Best,

Hey @maintenance-saganis4 :wave:

Which URLs are you using for those calls and are the ids that you’re using correct?

From the variables, I can see that these are not correct and you should be using the Id of the element and not the name of the element.

Hi,

I found the instruction in the following URL.

https://www.postman.com/postman/30-days-of-postman-for-developers/documentation/varjtku/day-12-postman-api

Please refer to the screen shot below.

Best,

Both of those say “with the Collection/Environment Id for…” so you need to get the id of those named elements.

Those are used to call the Postman API, that has routes of:

You would get those by opening the element in a tab, then selecting the i icon on the right sidebar to display the meta information of the element.

Hi,
Thank you for your instruction.
I have done as you mentioned, and I came across the following errors.

Kindly check my variables.

This is my collection ID for the “Day 12: Postman API.”

This is my environment ID.

This is my workspace ID.

image

I deleted the collection for Day 12 and have started it over. But I could not resolve what causes the errors.

Best,