Get books by id returning multiple books

I’m working the library API. When I run get books by id, I get multiple books instead of just one. It seems like I’m getting the entire database.

I’ve added the request in both Postman App and on the website and get the same results.

Hey @spacecraft-archite16 :wave:

Welcome to the Postman Community! :postman:

Could you provide more details about that API, I’m not sure what API you’re talking about here. Is this something public or part of a training course?

Are you able to share screenshots of what you have and any relevant links for the documentation?

If anything, you need to over share the information as only you can see what’s in front and you. You need to give folks a fighting chance of helping you out here.

I’m using the Postman Library API and working the Postman API online course where I use get books by id to lookup a book that I just added using add books.

Can you provide a link to the course, and then provide a screenshot of your current request.

What does the course tell you to do to get a single book?

It will be changing the request in some manner. The request body if its a POST request, or query parameters if its a GET request.

Without seeing the instructions, I can’t tell you what.

These courses aren’t intended to catch you out. Troubleshooting the request is part of the learning. However I will try and point you in the right direction without just telling you how to do it.

The url of the site is

https://web.postman.co/workspace/1f630a66-7d15-4217-809d-1a9b3e5b7ed7/request/33138412-72a9c8f9-26d6-4e33-90aa-777287661f55?tab=params

The request image is

All I should do is paste in the books id and click send after saving it. I’ve following the instructions from the course twice. I got started down the wrong path when I started the course, and it wasn’t until I got to the Halfway Test and started having problems. I figured out that I was supposed to be using the app and started the course over. When I worked on the course the first time, the request worked.

The post request add book worked and I copied the id generated with copy and paste and entered it into the value field and clicked send after saving. It returns 10K worth of information and I have to view in the editor. I’ve tried recreating the request but get the same results.

I can only suggest re-reading the instructions.

You need to use path variables for the book ID, not query parameters.

1 Like

I knew it had to be something stupid, thanks!

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.