From 9b046cbc0411c49f4973ec00f1fd3cc0d2e5e55c Mon Sep 17 00:00:00 2001 From: "Paul \"LeoNerd\" Evans" Date: Mon, 8 Jun 2015 18:21:11 +0100 Subject: [PATCH 1/3] Tiny fix to embedded YAML fragment --- specification/25_application_service_api.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/specification/25_application_service_api.rst b/specification/25_application_service_api.rst index 87184950..8236b2de 100644 --- a/specification/25_application_service_api.rst +++ b/specification/25_application_service_api.rst @@ -72,7 +72,7 @@ An example HS configuration required to pass traffic to the AS is: users: - exclusive: true - - regex: @irc.freenode.net/.* + regex: @irc.freenode.net/.* Home Server -> Application Service API From fc1e01f373eb07a016fd3940bff810f8d74d9508 Mon Sep 17 00:00:00 2001 From: "Paul \"LeoNerd\" Evans" Date: Thu, 9 Jul 2015 19:52:34 +0100 Subject: [PATCH 2/3] Add a small note about the meaning of the 'target' field --- specification/30_server_server_api.rst | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/specification/30_server_server_api.rst b/specification/30_server_server_api.rst index 48434075..2eb80f92 100644 --- a/specification/30_server_server_api.rst +++ b/specification/30_server_server_api.rst @@ -553,6 +553,11 @@ them in a JSON object and signing it using the JSON signing algorithm. The resulting signatures are added as an Authorization header with an auth scheme of X-Matrix. +Note that the target field should include the full path starting with +``/_matrix/...``, including the ``?`` and any query parameters if present, but +should not include the leading ``https:``, nor the destination server's +hostname. + Step 1 sign JSON: .. code:: From 5f391b5617b022b6ae32f84f384973b446859d6c Mon Sep 17 00:00:00 2001 From: "Paul \"LeoNerd\" Evans" Date: Thu, 9 Jul 2015 20:28:48 +0100 Subject: [PATCH 3/3] Also document the directory server federation API --- specification/30_server_server_api.rst | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/specification/30_server_server_api.rst b/specification/30_server_server_api.rst index 2eb80f92..f0aab39a 100644 --- a/specification/30_server_server_api.rst +++ b/specification/30_server_server_api.rst @@ -747,3 +747,22 @@ result field. If such is present, then the result should contain only a field of that name, with no others present. If not, the result should contain as much of the user's profile as the home server has available and can make public. +Directory +--------- + +The server API for directory queries is also based on Federation Queries. + +Querying directory information:: + + Query type: directory + + Arguments: + room_alias: the room alias to query + + Returns: JSON object containing the following keys: + room_id: string giving the underlying room ID the alias maps to + servers: list of strings giving the join candidates + +The list of join candidates is a list of server names that are likely to hold +the given room; these are servers that the requesting server may wish to try +joining with. This list may or may not include the server answering the query.