mirror of
https://github.com/matrix-org/matrix-spec
synced 2026-03-26 04:54:10 +01:00
distinguish between retrieving an empty backup and a nonexistent backup
This commit is contained in:
parent
7713a0f402
commit
3918ed3c38
|
|
@ -333,7 +333,8 @@ On success, returns a JSON object in the same form as the request body of `PUT
|
||||||
|
|
||||||
Error codes:
|
Error codes:
|
||||||
|
|
||||||
- M_NOT_FOUND: The session is not present in the backup.
|
- M_NOT_FOUND: The session is not present in the backup, or the requested
|
||||||
|
backup version does not exist.
|
||||||
|
|
||||||
##### `GET /room_keys/keys/${roomId}?version=$v`
|
##### `GET /room_keys/keys/${roomId}?version=$v`
|
||||||
|
|
||||||
|
|
@ -342,8 +343,8 @@ Retrieve the all the keys for the given room from the backup.
|
||||||
On success, returns a JSON object in the same form as the request body of `PUT
|
On success, returns a JSON object in the same form as the request body of `PUT
|
||||||
/room_keys/keys/${roomId}?version=$v`.
|
/room_keys/keys/${roomId}?version=$v`.
|
||||||
|
|
||||||
If no keys are found, then this endpoint returns a successful response with
|
If the backup version exists but no keys are found, then this endpoint returns
|
||||||
body:
|
a successful response with body:
|
||||||
|
|
||||||
```
|
```
|
||||||
{
|
{
|
||||||
|
|
@ -351,6 +352,10 @@ body:
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
|
Error codes:
|
||||||
|
|
||||||
|
- `M_NOT_FOUND`: The requested backup version does not exist.
|
||||||
|
|
||||||
##### `GET /room_keys/keys?version=$v`
|
##### `GET /room_keys/keys?version=$v`
|
||||||
|
|
||||||
Retrieve all the keys from the backup.
|
Retrieve all the keys from the backup.
|
||||||
|
|
@ -358,9 +363,8 @@ Retrieve all the keys from the backup.
|
||||||
On success, returns a JSON object in the same form as the request body of `PUT
|
On success, returns a JSON object in the same form as the request body of `PUT
|
||||||
/room_keys/keys?version=$v`.
|
/room_keys/keys?version=$v`.
|
||||||
|
|
||||||
|
If the backup version exists but no keys are found, then this endpoint returns
|
||||||
If no keys are found, then this endpoint returns a successful response with
|
a successful response with body:
|
||||||
body:
|
|
||||||
|
|
||||||
```
|
```
|
||||||
{
|
{
|
||||||
|
|
@ -368,6 +372,10 @@ body:
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
|
Error codes:
|
||||||
|
|
||||||
|
- `M_NOT_FOUND`: The requested backup version does not exist.
|
||||||
|
|
||||||
#### Deleting keys
|
#### Deleting keys
|
||||||
|
|
||||||
##### `DELETE /room_keys/keys/${roomId}/${sessionId}?version=$v`
|
##### `DELETE /room_keys/keys/${roomId}/${sessionId}?version=$v`
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue