0

I have a program that allows me to automatically create a new GitLab project with the GitLab API and I would like to be able via this API to set the visibility of Pages to 'Everyone', which defaults to 'Only project members'. I looked in the doc but I couldn't find anything about the Pages visibility setting. If anyone has an idea I would be interested in reading it.

Thank you

Nicolas
  • 51
  • 2

1 Answers1

0

There's an attribute in the Create Project API to change the Pages visibility level. The attribute is called pages_access_level and the available options are disabled, private, enabled, or public. Using the option public should set the access level so Everyone can access your Page.

The pages_access_level attribute also exists when modifying a Project from the API.

Here's the docs for the Create Project API where you can see the pages_access_level attribute.

Adam Marshall
  • 6,369
  • 1
  • 29
  • 45