Missing name for new org using REST API #10097

Closed
opened 2025-11-02 08:58:07 -06:00 by GiteaMirror · 2 comments
Owner

Originally created by @dawnstrider on GitHub (Jan 13, 2023).

Description

Using the REST API, it is not possible to set the "name" attribute for a new organization. It will be set to default value "string".

How to reproduce:

  • have an admin account

  • Use the swagger API at https://try.gitea.io/api/swagger#/admin/adminCreateOrg to generate a request for a new organization (replace with non-demo-system)

    • fill in values of the payload
    • secondary bug: leave field "user" as default value "string" otherwise you get an exception that the user already exists
  • add user credentials to CURL call for gitea account

  • run command

  • a new organization is created, but the name field is set to value "string"

Gitea Version

1.18.0

Can you reproduce the bug on the Gitea demo site?

No

Log Gist

No response

Screenshots

No response

Git Version

No response

Operating System

No response

How are you running Gitea?

Docker environment

Database

MySQL

Originally created by @dawnstrider on GitHub (Jan 13, 2023). ### Description Using the REST API, it is not possible to set the "name" attribute for a new organization. It will be set to default value "string". **How to reproduce:** - have an admin account - Use the swagger API at https://try.gitea.io/api/swagger#/admin/adminCreateOrg to generate a request for a new organization (replace with non-demo-system) - fill in values of the payload - **secondary bug**: leave field "user" as default value "string" otherwise you get an exception that the user already exists - add user credentials to CURL call for gitea account - run command - a new organization is created, but the name field is set to value "string" ### Gitea Version 1.18.0 ### Can you reproduce the bug on the Gitea demo site? No ### Log Gist _No response_ ### Screenshots _No response_ ### Git Version _No response_ ### Operating System _No response_ ### How are you running Gitea? Docker environment ### Database MySQL
GiteaMirror added the type/bug label 2025-11-02 08:58:07 -06:00
Author
Owner

@wolfogre commented on GitHub (Jan 19, 2023):

Could you please show me your request parameters? I guess you might have mixed up the two "username"s.

image

@wolfogre commented on GitHub (Jan 19, 2023): Could you please show me your request parameters? I guess you might have mixed up the two "username"s. ![image](https://user-images.githubusercontent.com/9418365/213384861-7f1cfd7a-1be2-439f-80ea-a30daa31576c.png)
Author
Owner

@dawnstrider commented on GitHub (Feb 6, 2023):

Gitea version: 1.18.3
Can no longer reproduce the issue myself.

It would help the understanding of the API if the documentation references "username" in the payload as "the name of the new organisation".

Closing issue.

@dawnstrider commented on GitHub (Feb 6, 2023): Gitea version: 1.18.3 Can no longer reproduce the issue myself. It would help the understanding of the API if the documentation references "username" in the payload as "the name of the new organisation". Closing issue.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#10097