Replace direct members of a user group
PUT
/admin/groups/{id}/members
const url = 'https://gitea.example.com/api/v1/admin/groups/1/members';const options = { method: 'PUT', headers: {Authorization: 'Basic <credentials>', 'Content-Type': 'application/json'}, body: '{"user_ids":[1]}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request PUT \ --url https://gitea.example.com/api/v1/admin/groups/1/members \ --header 'Authorization: Basic <credentials>' \ --header 'Content-Type: application/json' \ --data '{ "user_ids": [ 1 ] }'Gitea Enterprise only. This endpoint is not part of the community edition.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”id
required
integer format: int64
Id of the user group
Request Body
Section titled “Request Body”Media typeapplication/json
UserGroupMembersOption contains the member list for a user group.
object
user_ids
Array<integer>
Examplegenerated
{ "user_ids": [ 1 ]}Responses
Section titled “Responses”UserList
Media typeapplication/json
Array<object>
User represents a user
object
active
Is user active
boolean
avatar_url
URL to the user’s avatar
string
created
string format: date-time
description
The user’s description
string
email
string format: email
followers_count
User counts
integer format: int64
following_count
integer format: int64
full_name
The user’s full name
string
html_url
URL to the user’s gitea page
string
id
The user’s id
integer format: int64
is_admin
Is the user an administrator
boolean
language
User locale
string
last_login
string format: date-time
location
The user’s location
string
login
Login of the user, same as username
string
login_name
Identifier of the user, provided by the external authenticator (if configured)
string
prohibit_login
Is user login prohibited
boolean
restricted
Is user restricted
boolean
source_id
The ID of the user’s Authentication Source
integer format: int64
starred_repos_count
integer format: int64
visibility
User visibility level option: public, limited, private
string
website
The user’s website
string
Example
[ { "login_name": "empty" }]APIForbiddenError is a forbidden error response
Media typeapplication/json
Headers
Section titled “Headers”message
string
url
string
APINotFound is a not found empty response
Media typeapplication/json