0
0
Fork 1
mirror of https://mau.dev/maunium/synapse.git synced 2024-12-14 11:43:51 +01:00
synapse/docs/admin_api
Andrew Morgan 73636cab69
Convert admin api docs to markdown (#10089)
So that they render nicely in mdbook (see #10086), and so that we no longer have a mix of structured text languages in our documentation (excluding files outside of `docs/`).
2021-06-03 14:06:03 +01:00
..
account_validity.md Convert admin api docs to markdown (#10089) 2021-06-03 14:06:03 +01:00
delete_group.md Clarifications to the admin api documentation (#7647) 2020-06-05 17:31:05 +01:00
event_reports.md Make reason and score optional for report_event (#10077) 2021-05-27 18:42:23 +01:00
media_admin_api.md Add new admin APIs to remove media by media ID from quarantine. (#10044) 2021-06-02 18:50:35 +01:00
purge_history_api.md Convert admin api docs to markdown (#10089) 2021-06-03 14:06:03 +01:00
purge_room.md Deprecate Shutdown Room and Purge Room Admin API (#8829) 2020-12-10 11:42:48 +00:00
README.rst Clarifications to the admin api documentation (#7647) 2020-06-05 17:31:05 +01:00
register_api.md Convert admin api docs to markdown (#10089) 2021-06-03 14:06:03 +01:00
room_membership.md Clarifications to the admin api documentation (#7647) 2020-06-05 17:31:05 +01:00
rooms.md Add missing entry to the table of contents of room admin API (#10043) 2021-05-24 07:37:30 -04:00
server_notices.md Fix spelling in server notices admin API docs (#5142) 2019-05-06 22:15:02 +01:00
shutdown_room.md Deprecate Shutdown Room and Purge Room Admin API (#8829) 2020-12-10 11:42:48 +00:00
statistics.md Add an admin API for users' media statistics (#8700) 2020-11-05 18:59:12 +00:00
user_admin_api.md Convert admin api docs to markdown (#10089) 2021-06-03 14:06:03 +01:00
version_api.md Convert admin api docs to markdown (#10089) 2021-06-03 14:06:03 +01:00

Admin APIs
==========

This directory includes documentation for the various synapse specific admin
APIs available.

Authenticating as a server admin
--------------------------------

Many of the API calls in the admin api will require an `access_token` for a
server admin. (Note that a server admin is distinct from a room admin.)

A user can be marked as a server admin by updating the database directly, e.g.:

.. code-block:: sql

    UPDATE users SET admin = 1 WHERE name = '@foo:bar.com';

A new server admin user can also be created using the
``register_new_matrix_user`` script.

Finding your user's `access_token` is client-dependent, but will usually be shown in the client's settings.

Once you have your `access_token`, to include it in a request, the best option is to add the token to a request header:

``curl --header "Authorization: Bearer <access_token>" <the_rest_of_your_API_request>``

Fore more details, please refer to the complete `matrix spec documentation <https://matrix.org/docs/spec/client_server/r0.5.0#using-access-tokens>`_.