GitLab API
  1. users
GitLab API
  • 默认分类
  • groups
    • Gets a list of access requests for a group.
      GET
    • Requests access for the authenticated user to a group.
      POST
    • Approves an access request for the given user.
      PUT
    • Denies an access request for the given user.
      DELETE
    • Get a groups list
      GET
    • Create a group. Available only for users who can create groups.
      POST
    • Get list of owned groups for authenticated user
      GET
    • Update a group. Available only for users who can administrate groups.
      PUT
    • Get a single group, with containing projects.
      GET
    • Remove a group.
      DELETE
    • Get a list of projects in this group.
      GET
    • Transfer a project to the group namespace. Available only for admin.
      POST
    • Get a list of group issues
      GET
    • Gets a list of group or project members viewable by the authenticated user.
      GET
    • Adds a member to a group or project.
      POST
    • Gets a member of a group or project.
      GET
    • Updates a member of a group or project.
      PUT
    • Removes a user from a group or project.
      DELETE
    • Get group level notification level settings, defaults to Global
      GET
    • Update group level notification level settings, defaults to Global
      PUT
  • projects
    • Gets a list of access requests for a project.
    • Requests access for the authenticated user to a project.
    • Approves an access request for the given user.
    • Denies an access request for the given user.
    • Get a list of project +awardable+ award emoji
    • Award a new Emoji
    • Get a specific award emoji
    • Delete a +awardables+ award emoji
    • Get a list of project +awardable+ award emoji
    • Award a new Emoji
    • Get a specific award emoji
    • Delete a +awardables+ award emoji
    • Get a list of project +awardable+ award emoji
    • Award a new Emoji
    • Get a specific award emoji
    • Delete a +awardables+ award emoji
    • Get a list of project +awardable+ award emoji
    • Award a new Emoji
    • Get a specific award emoji
    • Delete a +awardables+ award emoji
    • Get a list of project +awardable+ award emoji
    • Award a new Emoji
    • Get a specific award emoji
    • Delete a +awardables+ award emoji
    • Get a list of project +awardable+ award emoji
    • Award a new Emoji
    • Get a specific award emoji
    • Delete a +awardables+ award emoji
    • Get all project boards
    • Get a project repository branches
    • Create branch
    • Get a single branch
    • Delete a branch
    • Protect a single branch
    • Unprotect a single branch
    • deleteV3ProjectsIdRepositoryMergedBranches
    • Get a project builds
    • Get builds for a specific commit of a project
    • Get a specific build of a project
    • Download the artifacts file from build
    • Download the artifacts file from build
    • Get a trace of a specific build of a project
    • Cancel a specific build of a project
    • Retry a specific build of a project
    • Erase build (remove artifacts and build trace)
    • Keep the artifacts to prevent them from being deleted
    • Trigger a manual build
    • Get a project repository commits
    • Commit multiple file changes as one commit
    • Get a specific commit of a project
    • Get the diff for a specific commit of a project
    • Get a commit's comments
    • Post comment to commit
    • Cherry pick commit into a branch
    • Get a commit's statuses
    • Post status to a commit
    • Get a specific project's deploy keys
    • Add new deploy key to currently authenticated user
    • Get single deploy key
    • Delete deploy key for a project
    • Enable a deploy key for a project
    • Disable a deploy key for a project
    • Get a specific project's deploy keys
    • Add new deploy key to currently authenticated user
    • Get single deploy key
    • Delete deploy key for a project
    • Enable a deploy key for a project
    • Disable a deploy key for a project
    • Get all deployments of the project
    • Gets a specific deployment
    • Get all environments of the project
    • Creates a new environment
    • Updates an existing environment
    • Deletes an existing environment
    • Get a file from repository
    • Create new file in repository
    • Update existing file in repository
    • Delete an existing file in repository
    • Set a time estimate for a project issue
    • Reset the time estimate for a project issue
    • Add spent time for a project issue
    • Reset spent time for a project issue
    • Show time stats for a project issue
    • Get a list of project issues
    • Create a new project issue
    • Get a single project issue
    • Update an existing issue
    • Delete a project issue
    • Move an existing issue
    • Get all labels of the project
    • Create a new label
    • Delete an existing label
    • Update an existing label. At least one optional parameter is required.
    • Gets a list of group or project members viewable by the authenticated user.
    • Adds a member to a group or project.
    • Gets a member of a group or project.
    • Updates a member of a group or project.
    • Removes a user from a group or project.
    • Get a list of merge request diff versions
    • Get a single merge request diff version
    • Set a time estimate for a project merge_request
    • Reset the time estimate for a project merge_request
    • Add spent time for a project merge_request
    • Reset spent time for a project merge_request
    • Show time stats for a project merge_request
    • List merge requests
    • Create a merge request
    • Delete a merge request
    • Get a single merge request
    • Update a merge request
    • Get a single merge request
    • Update a merge request
    • Get the commits of a merge request
    • Show the merge request changes
    • Merge a merge request
    • Cancel merge if "Merge When Pipeline Succeeds" is enabled
    • Get the comments of a merge request
    • Post a comment to a merge request
    • List issues that will be closed on merge
    • Get the commits of a merge request
    • Show the merge request changes
    • Merge a merge request
    • Cancel merge if "Merge When Pipeline Succeeds" is enabled
    • Get the comments of a merge request
    • Post a comment to a merge request
    • List issues that will be closed on merge
    • Get a list of project milestones
    • Create a new project milestone
    • Get a single project milestone
    • Update an existing project milestone
    • Get all issues for a single project milestone
    • Get a list of project +noteable+ notes
    • Create a new +noteable+ note
    • Get a single +noteable+ note
    • Update an existing +noteable+ note
    • Delete a +noteable+ note
    • Get a list of project +noteable+ notes
    • Create a new +noteable+ note
    • Get a single +noteable+ note
    • Update an existing +noteable+ note
    • Delete a +noteable+ note
    • Get a list of project +noteable+ notes
    • Create a new +noteable+ note
    • Get a single +noteable+ note
    • Update an existing +noteable+ note
    • Delete a +noteable+ note
    • Get project level notification level settings, defaults to Global
    • Update project level notification level settings, defaults to Global
    • Get all Pipelines of the project
    • Create a new pipeline
    • Gets a specific pipeline for the project
    • Retry failed builds in the pipeline
    • Cancel all builds in the pipeline
    • Get project hooks
    • Add hook to project
    • Get a project hook
    • Update an existing project hook
    • Deletes project hook
    • Get a list of visible projects for authenticated user
    • Get a projects list for authenticated user
    • Create new project
    • Get an owned projects list for authenticated user
    • Gets starred project for the authenticated user
    • Get all projects for admin user
    • Search for projects the current user has access to
    • Create new project for a specified user. Only available to admin users.
    • Get a single project
    • Update an existing project
    • Remove a project
    • Get events for a single project
    • Fork new project for the current user or provided namespace.
    • Archive a project
    • Unarchive a project
    • Star a project
    • Unstar a project
    • Mark this project as forked from another
    • Remove a forked_from relationship
    • Share the project with a group
    • deleteV3ProjectsIdShareGroupId
    • Upload a file
    • Get the users list of a project
    • Get all project snippets
    • Create a new project snippet
    • Get a single project snippet
    • Update an existing project snippet
    • Delete a project snippet
    • Get a raw project snippet
    • Get a project repository tree
    • Get a raw file contents
    • Get a raw file contents
    • Get a raw blob contents by blob sha
    • Get an archive of the repository
    • Compare two branches, tags, or commits
    • Get repository contributors
    • Get runners available for project
    • Enable a runner for a project
    • Disable project's runner
    • Set asana service for project
    • Set assembla service for project
    • Set bamboo service for project
    • Set bugzilla service for project
    • Set buildkite service for project
    • Set builds-email service for project
    • Set campfire service for project
    • Set custom-issue-tracker service for project
    • Set drone-ci service for project
    • Set emails-on-push service for project
    • Set external-wiki service for project
    • Set flowdock service for project
    • Set gemnasium service for project
    • Set hipchat service for project
    • Set irker service for project
    • Set jira service for project
    • Set kubernetes service for project
    • Set mattermost-slash-commands service for project
    • Set slack-slash-commands service for project
    • Set pipelines-email service for project
    • Set pivotaltracker service for project
    • Set pushover service for project
    • Set redmine service for project
    • Set slack service for project
    • Set mattermost service for project
    • Set teamcity service for project
    • Delete a service for project
    • Get the service settings for project
    • Trigger a slash command for mattermost-slash-commands
    • Trigger a slash command for slack-slash-commands
    • Subscribe to a resource
    • Unsubscribe from a resource
    • Subscribe to a resource
    • Unsubscribe from a resource
    • Subscribe to a resource
    • Unsubscribe from a resource
    • Subscribe to a resource
    • Unsubscribe from a resource
    • Get a project repository tags
    • Create a new repository tag
    • Get a single repository tag
    • Delete a repository tag
    • Add a release note to a tag
    • Update a tag's release note
    • Create a todo on an issuable
    • Create a todo on an issuable
    • Trigger a GitLab project build
    • Get triggers list
    • Create a trigger
    • Get specific trigger of a project
    • Delete a trigger
    • Get project variables
    • Create a new variable in a project
    • Get a specific variable from a project
    • Update an existing variable from a project
    • Delete an existing variable from a project
    • Get the lists of a project board
    • Create a new board list
    • Get a list of a project board
    • Moves a board list to a new position
    • Delete a board list
  • internal
    • postV3InternalAllowed
    • postV3InternalLfsAuthenticate
    • getV3InternalMergeRequestUrls
    • getV3InternalDiscover
    • getV3InternalCheck
    • getV3InternalBroadcastMessage
    • postV3InternalTwoFactorRecoveryCodes
  • issues
    • Get currently authenticated user's issues
  • keys
    • Get single ssh key by id. Only available to admin users
  • ci
    • Validation of .gitlab-ci.yml content
  • namespaces
    • Get a namespaces list
  • notification_settings
    • Get global notification level settings and email, defaults to Participate
    • Update global notification level settings and email, defaults to Participate
  • runners
    • Get runners available for user
    • Get all runners - shared and specific
    • Get runner's details
    • Update runner's details
    • Remove a runner
  • snippets
    • Get a snippets list for authenticated user
    • Create new snippet
    • List all public snippets current_user has access to
    • Get a single snippet
    • Update an existing snippet
    • Remove snippet
    • Get a raw snippet
  • hooks
    • Get the list of system hooks
    • Create a new system hook
    • Test a hook
    • Delete a hook
  • todos
    • Get a todo list
    • Mark all todos as done
    • Mark a todo as done
  • users
    • Get the list of users
      GET
    • Create a user. Available only for admins.
      POST
    • Get a single user
      GET
    • Update a user. Available only for admins.
      PUT
    • Delete a user. Available only for admins.
      DELETE
    • Add an SSH key to a specified user. Available only for admins.
      POST
    • Get the SSH keys of a specified user. Available only for admins.
      GET
    • Delete an existing SSH key from a specified user. Available only for admins.
      DELETE
    • Add an email address to a specified user. Available only for admins.
      POST
    • Get the emails addresses of a specified user. Available only for admins.
      GET
    • Delete an email address of a specified user. Available only for admins.
      DELETE
    • Block a user. Available only for admins.
      PUT
    • Unblock a user. Available only for admins.
      PUT
    • Get the contribution events of a specified user
      GET
  • user
    • Get the currently authenticated user
    • Get the currently authenticated user's SSH keys
    • Add a new SSH key to the currently authenticated user
    • Get a single key owned by currently authenticated user
    • Delete an SSH key from the currently authenticated user
    • Get the currently authenticated user's email addresses
    • Add new email address to the currently authenticated user
    • Get a single email address owned by the currently authenticated user
    • Delete an email address from the currently authenticated user
  • deploy_keys
    • getV3DeployKeys
  • session
    • Login to get token
  • application
    • Get the current application settings
    • Modify application settings
  • sidekiq
    • Get the Sidekiq queue metrics
    • Get the Sidekiq process metrics
    • Get the Sidekiq job statistics
    • Get the Sidekiq Compound metrics. Includes queue, process, and job statistics
  • licenses
    • Get the list of the available license template
    • Get the text for a specific license
  • templates
    • Get the list of the available license template
    • Get the text for a specific license
    • Get the list of the available template
    • Get the text for a specific template present in local filesystem
    • Get the list of the available template
    • Get the text for a specific template present in local filesystem
    • Get the list of the available template
    • Get the text for a specific template present in local filesystem
  • gitignores
    • Get the list of the available template
    • Get the text for a specific template present in local filesystem
  • gitlab_ci_ymls
    • Get the list of the available template
    • Get the text for a specific template present in local filesystem
  • dockerfiles
    • Get the list of the available template
    • Get the text for a specific template present in local filesystem
  • version
    • Get the version information of the GitLab instance.
  1. users

