List user groups
GET
/admin/groups
const url = 'https://gitea.example.com/api/v1/admin/groups';const options = {method: 'GET', headers: {Authorization: 'Basic <credentials>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url https://gitea.example.com/api/v1/admin/groups \ --header 'Authorization: Basic <credentials>'Gitea Enterprise only. This endpoint is not part of the community edition.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Query Parameters
Section titled “Query Parameters”q
string
Search keyword for group name
page
integer
Page number of results to return (1-based)
limit
integer
Page size of results
Responses
Section titled “Responses”List of user groups
Media typeapplication/json
Array<object>
UserGroup represents a user group in API responses.object
description
string
id
integer format: int64
name
string
parent_id
integer format: int64
Examplegenerated
[ { "description": "example", "id": 1, "name": "example", "parent_id": 1 }]APINotFound is a not found empty response
Media typeapplication/json