Skip to content

Latest commit

 

History

History
56 lines (31 loc) · 1.09 KB

File metadata and controls

56 lines (31 loc) · 1.09 KB
title User Administration | GitHub API

Administration (Enterprise)

  • TOC {:toc}

The User Administration API allows you to promote, demote, suspend, and unsuspend users on a GitHub Enterprise appliance. It is only available to authenticated site administrators. Normal users will receive a 403 response if they try to access it.

Prefix all the endpoints for this API with the following URL:

http(s)://hostname/api/v3

Promote an ordinary user to a site administrator

PUT /users/:username/site_admin

<%= fetch_content(:put_content_length) %>

Response

<%= headers 204 %>

Demote a site administrator to an ordinary user

DELETE /users/:username/site_admin

You can demote any user account except your own.

Response

<%= headers 204 %>

Suspend a user

PUT /users/:username/suspended

You can suspend any user account except your own.

<%= fetch_content(:put_content_length) %>

Response

<%= headers 204 %>

Unsuspend a user

DELETE /users/:username/suspended

Response

<%= headers 204 %>