Update a user. Available only for admins.

PUT
/v3/users/{id}
users
Update a user. Available only for admins.
请求示例请求示例
Shell
JavaScript
Java
Swift
curl --location -g --request PUT 'http://gitlab.example.com/v3/users/'
响应示例响应示例
{
  "name": "string",
  "username": "string",
  "id": "string",
  "state": "string",
  "avatar_url": "string",
  "web_url": "string",
  "created_at": "string",
  "is_admin": "string",
  "bio": "string",
  "location": "string",
  "skype": "string",
  "linkedin": "string",
  "twitter": "string",
  "website_url": "string",
  "organization": "string",
  "last_sign_in_at": "string",
  "confirmed_at": "string",
  "email": "string",
  "theme_id": "string",
  "color_scheme_id": "string",
  "projects_limit": "string",
  "current_sign_in_at": "string",
  "identities": {
    "provider": "string",
    "extern_uid": "string"
  },
  "can_create_group": "string",
  "can_create_project": "string",
  "two_factor_enabled": "string",
  "external": "string"
}

请求参数

Path 参数
id
integer <int32>
必需
The ID of the user
Body 参数application/x-www-form-urlencoded
email
string 
可选
The email of the user
password
string 
可选
The password of the new user
name
string 
可选
The name of the user
username
string 
可选
The username of the user
skype
string 
可选
The Skype username
linkedin
string 
可选
The LinkedIn username
twitter
string 
可选
The Twitter username
website_url
string 
可选
The website of the user
organization
string 
可选
The organization of the user
projects_limit
integer <int32>
可选
The number of projects a user can create
extern_uid
string 
可选
The external authentication provider UID
provider
string 
可选
The external provider
bio
string 
可选
The biography of the user
location
string 
可选
The location of the user
admin
boolean 
可选
Flag indicating the user is an administrator
can_create_group
boolean 
可选
Flag indicating the user can create groups
confirm
boolean 
可选
Flag indicating the account needs to be confirmed
external
boolean 
可选
Flag indicating the user is an external user

返回响应

🟢200成功
application/json
Update a user. Available only for admins.
Body
Get the currently authenticated user
name
string 
可选
username
string 
可选
id
string 
可选
state
string 
可选
avatar_url
string 
可选
web_url
string 
可选
created_at
string 
可选
is_admin
string 
可选
bio
string 
可选
location
string 
可选
skype
string 
可选
linkedin
string 
可选
twitter
string 
可选
website_url
string 
可选
organization
string 
可选
last_sign_in_at
string 
可选
confirmed_at
string 
可选
email
string 
可选
theme_id
string 
可选
color_scheme_id
string 
可选
projects_limit
string 
可选
current_sign_in_at
string 
可选
identities
object (Identity) 
可选
provider
string 
可选
extern_uid
string 
可选
can_create_group
string 
可选
can_create_project
string 
可选
two_factor_enabled
string 
可选
external
string 
可选

【GitLab】API开发者 微信交流群

用微信扫右侧二维码,加入【GitLab】API开发者 交流群,互助沟通

扫码加入交流群
上一页
Get a single user
下一页
Delete a user. Available only for admins.
Built with