I can't create the organization using API #7883

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

Originally created by @Salvador1994 on GitHub (Sep 22, 2021).

Feature Description

Gitea Version: 1.15.2

I can't create an organization using API, I'm getting the following error:
'{"message":"Url","url":"my_domain/api/swagger"}'.

I'm starting using the python language and follow the example of the parameters I pass:

building the URL

url_fork = f'{http_https_host}/api/v1/orgs?token={token}&access_token={token}'

Providing the data for organization creation

date = {
"description": f'SaaS Repository for the company xcompany',
"full_name": "xcompany",
"location": "xcompany",
"repo_admin_change_team_access": True,
"username": "xcompany",
"visibility": "public",
"website": "string"
}

Request organization creation on gitea server

request = requests.post(url_fork, data=json.dumps(date),
headers={'content-type': 'application/json', 'Authorization': token}).

I await response, thank you!

Screenshots

Screenshot from 2021-09-22 14-49-43

Originally created by @Salvador1994 on GitHub (Sep 22, 2021). ### Feature Description Gitea Version: 1.15.2 I can't create an organization using API, I'm getting the following error: '{"message":"Url","url":"my_domain/api/swagger"}'. I'm starting using the python language and follow the example of the parameters I pass: # building the URL url_fork = f'{http_https_host}/api/v1/orgs?token={token}&access_token={token}' # Providing the data for organization creation date = { "description": f'SaaS Repository for the company xcompany', "full_name": "xcompany", "location": "xcompany", "repo_admin_change_team_access": True, "username": "xcompany", "visibility": "public", "website": "string" } # Request organization creation on gitea server request = requests.post(url_fork, data=json.dumps(date), headers={'content-type': 'application/json', 'Authorization': token}). I await response, thank you! ### Screenshots ![Screenshot from 2021-09-22 14-49-43](https://user-images.githubusercontent.com/44473356/134356327-86eb5681-a0d7-47d4-bb39-8ff094e343d0.png)
Author
Owner

@Salvador1994 commented on GitHub (Sep 22, 2021):

solved

@Salvador1994 commented on GitHub (Sep 22, 2021): solved
Author
Owner

@techknowlogick commented on GitHub (Sep 22, 2021):

@Salvador1994 could you post your solution in case anyone else with this issue comes across this via google?

@techknowlogick commented on GitHub (Sep 22, 2021): @Salvador1994 could you post your solution in case anyone else with this issue comes across this via google?
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#7883