Add new project features to API
What does this MR do and why?
This MR adds environments_access_level, feature_flags_access_level, infrastructure_access_level, monitor_access_level to the Projects API.
Related to #364240 (comment 1202560305)
Screenshots or screen recordings
Test project:
Features enabled:
API responses:
GET /projects:
[
{
"id": 6,
"description": "Consequatur odit rem aperiam sed corrupti cum.",
"name": "Flight",
...
"releases_access_level": "enabled",
"environments_access_level": "enabled",
"feature_flags_access_level": "enabled",
"infrastructure_access_level": "enabled",
"monitor_access_level": "enabled",
...
}
]
GET /projects/6
{
"id": 6,
"description": "Consequatur odit rem aperiam sed corrupti cum.",
"name": "Flight",
...
"releases_access_level": "enabled",
"environments_access_level": "enabled",
"feature_flags_access_level": "enabled",
"infrastructure_access_level": "enabled",
"monitor_access_level": "enabled",
...
}
POST /projects
Request body:
{
"name": "test-projects-api",
"path": "test-projects-api",
"releases_access_level": "private",
"environments_access_level": "private",
"feature_flags_access_level": "private",
"infrastructure_access_level": "private",
"monitor_access_level": "private"
}
Response:
{
"id": 23,
"description": null,
"name": "test-projects-api",
...
"releases_access_level": "private",
"environments_access_level": "private",
"feature_flags_access_level": "private",
"infrastructure_access_level": "private",
"monitor_access_level": "private",
...
}
PUT /projects/6
Request body:
{
"releases_access_level": "disabled",
"environments_access_level": "disabled",
"feature_flags_access_level": "disabled",
"infrastructure_access_level": "disabled",
"monitor_access_level": "disabled"
}
Response:
{
"id": 6,
"description": "Consequatur odit rem aperiam sed corrupti cum.",
"name": "Flight",
...
"releases_access_level": "disabled",
"environments_access_level": "disabled",
"feature_flags_access_level": "disabled",
"infrastructure_access_level": "disabled",
"monitor_access_level": "disabled",
...
}
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR.
Edited by Alishan Ladhani

