From 415cc20c9ea9226277691cdac40c254eb5477e1e Mon Sep 17 00:00:00 2001 From: DMRobertson Date: Mon, 6 Dec 2021 17:00:17 +0000 Subject: deploy: 8b4b153c9e86c04c7db8c74fde4b6a04becbc461 --- .../admin_api/background_updates.html | 2 +- .../usage/administration/admin_api/federation.html | 348 +++++++++++++++++++++ develop/usage/administration/admin_api/index.html | 2 +- .../admin_api/registration_tokens.html | 2 +- develop/usage/administration/admin_faq.html | 2 +- .../administration/database_maintenance_tools.html | 2 +- develop/usage/administration/index.html | 2 +- develop/usage/administration/request_log.html | 2 +- develop/usage/administration/state_groups.html | 2 +- ...derstanding_synapse_through_grafana_graphs.html | 2 +- .../administration/useful_sql_for_admins.html | 2 +- .../configuration/homeserver_sample_config.html | 2 +- develop/usage/configuration/index.html | 2 +- .../usage/configuration/logging_sample_config.html | 2 +- .../configuration/user_authentication/index.html | 2 +- .../user_authentication/single_sign_on/cas.html | 2 +- .../user_authentication/single_sign_on/index.html | 2 +- .../user_authentication/single_sign_on/saml.html | 2 +- 18 files changed, 365 insertions(+), 17 deletions(-) create mode 100644 develop/usage/administration/admin_api/federation.html (limited to 'develop/usage') diff --git a/develop/usage/administration/admin_api/background_updates.html b/develop/usage/administration/admin_api/background_updates.html index 15fd5f78de..688343ffca 100644 --- a/develop/usage/administration/admin_api/background_updates.html +++ b/develop/usage/administration/admin_api/background_updates.html @@ -99,7 +99,7 @@ diff --git a/develop/usage/administration/admin_api/federation.html b/develop/usage/administration/admin_api/federation.html new file mode 100644 index 0000000000..fca212a992 --- /dev/null +++ b/develop/usage/administration/admin_api/federation.html @@ -0,0 +1,348 @@ + + + + + + Federation - Synapse + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + + + + + + + + + + +
+
+ +
+ +
+ +

Federation API

+

This API allows a server administrator to manage Synapse's federation with other homeservers.

+

Note: This API is new, experimental and "subject to change".

+

List of destinations

+

This API gets the current destination retry timing info for all remote servers.

+

The list contains all the servers with which the server federates, +regardless of whether an error occurred or not. +If an error occurs, it may take up to 20 minutes for the error to be displayed here, +as a complete retry must have failed.

+

The API is:

+

A standard request with no filtering:

+
GET /_synapse/admin/v1/federation/destinations
+
+

A response body like the following is returned:

+
{
+   "destinations":[
+      {
+         "destination": "matrix.org",
+         "retry_last_ts": 1557332397936,
+         "retry_interval": 3000000,
+         "failure_ts": 1557329397936,
+         "last_successful_stream_ordering": null
+      }
+   ],
+   "total": 1
+}
+
+

To paginate, check for next_token and if present, call the endpoint again +with from set to the value of next_token. This will return a new page.

+

If the endpoint does not return a next_token then there are no more destinations +to paginate through.

+

Parameters

+

The following query parameters are available:

+
    +
  • from - Offset in the returned list. Defaults to 0.
  • +
  • limit - Maximum amount of destinations to return. Defaults to 100.
  • +
  • order_by - The method in which to sort the returned list of destinations. +Valid values are: +
      +
    • destination - Destinations are ordered alphabetically by remote server name. +This is the default.
    • +
    • retry_last_ts - Destinations are ordered by time of last retry attempt in ms.
    • +
    • retry_interval - Destinations are ordered by how long until next retry in ms.
    • +
    • failure_ts - Destinations are ordered by when the server started failing in ms.
    • +
    • last_successful_stream_ordering - Destinations are ordered by the stream ordering +of the most recent successfully-sent PDU.
    • +
    +
  • +
  • dir - Direction of room order. Either f for forwards or b for backwards. Setting +this value to b will reverse the above sort order. Defaults to f.
  • +
+

Caution: The database only has an index on the column destination. +This means that if a different sort order is used, +this can cause a large load on the database, especially for large environments.

+

Response

+

The following fields are returned in the JSON response body:

+
    +
  • destinations - An array of objects, each containing information about a destination. +Destination objects contain the following fields: +
      +
    • destination - string - Name of the remote server to federate.
    • +
    • retry_last_ts - integer - The last time Synapse tried and failed to reach the +remote server, in ms. This is 0 if the last attempt to communicate with the +remote server was successful.
    • +
    • retry_interval - integer - How long since the last time Synapse tried to reach +the remote server before trying again, in ms. This is 0 if no further retrying occuring.
    • +
    • failure_ts - nullable integer - The first time Synapse tried and failed to reach the +remote server, in ms. This is null if communication with the remote server has never failed.
    • +
    • last_successful_stream_ordering - nullable integer - The stream ordering of the most +recent successfully-sent PDU +to this destination, or null if this information has not been tracked yet.
    • +
    +
  • +
  • next_token: string representing a positive integer - Indication for pagination. See above.
  • +
  • total - integer - Total number of destinations.
  • +
+

Destination Details API

+

This API gets the retry timing info for a specific remote server.

+

The API is:

+
GET /_synapse/admin/v1/federation/destinations/<destination>
+
+

A response body like the following is returned:

