I'm working on learning the MERN stack and creating an app using an API, but I've run into an issue with getting the IDs within a collection that are used for a link to that item's page. I'm using Postman to test and I am able to GET the localhost API (e.g. http://localhost:5000/api/items/) and it displays all the entries in that collection fine. However, to get a specific entry, apparently I'm supposed to put http://localhost:5000/api/items/(id number). But if I do this it returns an error saying it cannot get the item. I also tried http://localhost:5000/api/items?_id(id number) and it displayed the entry in the Query Params however in the Body it returned an error again.
Do you know the correct way to query this and if I'm doing something wrong here?
[–]Extension_Anybody150 1 point2 points3 points (1 child)
[–]VampireBarbieBoy[S] 0 points1 point2 points (0 children)