Error trying to get groups under a project using API

Hello,

I’m trying to get all the groups associated to a project.

In order to do that, I’m trying to use the GitLab API:

curl --header “PRIVATE-TOKEN: <your_access_token>” “https://gitlab.example.com/api/v4/projects/:id/groups

Unfortunately, when I do that I get a 404 error message.

Moreover, when I check on the site, there is a strange behavior:

As you can see, 2 groups are linked to my project

But when I click on one of the groups, it redirects me to an error page:

Any idea of what is going on ?