I'm trying to get environment info given project id and environment id. I'm following Gitlab doc. Right now I'm able to get all environments by a project id with the following call: http://my_gitlab_url/gitlab/api/v4/projects/27/environments
. I get correctly the result:
[
{
"id": 46,
"name": "my_first_env",
"slug": "my_first_env",
"external_url": null,
"project": {
"id": 27,
...
}
},
{
"id": 47,
"name": "my_second_env",
"slug": "my_second_env",
"external_url": null,
"project": {
"id": 27,
...
}
}
]
Then I want to get a single env info, so using the previous informations I call: http://my_gitlab_url/gitlab/api/v4/projects/27/environments/47
but I receive a 404 error
.
That is strange because I got the pair (project, env) from the previous call. Using the env name or slug won't work either.
Also in the env settings page: http://my_gitlab_url/gitlab/my_project/environments/47/edit
I only see the name section, no ID. Plus, in this last URL the project ID matches the one I'm using. Am I missing something? Where else can I find the env ID?