matrix-spec/data/api/client-server/wellknown.yaml
Hagen Echzell c796f35280
Spec for MSC4402: Consistent redirects for .well-known-files
Signed-off-by: Hagen Echzell <hagene@uio.no>
2026-06-22 15:33:31 +02:00

66 lines
2.3 KiB
YAML

# Copyright 2018 New Vector Ltd
# Copyright 2026 Hagen Echzell
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
openapi: 3.1.0
info:
title: Matrix Client-Server Server Discovery API
version: 1.0.0
paths:
/matrix/client:
get:
summary: Gets Matrix server discovery information about the domain.
description: |-
Gets discovery information about the domain. Clients should follow 30x
redirects, carefully avoiding redirect loops, and use normal X.509
certificate validation.
The file may include
additional keys, which MUST follow the Java package naming convention,
e.g. `com.example.myapp.property`. This ensures property names are
suitably namespaced for each application and reduces the risk of
clashes.
{{% boxes/note %}}
This endpoint should be accessed with the hostname of the homeserver's
[server name](/appendices/#server-name) by making a
GET request to `https://hostname/.well-known/matrix/client`.
{{% /boxes/note %}}
Note that this endpoint is not necessarily handled by the homeserver,
but by another webserver, to be used for discovering the homeserver URL.
operationId: getWellknown
responses:
"200":
description: Server discovery information.
content:
application/json:
schema:
$ref: definitions/wellknown/full.yaml
"404":
description: No server discovery information available.
tags:
- Server administration
servers:
- url: "{protocol}://{hostname}{basePath}"
variables:
protocol:
enum:
- http
- https
default: https
hostname:
default: localhost:8008
basePath:
default: /.well-known