Can't get all records from Rest Api

I’ve just started learning about Strapi, and I’m trying to build a Rest Api, when I request data (Posts) on an endpoint (/api/posts) it doesn’t return any thing except the “meta data”, although the database has some records, and when I try to get a post by id the server returns it as expected (/api/posts/:id) ,I gave all permission to get the data , but nothing seems to be working , here’s some images so you can have a better understanding :

The /api/posts endpoint’s results:
posts

Am I doing something wrong here ?

System Information
  • Strapi V4
  • Windows 11
  • Sqlite
  • Nodejs 16.14.2
  • NPM 8.2.0
  • Yarn 1.22.18

Solved :
It was my fault, I was trying to load the data while it is not published yet.