@@ -130,7 +130,7 @@ paths:
130130 example : " anopaquestring"
131131 version :
132132 type : string
133- description : The backup version
133+ description : The backup version.
134134 example : " 1"
135135 required :
136136 - algorithm
@@ -212,7 +212,7 @@ paths:
212212 example : " anopaquestring"
213213 version :
214214 type : string
215- description : The backup version
215+ description : The backup version.
216216 example : " 1"
217217 required :
218218 - algorithm
@@ -450,7 +450,7 @@ paths:
450450 type : string
451451 name : version
452452 description : |-
453- The backup from which to retrieve the key
453+ The backup from which to retrieve the key.
454454 required : true
455455 x-example : " 1"
456456 - in : path
@@ -569,22 +569,7 @@ paths:
569569 description : " The backup data"
570570 name : backupData
571571 schema :
572- type : object
573- properties :
574- sessions :
575- type : object
576- description : |-
577- A map of session IDs to key data.
578- additionalProperties :
579- allOf :
580- - $ref : " definitions/key_backup_data.yaml"
581- example : {
582- " sessionid1 " : {
583- " ephemeral " : " base64+ephemeral+key" ,
584- " ciphertext " : " base64+ciphertext+of+JSON+data" ,
585- " mac " : " base64+mac+of+ciphertext"
586- }
587- }
572+ $ref : " definitions/room_key_backup.yaml"
588573 responses :
589574 200 :
590575 description : The update succeeded
@@ -645,7 +630,7 @@ paths:
645630 type : string
646631 name : version
647632 description : |-
648- The backup from which to retrieve the key
633+ The backup from which to retrieve the key.
649634 required : true
650635 x-example : " 1"
651636 - in : path
@@ -661,21 +646,7 @@ paths:
661646 ``sessions`` property will be returned (``{"sessions": {}}``).
662647 schema :
663648 type : object
664- properties :
665- sessions :
666- type : object
667- description : |-
668- A map of session IDs to key data.
669- additionalProperties :
670- allOf :
671- - $ref : " definitions/key_backup_data.yaml"
672- example : {
673- " sessionid1 " : {
674- " ephemeral " : " base64+ephemeral+key" ,
675- " ciphertext " : " base64+ciphertext+of+JSON+data" ,
676- " mac " : " base64+mac+of+ciphertext"
677- }
678- }
649+ $ref : " definitions/room_key_backup.yaml"
679650 404 :
680651 description : |-
681652 The backup was not found.
@@ -702,7 +673,7 @@ paths:
702673 type : string
703674 name : version
704675 description : |-
705- The backup from which to delete the key
676+ The backup from which to delete the key.
706677 required : true
707678 x-example : " 1"
708679 - in : path
@@ -761,31 +732,36 @@ paths:
761732 required : true
762733 x-example : " 1"
763734 - in : body
764- description : " The backup data"
735+ description : " The backup data. "
765736 name : backupData
766737 schema :
767738 type : object
768739 properties :
769740 rooms :
770741 type : object
771742 description : |-
772- A map of room IDs to session IDs to key data.
743+ A map of room IDs to room key backup data.
773744 additionalProperties :
774- type : object
775- additionalProperties :
776- allOf :
777- - $ref : " definitions/key_backup_data.yaml"
745+ allOf :
746+ - $ref : " definitions/room_key_backup.yaml"
778747 example : {
779748 " !room:example.org " : {
780749 " sessions " : {
781750 " sessionid1 " : {
782- " ephemeral " : " base64+ephemeral+key" ,
783- " ciphertext " : " base64+ciphertext+of+JSON+data" ,
784- " mac " : " base64+mac+of+ciphertext"
751+ " first_message_index " : 1,
752+ " forwarded_count " : 0,
753+ " is_verified " : true,
754+ " session_data " : {
755+ " ephemeral " : " base64+ephemeral+key" ,
756+ " ciphertext " : " base64+ciphertext+of+JSON+data" ,
757+ " mac " : " base64+mac+of+ciphertext"
758+ }
785759 }
786760 }
787761 }
788762 }
763+ required :
764+ - rooms
789765 responses :
790766 200 :
791767 description : The update succeeded
@@ -846,8 +822,8 @@ paths:
846822 type : string
847823 name : version
848824 description : |-
849- The backup from which to retrieve the keys. If omitted, the keys are
850- retrieved from the current backup.
825+ The backup from which to retrieve the keys.
826+ required : true
851827 x-example : " 1"
852828 responses :
853829 200 :
@@ -860,19 +836,22 @@ paths:
860836 rooms :
861837 type : object
862838 description : |-
863- A map of room IDs to session IDs to key data.
839+ A map of room IDs to room key backup data.
864840 additionalProperties :
865- type : object
866- additionalProperties :
867- allOf :
868- - $ref : " definitions/key_backup_data.yaml"
841+ allOf :
842+ - $ref : " definitions/room_key_backup.yaml"
869843 example : {
870844 " !room:example.org " : {
871845 " sessions " : {
872846 " sessionid1 " : {
873- " ephemeral " : " base64+ephemeral+key" ,
874- " ciphertext " : " base64+ciphertext+of+JSON+data" ,
875- " mac " : " base64+mac+of+ciphertext"
847+ " first_message_index " : 1,
848+ " forwarded_count " : 0,
849+ " is_verified " : true,
850+ " session_data " : {
851+ " ephemeral " : " base64+ephemeral+key" ,
852+ " ciphertext " : " base64+ciphertext+of+JSON+data" ,
853+ " mac " : " base64+mac+of+ciphertext"
854+ }
876855 }
877856 }
878857 }
0 commit comments