admin

Search users according filter conditions

Changed on
get/admin/users

Request

  • Base URL
    https://demo.gitea.com/api/v1
  • Auth
    • HTTP basic
    • or API key in query parameter token
    • or API key in query parameter access_token
    • or API key in header Authorization
    • or API key in query parameter sudo
    • or API key in header Sudo
    • or API key in header X-GITEA-OTP
  • TypeScript
    A function with typed inputs. Its response is checked against the schema.

Query parameters

source_idinteger

ID of the user's login source to search for, 0 means the local users

login_namestring

identifier of the user, provided by the external authenticator

pageinteger

page number of results to return (1-based)

limitinteger

page size of results

sortstring

sort users by attribute. Supported values are "name", "created", "updated" and "id". Default is "name"

orderstring

sort order, either "asc" (ascending) or "desc" (descending). Default is "asc", ignored if "sort" is not specified.

qstring

search term (username, full name, email)

visibilitystring

visibility filter. Supported values are "public", "limited" and "private".

is_activeboolean

filter active users

is_adminboolean

filter admin users

is_restrictedboolean

filter restricted users

is_2fa_enabledboolean

filter 2FA enabled users

is_prohibit_loginboolean

filter login prohibited users

Response

UserList

activeboolean

Is user active

avatar_urlstring

URL to the user's avatar

createdstring date-time
descriptionstring

the user's description

emailstring email
followers_countinteger

user counts

following_countinteger
full_namestring

the user's full name

html_urlstring

URL to the user's gitea page

idinteger

the user's id

is_adminboolean

Is the user an administrator

languagestring

User locale

last_loginstring date-time
locationstring

the user's location

loginstring

login of the user, same as username

login_namestring

identifier of the user, provided by the external authenticator (if configured)

prohibit_loginboolean

Is user login prohibited

restrictedboolean

Is user restricted

source_idinteger

The ID of the user's Authentication Source

starred_repos_countinteger
type'User' | 'Organization' | 'Bot'

the user type

visibility'public' | 'limited' | 'private'

User visibility level option: public, limited, private

websitestring

the user's website

Changes

    • info

      removed the non-success response with the status

    • info

      removed the non-success response with the status

    • info

      added the new optional query request parameter is_2fa_enabled

    • info

      added the new optional query request parameter is_active

    • info

      added the new optional query request parameter is_admin

    • info

      added the new optional query request parameter is_prohibit_login

    • info

      added the new optional query request parameter is_restricted

    • info

      added the new optional query request parameter order

    • info

      added the new optional query request parameter q

    • info

      added the new optional query request parameter sort

    • info

      added the new optional query request parameter visibility

    • info

      added the non-success response with the status