How to delete all terraform states for a given project

I’m looking for a way to delete all terraform states for a given project.

I’ve just implemented a step to our CI pipeline that deletes a terraform state when the environment is stopped, so that’ll cover future states, but I have 152 legacy states that I very much do not want to delete one-by-one.

I know how to use the API to delete a state if you know the state’s name:
curl --header "Private-Token: $TOKEN" --request DELETE "${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/terraform/state/${STATENAME}"

If I could find an endpoint that lists all state names, I could loop over them, but I can’t find such an endpoint. I’ve tried GET on ${CI_PROJECT_ID}/terraform/state and ${CI_PROJECT_ID}/terraform

15.1.1-ee, self hosted.