summary refs log tree commit diff
path: root/docs/admin_api/user_admin_api.rst
diff options
context:
space:
mode:
authorHubert Chathi <hubert@uhoreg.ca>2019-08-28 17:33:44 -0700
committerHubert Chathi <hubert@uhoreg.ca>2019-08-28 17:33:44 -0700
commit72d296a7f3b931e426b53f7725ab05b09dc1ea4b (patch)
treecef44e834e13da97f12f25dbcda8c25cd4df6258 /docs/admin_api/user_admin_api.rst
parentCross-signing [1/4] -- hidden devices (#5759) (diff)
parentAdd a link to python's logging config schema (#5926) (diff)
downloadsynapse-72d296a7f3b931e426b53f7725ab05b09dc1ea4b.tar.xz
Merge branch 'develop' into uhoreg/e2e_cross-signing_merged
Diffstat (limited to 'docs/admin_api/user_admin_api.rst')
-rw-r--r--docs/admin_api/user_admin_api.rst39
1 files changed, 39 insertions, 0 deletions
diff --git a/docs/admin_api/user_admin_api.rst b/docs/admin_api/user_admin_api.rst

index 213359d0c0..d0871f9438 100644 --- a/docs/admin_api/user_admin_api.rst +++ b/docs/admin_api/user_admin_api.rst
@@ -84,3 +84,42 @@ with a body of: } including an ``access_token`` of a server admin. + + +Get whether a user is a server administrator or not +=================================================== + + +The api is:: + + GET /_synapse/admin/v1/users/<user_id>/admin + +including an ``access_token`` of a server admin. + +A response body like the following is returned: + +.. code:: json + + { + "admin": true + } + + +Change whether a user is a server administrator or not +====================================================== + +Note that you cannot demote yourself. + +The api is:: + + PUT /_synapse/admin/v1/users/<user_id>/admin + +with a body of: + +.. code:: json + + { + "admin": true + } + +including an ``access_token`` of a server admin.