Skip to content

Commit 52cd69e

Browse files
committed
Split into two non-versioned endpoints
1 parent 4517506 commit 52cd69e

File tree

1 file changed

+26
-14
lines changed

1 file changed

+26
-14
lines changed

proposals/2320-identity-versions.md

Lines changed: 26 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -12,17 +12,15 @@ implemented by the identity server it's using (if there is one).
1212

1313
## Proposal
1414

15-
This proposal extends the [`/_matrix/identity/v2`](https://matrix.org/docs/spec/identity_service/r0.2.1#get-matrix-identity-api-v1)
16-
endpoint's response by adding information about the supported versions of the
17-
identity server API and unstable features implemented by the server
18-
to it. Because the current response for this endpoint is an empty object
19-
(which is discarded by the client), the new response would look like:
15+
This proposal adds two endpoints to the identity server API.
16+
17+
### `GET /_matrix/identity/versions`
18+
19+
This endpoint serves information about the versions of the identity server API
20+
this identity server supports. Its response uses the following format:
2021

2122
```json
2223
{
23-
"unstable_features": {
24-
"casefold_email_addresses": true
25-
},
2624
"versions": [
2725
"r0.1.0",
2826
"r0.2.0",
@@ -31,12 +29,26 @@ to it. Because the current response for this endpoint is an empty object
3129
}
3230
```
3331

34-
This response would follow the format of the [`/_matrix/client/versions`](https://matrix.org/docs/spec/client_server/r0.5.0#get-matrix-client-versions) endpoint.
32+
### `GET /_matrix/identity/unstable_features`
33+
34+
This endpoint serves information about the unstable features, i.e. features
35+
specified in a MSC or an unstable version of the Matrix specification but not in
36+
a stable one, supported by the server. Its response uses the following format:
37+
38+
```json
39+
{
40+
"unstable_features": {
41+
"org.matrix.casefold_email_addresses": true
42+
}
43+
}
44+
```
3545

3646
## Alternative solutions
3747

38-
An alternative solution to this issue would be to add a
39-
`/_matrix/identity/versions` endpoint to the identity server API.
40-
This would however add more complexity by adding a new endpoint whereas there's
41-
already an existing endpoint which seems relevant for handling this kind of
42-
information.
48+
Another solution which was considered was using the status check endpoint ([`GET
49+
/_matrix/api/v1`](https://matrix.org/docs/spec/identity_service/latest#get-matrix-identity-api-v1))
50+
to serve this information. This solution was discarded because it's using a
51+
versioned endpoint, which doesn't make sense to advertise the supported versions
52+
of the API to use, and this endpoint was serving both the supported versions and
53+
the supported unstable features, whereas it makes more sense to have each of
54+
these pieces of information served on a different endpoint.

0 commit comments

Comments
 (0)