Draft item is being returned by REST api

System Information
  • Strapi Version: 4.1.8
  • Operating System: Windows 11
  • Database: Postgres
  • Node Version: 16.17.0
  • NPM Version: 8.15.0
  • Yarn Version: N/A

I am having an issue where the regular REST API is returning draft items, even with draftAndPublish enabled. To reproduce just create an entity, let’s say “book”, and add a new book but don’t publish it. If you request the item by ID it returns the book, even if it is still a draft. For example:

GET /api/books/1

1 Like