Project Settings GraphQL API - Enable GitLab Duo
Everyone can contribute. Help move this issue forward while earning points, leveling up and collecting rewards.
I am trying to use the GraphQL Mutation for duoFeaturesEnabled:
mutation Projects {
projectSettingsUpdate(input: {fullPath: "my_path/to_project", duoFeaturesEnabled: true }) {
clientMutationId
errors
projectSettings {
duoFeaturesEnabled
project {
name
}
}
}
}
And I'm consistently getting the error:
"message": "The resource that you are attempting to access does not exist or you don't have permission to perform this action",
I can confirm the instance has GitLab Duo enabled on it, and I can go into the Project Settings manually to toggle the feature on/off through the UI
----- Old Issue ----
Since we can set Turn GitLab Duo on for a given Project via the UI: https://docs.gitlab.com/user/gitlab_duo/turn_on_off/#for-a-project-1, we should be able to enable it via the projects REST API: https://docs.gitlab.com/api/projects/#edit-a-project
But I don't see any options to do so...
We can set default_off in the Groups API, but then would have to set only via the UI for Projects, meaning we would not have the same level of auditability.
Ideally we want to be able to set this via config-as-code and interactions with the API