Skip to content

Set organisation visibility from API #7023

@agp8x

Description

@agp8x
  • Gitea version (or commit ref): 799f5e0
  • Git version: 2.20.1
  • Operating system: gitea/gitea:1.8 (docker)
  • Database (use [x]):
    • PostgreSQL
    • MySQL
    • MSSQL
    • SQLite
  • Can you reproduce the bug at https://try.gitea.io:
    • Yes (provide example URL)
    • No
    • Not relevant
  • Log gist:

Description

It is currently not possible to set the visibilty of an organisation from API calls (especially /orgs). The visibility option is not documented in swagger; I tried sending a "visibility" field with "private", but it did not work.

curl -X POST "http://<gitea>/api/v1/orgs?access_token=<my_token>" -H  "accept: application/json" -H  "Content-Type: application/json" -d "{  \"username\": \"newOrg\",\"visibility\": \"private\"}"

Metadata

Metadata

Assignees

No one assigned

    Labels

    modifies/apiThis PR adds API routes or modifies them

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions