You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Retrieves the latest version of a specific message by its serial identifier. Requires the **history**[capability](/docs/auth/capabilities).
834
840
835
841
See [updating and deleting messages: retrieving the latest version](/docs/messages/updates-deletes#get) for more information.
836
842
837
843
##### Parameters
838
844
845
+
<Iflang="javascript,nodejs">
839
846
| Parameter | Description | Type |
840
847
|-----------|-------------|------|
841
848
| serialOrMessage | Either the serial identifier string of the message to retrieve, or a [`Message`](/docs/api/realtime-sdk/messages) object containing a populated `serial` field |`string` or [`Message`](/docs/api/realtime-sdk/messages)|
842
849
843
850
##### Returns
844
851
845
852
Returns a promise which, upon success, will be fulfilled with a [`Message`](/docs/api/realtime-sdk/messages) object representing the latest version of the message. Upon failure, the promise will be rejected with an [`ErrorInfo`](/docs/api/realtime-sdk/types#error-info) object which explains the error.
853
+
</If>
854
+
855
+
<Iflang="java">
856
+
| Parameter | Description | Type |
857
+
|-----------|-------------|------|
858
+
| serial | Serial identifier string of the message to retrieve |`string`|
859
+
860
+
##### Returns
861
+
862
+
Returns a [`Message`](/docs/api/realtime-sdk/messages) object representing the latest version of the message.
Publishes an update to an existing message with shallow mixin semantics. Non-null `name`, `data`, and `extras` fields in the provided message will replace the corresponding fields in the existing message, while null fields will be left unchanged. Requires the **message-update-own** or **message-update-any**[capability](/docs/auth/capabilities).
852
876
@@ -859,13 +883,27 @@ See [updating and deleting messages: updates](/docs/messages/updates-deletes#upd
859
883
| message | A [`Message`](/docs/api/realtime-sdk/messages) object containing a populated `serial` field and the fields to update |[`Message`](/docs/api/realtime-sdk/messages)|
860
884
| operation | An optional `MessageOperation` object containing metadata about the update operation. Can include `clientId`, `description`, and `metadata` fields |`MessageOperation` (optional) |
861
885
886
+
<Iflang="javascript,nodejs">
862
887
##### Returns
863
888
864
889
Returns a promise which, upon success, will be fulfilled with an [`UpdateDeleteResult`](/docs/api/realtime-sdk/types#update-delete-result) object containing the new version of the message. Upon failure, the promise will be rejected with an [`ErrorInfo`](/docs/api/realtime-sdk/types#error-info) object which explains the error.
890
+
</If>
891
+
892
+
<Iflang="java">
893
+
##### Returns
894
+
895
+
Returns an [`UpdateDeleteResult`](/docs/api/realtime-sdk/types#update-delete-result) object containing the new version of the message.
Marks a message as deleted by publishing an update with an action of `MESSAGE_DELETE`. This does not remove the message from the server, and the full message history remains accessible. Uses shallow mixin semantics: non-null `name`, `data`, and `extras` fields in the provided message will replace the corresponding fields in the existing message, while null fields will be left unchanged. Requires the **message-delete-own** or **message-delete-any**[capability](/docs/auth/capabilities).
871
909
@@ -878,13 +916,27 @@ See [updating and deleting messages: deletes](/docs/messages/updates-deletes#del
878
916
| message | A [`Message`](/docs/api/realtime-sdk/messages) object containing a populated `serial` field |[`Message`](/docs/api/realtime-sdk/messages)|
879
917
| operation | An optional `MessageOperation` object containing metadata about the delete operation. Can include `clientId`, `description`, and `metadata` fields |`MessageOperation` (optional) |
880
918
919
+
<Iflang="javascript,nodejs">
881
920
##### Returns
882
921
883
922
Returns a promise which, upon success, will be fulfilled with an [`UpdateDeleteResult`](/docs/api/realtime-sdk/types#update-delete-result) object containing the new version of the message. Upon failure, the promise will be rejected with an [`ErrorInfo`](/docs/api/realtime-sdk/types#error-info) object which explains the error.
923
+
</If>
924
+
925
+
<Iflang="java">
926
+
##### Returns
927
+
928
+
Returns an [`UpdateDeleteResult`](/docs/api/realtime-sdk/types#update-delete-result) object containing the new version of the message.
Appends data to an existing message. The supplied `data` field is appended to the previous message's data, while all other fields (`name`, `extras`) replace the previous values if provided. Requires the **message-update-own** or **message-update-any**[capability](/docs/auth/capabilities).
890
942
@@ -897,13 +949,27 @@ See [updating and deleting messages: appends](/docs/messages/updates-deletes#app
897
949
| message | A [`Message`](/docs/api/realtime-sdk/messages) object containing a populated `serial` field and the data to append |[`Message`](/docs/api/realtime-sdk/messages)|
898
950
| operation | An optional `MessageOperation` object containing metadata about the append operation. Can include `clientId`, `description`, and `metadata` fields |`MessageOperation` (optional) |
899
951
952
+
<Iflang="javascript,nodejs">
900
953
##### Returns
901
954
902
955
Returns a promise which, upon success, will be fulfilled with an [`UpdateDeleteResult`](/docs/api/realtime-sdk/types#update-delete-result) object containing the new version of the message. Upon failure, the promise will be rejected with an [`ErrorInfo`](/docs/api/realtime-sdk/types#error-info) object which explains the error.
956
+
</If>
957
+
958
+
<Iflang="java">
959
+
##### Returns
960
+
961
+
Returns an [`UpdateDeleteResult`](/docs/api/realtime-sdk/types#update-delete-result) object containing the new version of the message.
Retrieves all historical versions of a specific message, ordered by version. This includes the original message and all subsequent updates or delete operations. Requires the **history**[capability](/docs/auth/capabilities).
909
975
@@ -916,9 +982,19 @@ See [updating and deleting messages: message versions](/docs/messages/updates-de
916
982
| serialOrMessage | Either the serial identifier string of the message whose versions are to be retrieved, or a [`Message`](/docs/api/realtime-sdk/messages) object containing a populated `serial` field |`string` or [`Message`](/docs/api/realtime-sdk/messages)|
917
983
| params | Optional parameters sent as part of the query string |`Record<string, any>` (optional) |
918
984
985
+
<Iflang="javascript,nodejs">
919
986
##### Returns
920
987
921
988
Returns a promise which, upon success, will be fulfilled with a [`PaginatedResult`](#paginated-result) object containing an array of [`Message`](/docs/api/realtime-sdk/messages) objects representing all versions of the message. Upon failure, the promise will be rejected with an [`ErrorInfo`](/docs/api/realtime-sdk/types#error-info) object which explains the error.
989
+
</If>
990
+
991
+
<Iflang="java">
992
+
#### Returns
993
+
994
+
On success, the returned [`PaginatedResult`](#paginated-result) encapsulates an array of [`Message`](#message) objects corresponding to the current page of results. [`PaginatedResult`](#paginated-result) supports pagination using [`next`](#paginated-result) and [`first`](#paginated-result) methods.
995
+
996
+
Failure to retrieve the message versions will raise an [`AblyException`](/docs/api/realtime-sdk/types#ably-exception)
Retrieves the latest version of a specific message by its serial identifier. Requires the **history**[capability](/docs/auth/capabilities).
475
481
476
482
See [updating and deleting messages: retrieving the latest version](/docs/messages/updates-deletes#get) for more information.
477
483
478
484
##### Parameters
479
485
486
+
<Iflang="javascript,nodejs">
480
487
| Parameter | Description | Type |
481
488
|-----------|-------------|------|
482
489
| serialOrMessage | Either the serial identifier string of the message to retrieve, or a [`Message`](/docs/api/realtime-sdk/messages) object containing a populated `serial` field |`string` or [`Message`](/docs/api/realtime-sdk/messages)|
483
490
484
491
##### Returns
485
492
486
493
Returns a promise which, upon success, will be fulfilled with a [`Message`](/docs/api/realtime-sdk/messages) object representing the latest version of the message. Upon failure, the promise will be rejected with an [`ErrorInfo`](/docs/api/realtime-sdk/types#error-info) object which explains the error.
494
+
</If>
495
+
496
+
<Iflang="java">
497
+
| Parameter | Description | Type |
498
+
|-----------|-------------|------|
499
+
| serial | Serial identifier string of the message to retrieve |`string`|
500
+
501
+
##### Returns
502
+
503
+
Returns a [`Message`](/docs/api/realtime-sdk/messages) object representing the latest version of the message.
Publishes an update to an existing message with shallow mixin semantics. Non-null `name`, `data`, and `extras` fields in the provided message will replace the corresponding fields in the existing message, while null fields will be left unchanged. Requires the **message-update-own** or **message-update-any**[capability](/docs/auth/capabilities).
493
517
@@ -501,13 +525,27 @@ See [updating and deleting messages: updates](/docs/messages/updates-deletes#upd
501
525
| operation | An optional `MessageOperation` object containing metadata about the update operation. Can include `clientId`, `description`, and `metadata` fields |`MessageOperation` (optional) |
502
526
| params | Optional parameters sent as part of the query string |`Record<string, any>` (optional) |
503
527
528
+
<Iflang="javascript,nodejs">
504
529
##### Returns
505
530
506
531
Returns a promise which, upon success, will be fulfilled with an [`UpdateDeleteResult`](/docs/api/realtime-sdk/types#update-delete-result) object containing the new version of the message. Upon failure, the promise will be rejected with an [`ErrorInfo`](/docs/api/realtime-sdk/types#error-info) object which explains the error.
532
+
</If>
533
+
534
+
<Iflang="java">
535
+
##### Returns
536
+
537
+
Returns an [`UpdateDeleteResult`](/docs/api/realtime-sdk/types#update-delete-result) object containing the new version of the message.
Marks a message as deleted by publishing an update with an action of `MESSAGE_DELETE`. This does not remove the message from the server, and the full message history remains accessible. Uses shallow mixin semantics: non-null `name`, `data`, and `extras` fields in the provided message will replace the corresponding fields in the existing message, while null fields will be left unchanged. Requires the **message-delete-own** or **message-delete-any**[capability](/docs/auth/capabilities).
513
551
@@ -521,13 +559,27 @@ See [updating and deleting messages: deletes](/docs/messages/updates-deletes#del
521
559
| operation | An optional `MessageOperation` object containing metadata about the delete operation. Can include `clientId`, `description`, and `metadata` fields |`MessageOperation` (optional) |
522
560
| params | Optional parameters sent as part of the query string |`Record<string, any>` (optional) |
523
561
562
+
<Iflang="javascript,nodejs">
524
563
##### Returns
525
564
526
565
Returns a promise which, upon success, will be fulfilled with an [`UpdateDeleteResult`](/docs/api/realtime-sdk/types#update-delete-result) object containing the new version of the message. Upon failure, the promise will be rejected with an [`ErrorInfo`](/docs/api/realtime-sdk/types#error-info) object which explains the error.
566
+
</If>
567
+
568
+
<Iflang="java">
569
+
##### Returns
570
+
571
+
Returns an [`UpdateDeleteResult`](/docs/api/realtime-sdk/types#update-delete-result) object containing the new version of the message.
Appends data to an existing message. The supplied `data` field is appended to the previous message's data, while all other fields (`name`, `extras`) replace the previous values if provided. Requires the **message-update-own** or **message-update-any**[capability](/docs/auth/capabilities).
533
585
@@ -543,13 +595,27 @@ See [updating and deleting messages: appends](/docs/messages/updates-deletes#app
543
595
| operation | An optional `MessageOperation` object containing metadata about the append operation. Can include `clientId`, `description`, and `metadata` fields |`MessageOperation` (optional) |
544
596
| params | Optional parameters sent as part of the query string |`Record<string, any>` (optional) |
545
597
598
+
<Iflang="javascript,nodejs">
546
599
##### Returns
547
600
548
601
Returns a promise which, upon success, will be fulfilled with an [`UpdateDeleteResult`](/docs/api/realtime-sdk/types#update-delete-result) object containing the new version of the message. Upon failure, the promise will be rejected with an [`ErrorInfo`](/docs/api/realtime-sdk/types#error-info) object which explains the error.
602
+
</If>
603
+
604
+
<Iflang="java">
605
+
##### Returns
606
+
607
+
Returns an [`UpdateDeleteResult`](/docs/api/realtime-sdk/types#update-delete-result) object containing the new version of the message.
Retrieves all historical versions of a specific message, ordered by version. This includes the original message and all subsequent updates or delete operations. Requires the **history**[capability](/docs/auth/capabilities).
555
621
@@ -562,9 +628,19 @@ See [updating and deleting messages: versions](/docs/messages/updates-deletes#ve
562
628
| serialOrMessage | Either the serial identifier string of the message whose versions are to be retrieved, or a [`Message`](/docs/api/realtime-sdk/messages) object containing a populated `serial` field |`string` or [`Message`](/docs/api/realtime-sdk/messages)|
563
629
| params | Optional parameters sent as part of the query string |`Record<string, any>` (optional) |
564
630
631
+
<Iflang="javascript,nodejs">
565
632
##### Returns
566
633
567
634
Returns a promise which, upon success, will be fulfilled with a [`PaginatedResult`](#paginated-result) object containing an array of [`Message`](/docs/api/realtime-sdk/messages) objects representing all versions of the message. Upon failure, the promise will be rejected with an [`ErrorInfo`](/docs/api/realtime-sdk/types#error-info) object which explains the error.
635
+
</If>
636
+
637
+
<Iflang="java">
638
+
#### Returns
639
+
640
+
On success, the returned [`PaginatedResult`](#paginated-result) encapsulates an array of [`Message`](#message) objects corresponding to the current page of results. [`PaginatedResult`](#paginated-result) supports pagination using [`next`](#paginated-result) and [`first`](#paginated-result) methods.
641
+
642
+
Failure to retrieve the message versions will raise an [`AblyException`](/docs/api/realtime-sdk/types#ably-exception)
0 commit comments