My question:
I’m trying to submit for day 12, but I keep getting errors on the “get single collection” and “get single environment” endpoints.
I suspect its because the URL is incorrect. The following is the relevant info from the instructions where you set the collectionId as an environment variable.
Create an environment : Create a new environment called Postman API env . Add the following environment variables:
collectionId with the collection id for Day 12: Postman API
environmentId with the environment id for Postman API env
workspaceId with the workspace id for your current workspace; you may need to do some research on this one
Remember to only useCURRENT VALUEfor sensitive tokens like your API key
Send the requests to ensure you get successful responses, and save your changes.
The submit request also needs to be configured.
Get the environment ID: Get the environment ID , and enter it under the Body tab as form-data for environmentUid .
I had the same issue and after reading @michaelderekjones response below I realized what was wrong. If you print out to the console the value of the res variable in the test file you’re going to see why 2 of the requests fails while the “get single workspace” request succeeds. The request to get the collection make a reference to a property named collectionId while in the form object, the property is named collectionUid, for example.
So, what I think is going on is that the submit instructions for this challenge are incorrect. They ask you to submit under the form-data tab three k-v pairs: workspaceId (the only one that passes the test because it has the correct name in the request url), environmentUid (should be just environmentId because that’s how it’s being referenced in the Tests tab of the Submit file), and collectionUid ( which should be collectionId)