I installed GitLab using Docker Engine, and the version is GitLab Community Edition 13.12.4.
The API sequence I sent is as follows
----------1---------request :
POST /api/v4/projects/:id/environments
response:
201 Created
{“id”:3,“name”:“nameString”,“slug”:“namestring-409kll”,“external_url”:null,“project”:{“id”:14,“description”:null,“name”:“nameString”,“name_with_namespace”:“first last / nameString”,“path”:“nameString”,“path_with_namespace”:“username/nameString”,“created_at”:“2021-07-14T11:42:31.442Z”,“default_branch”:null,“tag_list”:,“ssh_url_to_repo":"git@127.0.0.1:username/nameString.git”,“http_url_to_repo”:“http://127.0.0.1/username/nameString.git",“web_url”:“http://127.0.0.1/username/nameString”,“readme_url”:null,“avatar_url”:null,“forks_count”:0,“star_count”:1,“last_activity_at”:“2021-09-03T14:08:44.642Z”,“namespace”:{“id”:18,“name”:"first last”,“path”:“username”,“kind”:“user”,“full_path”:“username”,“parent_id”:null,“avatar_url”:"https://www.gravatar.com/avatar/fb5f034bf1bafc9589f29ffb0860fd1a?s=80\u0026d=identicon",“web_url”:“http://127.0.0.1/username”}},“state”:“available”,“enable_advanced_logs_querying”:false,“logs_api_path”:"/username/nameString/-/logs/k8s.json?environment_name=nameString"}
----------2---------request :
“GET”, “/api/v4/projects/:id/environments/3”
response:
200 OK
{“id”:3,“name”:“nameString”,“slug”:“namestring-409kll”,“external_url”:null,“last_deployment”:null,“state”:“available”,“enable_advanced_logs_querying”:false,“logs_api_path”:"/username/nameString/-/logs/k8s.json?environment_name=nameString"}
----------3---------request :
“DELETE”, “/api/v4/projects/:id/environments/3"
response:
403 Forbidden
All of the above APIs are sent using the same token But according to the specification document: #Environments API | GitLab The delete operation does not mention 403 and does not prompt for token replacement I don’t know if this is a bug.