mirror of
https://github.com/matrix-org/matrix-spec
synced 2026-03-03 18:24:09 +01:00
Merge pull request #401 from matrix-org/rav/underscore_api_convention
Document convention of using underscores in APIs
This commit is contained in:
commit
2b0b5ffeb8
|
|
@ -72,6 +72,16 @@ MUST be encoded as UTF-8. Clients are authenticated using opaque
|
||||||
``access_token`` strings (see `Client Authentication`_ for details), passed as a
|
``access_token`` strings (see `Client Authentication`_ for details), passed as a
|
||||||
query string parameter on all requests.
|
query string parameter on all requests.
|
||||||
|
|
||||||
|
The names of the API endponts for the HTTP transport follow a convention of
|
||||||
|
using underscores to separate words (for example ``/delete_devices``). The key
|
||||||
|
names in JSON objects passed over the API also follow this convention.
|
||||||
|
|
||||||
|
.. NOTE::
|
||||||
|
There are a few historical exceptions to this rule, such as
|
||||||
|
``/createRoom``. A future version of this specification will address the
|
||||||
|
inconsistency.
|
||||||
|
|
||||||
|
|
||||||
Any errors which occur at the Matrix API level MUST return a "standard error
|
Any errors which occur at the Matrix API level MUST return a "standard error
|
||||||
response". This is a JSON object which looks like:
|
response". This is a JSON object which looks like:
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue