My api doesnt work when i try /restaurants/{id}

If i make a request to /restaurants i get all restorant

{
    "data": [
        {
            "id": 2,
            "documentId": "hrgvik1p126n8dsltq3ouc90",
            "Name": "Biscuitte",
            "Description": [
                {
                    "type": "paragraph",
                    "children": [
                        {
                            "text": "Welcome to Biscotte restaurant! Restaurant Biscotte offers a cuisine based on fresh, quality products, often local, organic when possible, and always produced by passionate producers.",
                            "type": "text"
                        }
                    ]
                }
            ],
            "createdAt": "2024-10-08T12:54:04.762Z",
            "updatedAt": "2024-10-08T12:54:25.657Z",
            "publishedAt": "2024-10-08T12:54:25.671Z",
            "locale": null
        }
    ],
    "meta": {
        "pagination": {
            "page": 1,
            "pageSize": 25,
            "pageCount": 1,
            "total": 1
        }
    }
}

but when i try to get the restaurant with id 2 i get an error

This topic has been created from a Discord post (1293208008720908481) to give it more visibility.
It will be on Read-Only mode here.
Join the conversation on Discord

<@637669517811515415> could you please share the error cod or screenshot

i reload my page

he doesn’t find when i set a restorant id

when i try with the document id it’s works

I think URL is wrong. Can you try removing the id from your URL? The final URL should be: http://localhost:3000/api/restaurant/2

quick video- (293) Discord | "My api doesnt work when i try /restaurants/{id}" | Strapi Community
I tested with id it should show data, could you please check your final API endpoint
http://127.0.0.1:1337/api/restaurants/2

i hâve check i get the error

I don’t know if we can join here and see the problem in screen share, expectations was it should work, also gave your proof quick video

in 20min im available

for screenshare

it’s okay?

Oops, I will be out of the desk soon . when you back you can try to rebuild and try this way http://127.0.0.1:1337/api/restaurants/2
also use Postman with token if API requires an authentication token

use the documentId instead of the ID

yeah I had the same thingk when i went through first time, documentations should be clear and not say use Id and instead say use the documentId /hrgvik1p126n8dsltq3ouc90

ooh no more id but documentId now?

that’s not clear

i’ve got the same issue

try this GET http://localhost:1337/api/restaurants/hrgvik1p126n8dsltq3ouc90