+
{
+   "destination": "matrix.org",
+   "retry_last_ts": 1557332397936,
+   "retry_interval": 3000000,
+   "failure_ts": 1557329397936,
+   "last_successful_stream_ordering": null
+}
+
+

Response

+

The response fields are the same like in the destinations array in +List of destinations response.

+ +
+ + +
+
+ + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/develop/usage/administration/admin_api/index.html b/develop/usage/administration/admin_api/index.html index 9265689824..5e9f17da13 100644 --- a/develop/usage/administration/admin_api/index.html +++ b/develop/usage/administration/admin_api/index.html @@ -99,7 +99,7 @@ diff --git a/develop/usage/administration/admin_api/registration_tokens.html b/develop/usage/administration/admin_api/registration_tokens.html index ae19a40a6d..d0da56c424 100644 --- a/develop/usage/administration/admin_api/registration_tokens.html +++ b/develop/usage/administration/admin_api/registration_tokens.html @@ -99,7 +99,7 @@ diff --git a/develop/usage/administration/admin_faq.html b/develop/usage/administration/admin_faq.html index a77ef2db76..4764fabfd0 100644 --- a/develop/usage/administration/admin_faq.html +++ b/develop/usage/administration/admin_faq.html @@ -99,7 +99,7 @@ diff --git a/develop/usage/administration/database_maintenance_tools.html b/develop/usage/administration/database_maintenance_tools.html index 807ce194bf..34d59ad9d2 100644 --- a/develop/usage/administration/database_maintenance_tools.html +++ b/develop/usage/administration/database_maintenance_tools.html @@ -99,7 +99,7 @@ diff --git a/develop/usage/administration/index.html b/develop/usage/administration/index.html index e89be28fea..a84eae1b68 100644 --- a/develop/usage/administration/index.html +++ b/develop/usage/administration/index.html @@ -99,7 +99,7 @@ diff --git a/develop/usage/administration/request_log.html b/develop/usage/administration/request_log.html index 48dbc3c9fd..1992b56f90 100644 --- a/develop/usage/administration/request_log.html +++ b/develop/usage/administration/request_log.html @@ -99,7 +99,7 @@ diff --git a/develop/usage/administration/state_groups.html b/develop/usage/administration/state_groups.html index f832f6233e..c34c49ec10 100644 --- a/develop/usage/administration/state_groups.html +++ b/develop/usage/administration/state_groups.html @@ -99,7 +99,7 @@ diff --git a/develop/usage/administration/understanding_synapse_through_grafana_graphs.html b/develop/usage/administration/understanding_synapse_through_grafana_graphs.html index 01dc735176..60d825abb7 100644 --- a/develop/usage/administration/understanding_synapse_through_grafana_graphs.html +++ b/develop/usage/administration/understanding_synapse_through_grafana_graphs.html @@ -99,7 +99,7 @@ diff --git a/develop/usage/administration/useful_sql_for_admins.html b/develop/usage/administration/useful_sql_for_admins.html index 4bd9c0268f..6bb965dab7 100644 --- a/develop/usage/administration/useful_sql_for_admins.html +++ b/develop/usage/administration/useful_sql_for_admins.html @@ -99,7 +99,7 @@ diff --git a/develop/usage/configuration/homeserver_sample_config.html b/develop/usage/configuration/homeserver_sample_config.html index a6c467cbb0..ea6e48b14d 100644 --- a/develop/usage/configuration/homeserver_sample_config.html +++ b/develop/usage/configuration/homeserver_sample_config.html @@ -99,7 +99,7 @@ diff --git a/develop/usage/configuration/index.html b/develop/usage/configuration/index.html index 83f9b97641..4960ce1afb 100644 --- a/develop/usage/configuration/index.html +++ b/develop/usage/configuration/index.html @@ -99,7 +99,7 @@ diff --git a/develop/usage/configuration/logging_sample_config.html b/develop/usage/configuration/logging_sample_config.html index 49b385c092..7dd1ce6ac4 100644 --- a/develop/usage/configuration/logging_sample_config.html +++ b/develop/usage/configuration/logging_sample_config.html @@ -99,7 +99,7 @@ diff --git a/develop/usage/configuration/user_authentication/index.html b/develop/usage/configuration/user_authentication/index.html index d7e44679a1..db7fd2b875 100644 --- a/develop/usage/configuration/user_authentication/index.html +++ b/develop/usage/configuration/user_authentication/index.html @@ -99,7 +99,7 @@ diff --git a/develop/usage/configuration/user_authentication/single_sign_on/cas.html b/develop/usage/configuration/user_authentication/single_sign_on/cas.html index b3c5b7c92e..533845e183 100644 --- a/develop/usage/configuration/user_authentication/single_sign_on/cas.html +++ b/develop/usage/configuration/user_authentication/single_sign_on/cas.html @@ -99,7 +99,7 @@ diff --git a/develop/usage/configuration/user_authentication/single_sign_on/index.html b/develop/usage/configuration/user_authentication/single_sign_on/index.html index c382edeb76..9a6a661ea5 100644 --- a/develop/usage/configuration/user_authentication/single_sign_on/index.html +++ b/develop/usage/configuration/user_authentication/single_sign_on/index.html @@ -99,7 +99,7 @@ diff --git a/develop/usage/configuration/user_authentication/single_sign_on/saml.html b/develop/usage/configuration/user_authentication/single_sign_on/saml.html index ba6bae12bf..1735d34f75 100644 --- a/develop/usage/configuration/user_authentication/single_sign_on/saml.html +++ b/develop/usage/configuration/user_authentication/single_sign_on/saml.html @@ -99,7 +99,7 @@ -- cgit 1.5.1