Copyright 2019 BlackBerry. All rights reserved.
The entity connected to bbmcore as a client of the BBMDS protocol is known within this documentation as "your application".
"Incoming" messages refer to messages from bbmcore to your application. "Outgoing" messages refer to messages from your application to bbmcore. Lists are always managed by bbmcore, with potential changes sometimes requested by your application via general-purpose and/or case-specific messages, and actual changes reflected in "incoming" messages from bbmcore via List Management Messages.
There is no incoming flow control. bbmcore will send data to your application as fast as it can and will continue sending even if your application is not able to read it.
Your application must resynchronize all BBMDS-sourced data when the connection between itself and bbmcore is re-established, such as when bbmcore starts or restarts. Such re-establishment events will also be used by bbmcore to explicitly notify your application that its entire state may have changed, such as during a device switch or when the setup state changes.
When resynchronization is triggered, it indicates that an unknown number of messages from bbmcore may have been lost. Your application is required to re-request any cached mutable state that was obtained from bbmcore. The application is not required to re-request the entire state of bbmcore. It only needs to re-request information that is currently cached.
Elsewhere in this document, we will describe the responses from bbmcore as being unconditional, with statements like "When your application sends X, bbmcore will respond with Y". This document does not explicitly state the qualification "unless resynchronization occurs" since it always applies. Although these cases are supposed to be infrequent, it is possible that any incoming message may be dropped at any time, in which case a resynchronization will always be triggered afterward. Your application must be capable of dealing with these situations.
Strict validation of input against the schema is not recommended because bbmcore reserves the right to pass deprecated, removed, or otherwise undocumented fields in any messages to your application for its own purposes. Your application must not use or examine fields not documented here.
The "Req" field in each table indicates whether a field is required ("Req") or optional ("Opt"). Optional fields can have a default value, which is indicated in italics on a separate line in the same table cell.
In this document, the term "iff" is used as a shorthand for "if and only if".
This documentation only covers the API constructs supported by BlackBerry Spark Communications Services.
Your users are represented within BlackBerry Spark Communications Services by an identity. These identities represent users within the BlackBerry Infrastructure only. Each identity's primary identifier is called a regId. Your application can associate your existing user accounts or social networks with these identities using the regId.
For historical reasons, some API messages represent regId values as JSON numbers instead of strings. Your application might need to convert between these two representations when using BBMDS. If necessary, you can presume that regId numeric values are always greater than zero and will fit in a 64-bit signed integer. Whenever possible, it is best to represent regId values as a string. When new regId fields are introduced, they will use strings.
Version information in the 'since' fields in various schema objects is a rough human-readable indicator of when that object was added to the protocol. The versioning is really informational only and isn't part of the protocol's semantics.
Protocol versions are expressed as strings of the form "Rn" where n is a positive integer. These release version codes correspond to the values in the BlackBerry Spark Communications Services Developer Guide release notes.
This section describes the URIs used in this protocol. All URIs used by Spark are case-sensitive and have a lower-case prefix identifying the entity type.
Format | Description | Generated By |
---|---|---|
bbmpim://user/id/value | A locally identified "user" record, known to the device. These URIs are usable by BBMDS-Core wherever a "user" URI is specified. | bbmcore |
Name | authToken |
---|---|
Since | 2016.03 |
Direction | Outgoing |
Your application uses this message to provide bbmcore with an updated authToken value. See the 'authTokenState' global for more information on when to use this message.
This message also will trigger setup when it has not yet been started within bbmcore and bbmcore is waiting for the initial (or subsequent) authToken value. See the documentation for the 'setupState' 'NotRequested' enumeration for more information on how setup proceeds after being started by 'authToken'.
Name | Type | Req | Since | Log | Description |
---|---|---|---|---|---|
authToken | string | Req | 2016.03 | No | The token that can be used by the BlackBerry Infrastructure to authenticate and authorize use of the BlackBerry Infrastructure to the identified user. This value will be passed transparently through the BlackBerry Infrastructure. |
userId | string | Req | 2016.03 | No | The user's id within the ecosystem. This value will be passed transparently through the BlackBerry Infrastructure. This value must not change after it has been passed to bbmcore. Passing a different value will cause bbmcore to forget all information associated with the current Spark Communications identity by deleting all data and stopping. |
[ { "authToken": { "authToken": "WW91J3JlIHRob3JvdWdoIQ==", "userId": "BlackBerryUser" } }, { "authToken": { "authToken": " why? ", "userId": "\u0000Very\nstrange\t user #id" } } ]
Name | chatEvent |
---|---|
Since | R7 |
Direction | Incoming |
This message is sent to your application by bbmcore when a chat event is received for a chat in which the local user is a current participant. See 'chatEventSend' for more information about chat events.
Name | Type | Req | Since | Log | Description | ||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
chatId | chat key | Req | R7 | Yes | The id of the chat in which the chat event was received. |
||||||||
data | object | Opt | R7 | Yes | This field contains opaque data managed by your application that was received with the chat event. Bbmcore does not examine or modify this JSON object. This can contain a single JSON object, or it can not exist at all. It cannot contain any other JSON type. |
||||||||
flags | string | Opt | R7 | Yes | Compact read-only flags about the chat event. Each flag that is 'true' has its corresponding letter present in the string. Each flag that is 'false' has its corresponding letter omitted from the string. The letters will always be provided in alphabetical order.
|
||||||||
senderUri | user key | Req | R7 | Yes | Holds the user URI of the sender of this chat event. See the URIs section for information on the URI format. The local user can receive a chat event from one of its other other endpoints, so this can refer to the local user. |
||||||||
tag | string | Req | R7 | Yes | Your application-specified tag that indicates what kind of chat event has been received. |
[ { "chatEvent": { "chatId": "2824", "flags": "", "senderUri": "bbmpim://user/id/12", "tag": "Heartbeat" } }, { "chatEvent": { "chatId": "7", "data": { "Location": { "lat": 0, "long": 0, "place": "Home" } }, "flags": "U", "senderUri": "bbmpim://user/id/0", "tag": "Location" } } ]
Name | chatEventSend |
---|---|
Since | R7 |
Direction | Outgoing |
With this request, your application asks bbmcore to send a chat event to all participants of an existing chat. The chat event will not be stored persistently in the chat mailbox for later delivery and will be sent only to the endpoints of chat participants that are currently connected to the BlackBerry Infrastructure. Chat events are either sent immediately or they fail immediately, and they do not interact with the flow or queue of other outgoing messages within a chat. Endpoints that are not connected when this message is sent will never receive a copy of this message. There is no mechanism to tell if a chat event is delivered to any or all chat participants.
These properties make chat events cheaper in terms of storage and network usage than messages sent with 'chatMessageSend'.
The local user's other connected endpoints can and will receive their own identity's chat events. This endpoint will never receive its own chat events.
This mechanism is useful in cases where applications want to send frequent, timely information to all participants that has no value other than in the moment. For example, an application might want to send live location information from one or more participants to all other participants.
Name | Type | Req | Since | Log | Description |
---|---|---|---|---|---|
chatId | chat key | Req | R7 | Yes | The id of the chat in which the chat event is to be posted. |
data | object | Opt | R7 | Yes | This field contains opaque data managed by your application that is sent with the chat event. Bbmcore does not examine or modify this JSON object. This can contain a single JSON object, or it can not exist at all. It cannot contain any other JSON type. The total size of the 'data' object (encoded as JSON in UTF-8) must not exceed 71680 bytes (70 KB). |
tag | string | Req | R7 | Yes | Your application-specified tag that indicates what kind of chat event is being sent. |
[ { "chatEventSend": { "chatId": "2824", "tag": "Heartbeat" } }, { "chatEventSend": { "chatId": "7", "data": { "Location": { "lat": 0, "long": 0, "place": "Home" } }, "tag": "Location" } } ]
Name | chatHide |
---|---|
Since | R4 |
Direction | Outgoing |
Your application sends this message to bbmcore to mark a chat as hidden. bbmcore will automatically un-hide the chat the next time a message is added to its history.
For a chat that can never become unhidden (such as some chats in the 'Defunct' state), bbmcore will treat a 'chatHide' action as if it were 'chatLeave' to ensure the chat does not linger, forever invisible to the user.
Name | Type | Req | Since | Log | Description | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
chatIds | array | Req | R4 | Yes | An array of ids of the chats that are to be hidden. The following table describes the type of each array element.
|
[ { "chatHide": { "chatIds": [ "6" ] } }, { "chatHide": { "chatIds": [ "2824", "12" ] } } ]
Name | chatInvite |
---|---|
Since | R3 |
Direction | Outgoing |
Send this message to bbmcore to invite one or more participants to an existing chat or resend existing chat invitations to invitees that have not yet joined.
Name | Type | Req | Since | Log | Description | ||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
chatId | string | Req | R3 | Yes | The id of the existing chat to invite the invitees to. |
||||||||||||||||||||||||||||
invitees | array | Req | R3 | Yes | The list of invitees to invite to the chat. If any of the specified invitees are already in the process of being invited by this endpoint, invitations are reissued to them (and only them). Specify an empty list to reissue all of this endpoint's unfulfilled invitations for the chat. When 'chatInvite' is sent for a 1:1 chat, the invitees list must be empty (since the only viable action for a 1:1 chat is to reissue an unfulfilled invitation). The following table describes the type of each array element.
|
[ { "chatInvite": { "chatId": "7", "invitees": [ { "userUri": "bbmpim://user/id/4736" } ] } }, { "chatInvite": { "chatId": "2347", "invitees": [ { "userUri": "bbmpim://user/id/4736" }, { "regId": 2783476 } ] } }, { "chatInvite": { "chatId": "887", "invitees": [ { "pin": "abcd1234", "regId": 123456789 }, { "displayName": "Sue Smith", "pin": "11111111", "regId": 5583673 }, { "userUri": "bbmpim://user/id/4736" } ] } }, { "chatInvite": { "chatId": "1", "invitees": [] } } ]
Name | chatJoined |
---|---|
Since | R11 |
Direction | Incoming |
This message is sent to your application by bbmcore when this endpoint finishes joining a chat started by another identity.
The chat is already in the 'chat' list (so any 'listAdd' for the chat has already been sent), but when the chat was added to that list, it was not yet in 'state' 'Ready'. When 'chatJoined' is sent, the chat has moved to 'state' 'Ready' and your application will start to receive 'listAdd' events for 'chatMessage' elements as messages arrive in the chat. Note that no 'listAdd' event occurs for a 'chatMessage' restored or received while a chat is in 'state' 'Restore'.
No 'chatJoined' message is sent for chats that the local user created themselves on this or another endpoint or when a chat is discovered during reconciliation, including initial reconciliation after setting up a new endpoint.
As an example of how to react to this event, your application could raise a user notification for each recently received unread 'chatMessage' in a joined one-to-one chat. Or, your application could raise a user notification that advertises the existence of a newly joined chat in general.
Name | Type | Req | Since | Log | Description |
---|---|---|---|---|---|
chatId | chat key | Req | R11 | Yes | The id of the chat that this endpoint has finished joining. |
[ { "chatJoined": { "chatId": "2824" } } ]
Name | chatKey |
---|---|
Since | R3 |
Direction | Incoming |
Sent by bbmcore in response to a 'chatKeyExport' request.
This message will not be sent by bbmcore if your application uses the BlackBerry Key Management Service.
Name | Type | Req | Since | Log | Description |
---|---|---|---|---|---|
cookie | string | Req | R3 | Yes | The cookie used to track this response to its 'chatKeyExport' request. |
key | string | Req | R3 | No | The unpadded base64url-encoded chat key. |
mailboxId | string | Req | R3 | Yes | The mailboxId of the chat key for use in external storage. |
[ { "chatKey": { "cookie": "823gudb3d2qwe", "key": "Y2hhdEtleTEyMw", "mailboxId": "123" } } ]
Name | chatKeyExport |
---|---|
Since | R3 |
Direction | Outgoing |
Request that bbmcore return the locally stored chat key for a chat. Iff the 'chatId' exists, this will trigger a 'chatKey' response.
To avoid event loops, your application must only react with 'chatKeyExport' to changes of the chat's 'keyState' to 'Export'. Your application must not react to updates from bbmcore that indicate the chat's 'keyState' is 'Export' when the chat's 'keyState' was already known to your application to be 'Export'. In other words, your application must not export keys unless the chat's 'keyState' is actually changing or being learned for the first time. By following this rule, failed exports will not result in tight event loops and will allow retries (at a minimum on application restart, but also whenever bbmcore decides to toggle the state).
The chat's 'keyState' is not updated in response to this message, and thus must be set to 'Synced' via a 'requestListChange' once the key is successfully stored externally.
This message will be ignored by bbmcore if your application uses the BlackBerry Key Management Service.
Name | Type | Req | Since | Log | Description |
---|---|---|---|---|---|
chatId | chat key | Req | R3 | Yes | The id of the chat to get the key for. |
cookie | string | Req | R3 | Yes | The cookie used to track this request to a 'chatKey' response. |
[ { "chatKeyExport": { "chatId": "123", "cookie": "823gudb3d2qwe" } } ]
Name | chatKeysImport |
---|---|
Since | R3 |
Direction | Outgoing |
Request that bbmcore set one or more chat keys.
Your application should try to include keys for as many chats as possible in a single 'chatKeysImport' request (within BBMDS message size limits) for greater efficiency.
If no chat with a given 'mailboxId' exists, or the chat is not waiting for a key, the request is ignored.
If a chat's key is imported successfully, the chat's 'keyState' will be updated to 'Synced', and if the chat's 'state' was 'Waiting' (for the key) it will be updated to 'Ready'. If the import fails, the chat's 'keyState' and 'state' will remain unchanged.
To avoid event loops, your application must only react with 'chatKeysImport' to changes of a chat's 'keyState' to 'Import'. Your application must not react to updates from bbmcore that indicate the 'keyState' is 'Import' when the 'keyState' was already known to your application to be 'Import'. When your application first learns of a chat (such as after starting up) and its 'keyState' is 'Import', your application should consider that a change and can react to it with 'chatKeysImport'. In other words, your application must not import keys unless the 'keyState' is actually changing or being learned for the first time. By following this rule, failed imports will not result in tight event loops and will allow retries (at a minimum on application restart, but also whenever bbmcore decides to toggle the state).
This message will be ignored by bbmcore if your application uses the BlackBerry Key Management Service.
Name | Type | Req | Since | Log | Description |
---|---|---|---|---|---|
keys | array | Req | R3 | Yes | The list of chat keys to set. |
[ { "chatKeysImport": { "keys": [ { "key": "Y2hhdEtleW1ieDEyMw==", "mailboxId": "mbx123" }, { "key": "Y2hhdEtleW1ieDMyMQ==", "mailboxId": "mbx321" } ] } } ]
Name | chatKeysImportFailure |
---|---|
Since | R4 |
Direction | Incoming |
Indicates that one or more chat keys received in 'chatKeysImport' failed to import.
This message will not be sent by bbmcore if your application uses the BlackBerry Key Management Service.
Name | Type | Req | Since | Log | Description | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
mailboxIds | array | Req | R4 | Yes | The list of mailboxIds that failed to import. The following table describes the type of each array element.
|
[ { "chatKeysImportFailure": { "mailboxIds": [ "mbx1", "mbx3" ] } } ]
Name | chatLeave |
---|---|
Since | R4 |
Direction | Outgoing |
This will first hide the chat (see 'chatHide'), and then begin the process of leaving the chat, eventually resulting in bbmcore deleting all local data related to the chat, notifying the other participants of our departure, and removal of the chat from the 'chat' list. A chat that is being left will not gain any additional incoming or outgoing messages.
Name | Type | Req | Since | Log | Description | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
chatIds | array | Req | R4 | Yes | An array of ids of the chats that are to be left. The following table describes the type of each array element.
|
[ { "chatLeave": { "chatIds": [ "6" ] } }, { "chatLeave": { "chatIds": [ "2824", "12" ] } } ]
Name | chatMessageDelete |
---|---|
Since | R4 |
Direction | Outgoing |
Your application sends this message to bbmcore to request that a chat message be deleted for all the endpoints of the user's identity. Any content or foreign keys for the deleted message are removed. Both incoming and outgoing messages may be deleted. If a message that matches the given chatId and message id is found, bbmcore will respond with an update for the message.
Name | Type | Req | Since | Log | Description |
---|---|---|---|---|---|
chatId | chat key | Req | R4 | Yes | The identifier of the chat containing the message to be deleted. |
id | string (uint64) | Req | R4 | Yes | The unique identifier for the message to be deleted within the provided chat. |
[ { "chatMessageDelete": { "chatId": "64", "id": "256789" } } ]
Name | chatMessageDestroy |
---|---|
Since | R6 |
Direction | Outgoing |
Request that one or many 'chatMessage' entries previously sent by the local user's identity be recalled and destroyed from:
An outgoing message can be destroyed regardless of its delivery state, except that requests to destroy a 'chatMessage' in 'state' 'Failed' will be ignored.
The 'chatMessage' 'recall' state will be updated to reflect the state of the process on the sender endpoint and all recipients' endpoints. There is no guarantee that the recipients have not read the message prior to it being destroyed.
Name | Type | Req | Since | Log | Description |
---|---|---|---|---|---|
chatId | chat key | Req | R6 | Yes | The id of the chat containing the message to be recalled and destroyed. |
messageId | chatMessage key | Opt | R6 | Yes | When present, this is the id of an individual 'chatMessage' that is to be recalled and destroyed within the indicated chat. Only "content" messages can be identified with a 'messageId'. Thus, 'chatMessage' entries with 'tag' values such as 'Admin', 'Gap', 'Join', 'Leave', 'Remove', 'Shred', and 'Subject' cannot be destroyed by indiciating their individual 'messageId'. When not present, all 'chatMessage' entries that have been previously sent by the local user's identity will be recalled and destroyed. Plus, all non-"content" messages (including control messages with the 'tag' values listed above) that have been sent by the local user's identity within the indicated chat will be destroyed from the BlackBerry Infrastructure. Thus, endpoints that have not yet received those control messages shall never receive them or make them available to your application. |
[ { "chatMessageDestroy": { "chatId": "765", "messageId": "256789" } } ]
Name | chatMessageDetach |
---|---|
Since | 2017.02 |
Direction | Outgoing |
Request that bbmcore remove the 'file' and/or 'thumb' attachments locally for a single 'chatMessage'. This message does not change the 'chatMessage' for any other endpoints or identities.
Name | Type | Req | Since | Log | Description |
---|---|---|---|---|---|
chatId | chat key | Req | 2017.02 | Yes | The identifier of the chat containing the 'chatMessage'. |
detachFile | boolean | Opt False | 2017.02 | Yes | Iff present and true, any 'file' attachment will be deleted from the 'chatMessage' iff the 'fileState' of that message is 'Done'. If the 'fileState' is anything else, no 'file' detachment is performed. After detachment, the 'file' field will no longer be present on the 'chatMessage', and the 'fileState' will be set to 'Available'. Thus, in the case of a completed download or upload, the file attachment can be subsequently downloaded by issuing 'chatMessageFileDownload'. The primary reason to detach an upload is to free storage space for old completed uploads that used a 'filePolicy' of 'Move'. The 'chatMessage' 'tag' does not matter and will not change. |
detachThumb | boolean | Opt False | 2017.02 | Yes | Iff present and true, any 'thumb' attachment will be deleted from the 'chatMessage'. The 'thumb' field will no longer be present on the 'chatMessage'. The 'chatMessage' 'tag' does not matter and will not change. |
messageId | string (uint64) | Req | 2017.02 | Yes | The identifier of the 'chatMessage' within the chat identified by 'chatId'. |
[ { "chatMessageDetach": { "chatId": "64", "detachFile": false, "detachThumb": true, "messageId": "6510" } }, { "chatMessageDetach": { "chatId": "64", "detachFile": true, "detachThumb": false, "messageId": "1541" } }, { "chatMessageDetach": { "chatId": "64", "detachFile": true, "detachThumb": true, "messageId": "6581" } } ]
Name | chatMessageFileDownload |
---|---|
Since | 2017.02 |
Direction | Outgoing |
Request that bbmcore start downloading a file attachment for a single 'chatMessage'.
Name | Type | Req | Since | Log | Description |
---|---|---|---|---|---|
chatId | chat key | Req | 2017.02 | Yes | The identifier of the chat containing the 'chatMessage'. |
messageId | string (uint64) | Req | 2017.02 | Yes | The identifier of the 'chatMessage' within the chat identified by 'chatId'. This 'chatMessage' must have a 'fileState' of either 'Available' or 'FailedAvailable' or this request will be ignored by bbmcore. The 'chatMessage' 'tag' does not matter. |
[ { "chatMessageFileDownload": { "chatId": "64", "messageId": "6510" } } ]
Name | chatMessageRead |
---|---|
Since | R4 |
Direction | Outgoing |
Your application sends this message to bbmcore to notify it that incoming messages have been read by the local user. All unread incoming messages in the chat with a 'messageId' less than or equal to that of the specified 'messageId' will be marked as read.
Note that when a chat's 'numUnread' field is zero, then 'chatMessageRead' will have no effect on that chat because that means the chat has no unread incoming messages.
Name | Type | Req | Since | Log | Description |
---|---|---|---|---|---|
chatId | chat key | Req | R4 | Yes | The id of the chat containing the message referred to by 'messageId'. |
messageId | chatMessage key | Req | R4 | Yes | The largest 'messageId' (within the chat referred to by 'chatId') of the messages that are to be marked as read by the local user. |
[ { "chatMessageRead": { "chatId": "2824", "messageId": "786" } } ]
Name | chatMessageRefRemove |
---|---|
Since | R8 |
Direction | Outgoing |
Request that bbmcore remove the 'ref' with the given 'tag' locally for a single 'chatMessage'. This message does not change the 'chatMessage' for any other endpoints or identities.
Name | Type | Req | Since | Log | Description |
---|---|---|---|---|---|
chatId | chat key | Req | R8 | Yes | The identifier of the chat containing the 'chatMessage'. |
messageId | string (uint64) | Req | R8 | Yes | The identifier of the 'chatMessage' within the chat identified by 'chatId'. |
tag | string | Req | R8 | Yes | The 'ref' 'tag' to be removed. If there is a matching 'refBy' on another 'chatMessage', it will also be updated. List updates will result for affected messages, if any. |
[ { "chatMessageRefRemove": { "chatId": "64", "messageId": "6510", "tag": "Edit" } } ]
Name | chatMessageSend |
---|---|
Since | 2017.02 |
Direction | Outgoing |
Send a new message within an existing chat. This will result in a 'listAdd' on the 'listChatMessage' list, and the message will be sent to the BlackBerry Infrastructure and forwarded to the other endpoints that are participating in the chat.
Sending a new message within a 1:1 chat before the invited party has joined can trigger the invitation to be reissued when other conditions are also met. This mechanism achieves a partially automatic user-speed retry of 1:1 chat invitations. There is no automatic mechanism for non-1:1 chats, but invitations for all types of chats can be reissued upon request via 'chatInvite'.
Name | Type | Req | Since | Log | Description | ||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
chatId | chat key | Req | 2017.02 | Yes | The identifier of the chat in which to send the message. |
||||||||||||||||||||||||||||||||||||
content | string | Opt | 2017.02 | No | Holds the text content of the message, when the 'tag' has such a concept; otherwise omitted. The total size of the 'content' in UTF-8 is subject to a cumulative size limit when combined with the size of the 'data' object (encoded as JSON in UTF-8) and the size of the 'thumb' attachment. These three fields combined must not exceed 71680 bytes (70 KB). |
||||||||||||||||||||||||||||||||||||
data | object | Opt | 2017.02 | Yes | This field contains opaque data managed by your application that is sent with the message. Unless specifically noted, bbmcore does not examine or modify this JSON object. This can contain a single JSON object, or it can not exist at all. It cannot contain any other JSON type. Many 'tag' values have a corresponding object defined as a child of the 'data' object with a key equal to the 'tag'. All 'tags' with such a corresponding child of 'data' require that child to be present. Other tags have no such requirement. The 'data' object can also contain other key-value pairs independently from the 'tag'. The total size of the 'data' object (encoded as JSON in UTF-8) is subject to a cumulative size limit when combined with the size of the 'thumb' attachment and the 'content' (also in UTF-8). These three fields combined must not exceed 71680 bytes (70 KB).
|
||||||||||||||||||||||||||||||||||||
file | string | Opt | 2017.02 | No | A path to a large file that is not carried in the message. This file is uploaded by bbmcore automatically. A maximum file size limit of 128 MB is imposed by bbmcore. If your application attempts to attach a file that exceeds this limit, the 'message' will be added to the chat in the 'Failed' state. The size limit may change in future versions. Receiving clients that encounter files that are larger than their maximums will not download them. Attachments from R5 or later endpoints preserve a locally-cleaned version of any suggested attachment filename that the sender provided by including it as the leaf filename of this path. Attachments that did not have a suggested filename will use an implementation-defined locally-assigned sequential or random filename. |
||||||||||||||||||||||||||||||||||||
filePolicy | string | Opt | 2017.02 | Yes | This enumeration tells bbmcore what to do with the file referenced by 'file'. For all other documentation, please see 'thumbPolicy'. This field is an enumeration.
|
||||||||||||||||||||||||||||||||||||
isControl | boolean | Opt False | R9 | Yes | Set the 'control' flag ('C') on the 'chatMessage'. See the 'chatMessage' 'flags' field for details. |
||||||||||||||||||||||||||||||||||||
neverCountUnread | boolean | Opt False | R9 | Yes | Set the 'neverCountUnread' flag ('N') on the 'chatMessage'. See the 'chatMessage' 'flags' field for details. |
||||||||||||||||||||||||||||||||||||
ref | array | Opt | R5 | Yes | A 'chatMessage' can reference other messages or be referenced by other messages. All references are directional and known to both messages involved. If message A references message B, then A has an entry in its 'ref' array with the 'messageId' of B, and B has an entry in its 'refBy' array that counts the reference from A. Each reference in the 'ref' array has an application-specified 'tag' that indicates what kind of reference it is. A single message can only have one 'ref' for each tag string. Your application uses 'tag' strings to allow multiple different kinds of references between messages. For example, a message could both 'Quote' one message and 'Edit' another. Each reference in the 'refBy' array has the same application-specified tag. A single message can have multiple references to it with the same 'tag'. To find all messages that refer to a given message, use 'requestListMatching' with the 'tag' and the 'messageId' of the referred-to message. Because the number of incoming references to a message can be large, only the most recent referring message is identified by 'newestRef' in 'refBy', along with a count of the total number of referring messages. When there are no references to any other messages, the 'ref' field is omitted. The following table describes the type of each array element.
|
||||||||||||||||||||||||||||||||||||
tag | string | Req | 2017.02 | Yes | Indicates the type of message. Your application may include any arbitrary value in the 'tag' field that is meaningful to it, with one exception: bbmcore will ignore any 'chatMessageSend' from your application that uses one of the reserved tags: 'Join', 'Leave', 'Subject', 'Gap', 'Shred', 'Clear', 'Admin', or 'Remove'. This field is an enumeration.
|
||||||||||||||||||||||||||||||||||||
thumb | string | Opt | 2017.02 | No | A path to a small file that is carried in the message. The thumb file may contain no more than 56320 bytes (55 KB). The total size of the thumb file is subject to a cumulative size limit when combined with the size of the 'data' object (encoded as JSON in UTF-8) and the size of the 'content' (in UTF-8). These three fields combined must not exceed 71680 bytes (70 KB). Attachments from R5 or later endpoints preserve a locally-cleaned version of any suggested attachment filename that the sender provided by including it as the leaf filename of this path. Attachments that did not have a suggested filename will use an implementation-defined locally-assigned sequential or random filename. |
||||||||||||||||||||||||||||||||||||
thumbPolicy | string | Opt | 2017.02 | Yes | This enumeration tells bbmcore what to do with the file referenced by 'thumb'. If not provided a default of Copy is used. Note that in the case of Delete and Move, bbmcore _will_ _not_ delete the source file if the request was invalid to the point of being indecipherable, or if bbmcore lacks permissions to delete the file (including when the source file is open and the OS doesn't permit open files to be deleted). This field is an enumeration.
|
[ { "chatMessageSend": { "chatId": "436", "content": "Hello, folks. This is a test.", "isControl": false, "neverCountUnread": false, "tag": "Text" } }, { "chatMessageSend": { "chatId": "436", "content": "Cats are funny!", "data": { "File": { "contentType": "suggestedFilename", "suggestedFilename": "funny_cat.jpg" }, "priority": "None" }, "file": "/picture/funny_cat.jpg", "filePolicy": "Delete", "isControl": false, "neverCountUnread": false, "tag": "File", "thumb": "/picture/funny_cat_small.jpg", "thumbPolicy": "Delete" } }, { "chatMessageSend": { "chatId": "3", "content": "Follow me on Glympse: www.glympse.com", "data": { "Glympse": { "id": "123234232" }, "priority": "None" }, "isControl": false, "neverCountUnread": false, "tag": "Glympse" } }, { "chatMessageSend": { "chatId": "4", "content": "Follow me on Glympse: www.glympse.com", "data": { "GlympseRequest": { "duration": 300 }, "priority": "None" }, "isControl": false, "neverCountUnread": false, "tag": "GlympseRequest" } }, { "chatMessageSend": { "chatId": "5", "content": "The answer is 2.", "data": { "Quote": { "source": "John Doe", "text": "What is 1+1?", "timestamp": 562737600 }, "priority": "None" }, "isControl": false, "neverCountUnread": false, "tag": "Quote" } }, { "chatMessageSend": { "chatId": "6", "content": "Me too!", "data": { "ReferencedUpdate": { "type": "PersonalMessage", "update": "Looking forward to this weekend." }, "priority": "None" }, "isControl": false, "neverCountUnread": false, "tag": "ReferencedUpdate" } }, { "chatMessageSend": { "chatId": "7", "isControl": false, "neverCountUnread": false, "tag": "Screencap" } }, { "chatMessageSend": { "chatId": "8", "content": "Important Message", "data": { "priority": "High" }, "isControl": false, "neverCountUnread": false, "ref": [ { "messageId": "634", "tag": "Quote" }, { "messageId": "6", "tag": "Thread" } ], "tag": "Text" } }, { "chatMessageSend": { "chatId": "9", "content": "My Location", "data": { "Location": { "altitude": "3", "city": "Halifax", "country": "Canada", "horizontalAccuracy": "90", "latitude": "44.64692", "longitude": "-63.57822", "name": "Halifax, NS, Canada", "postalCode": "", "state": "NS", "street": "" }, "priority": "None" }, "isControl": false, "neverCountUnread": false, "tag": "Location" } }, { "chatMessageSend": { "chatId": "1000", "content": "Let's discuss this with the others.", "data": { "MediaConf": { "requireAuth": true, "url": "https://conf.bbm.bbmenterprise.com/join?appId=example" }, "priority": "None" }, "isControl": false, "neverCountUnread": false, "tag": "MediaConf" } }, { "chatMessageSend": { "chatId": "10", "data": { "Call": { "callType": "Video", "duration": 326, "eventType": "Ended" }, "priority": "None" }, "isControl": false, "neverCountUnread": false, "tag": "Call" } }, { "chatMessageSend": { "chatId": "11", "content": "https://www.blackberry.com/us/en/products/blackberry-spark-platform", "data": { "Link": { "descr": "BlackBerry Spark is the only Enterprise of Things (EoT) platform designed and built for ultra-secure hyperconnectivity from the kernel to the edge.", "image": "https://rimblogs.files.wordpress.com/2017/06/business-man-secure.png", "name": "BlackBerry Spark", "title": "BlackBerry Spark: The EoT Platform for Ultra-secure Hyperconnectivity", "url": "https://www.blackberry.com/us/en/products/blackberry-spark-platform" }, "priority": "None" }, "isControl": false, "neverCountUnread": false, "tag": "Link" } }, { "chatMessageSend": { "chatId": "11", "content": "@John Doe, can you please respond to the request from @Jane Doe.", "data": { "mentions": { "users": [ { "len": 9, "pos": 0, "regId": "1602329767" }, { "len": 9, "pos": 55, "regId": "1404567733" } ] }, "priority": "None" }, "isControl": false, "neverCountUnread": false, "tag": "Text" } } ]
Name | chatMessageState |
---|---|
Since | R4 |
Direction | Incoming |
bbmcore sends this message in response to a 'chatMessageStateGet' request.
Name | Type | Req | Since | Log | Description | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
cookie | string | Opt | R4 | Yes | An opaque value that is echoed back to your application if it was specified in the request. |
||||||||||
states | array | Req | R4 | Yes | The list of per-recipient message delivery states. This will be empty if the message does not exist or if no detailed delivery state is known for the message. The following table describes the type of each array element.
|
[ { "chatMessageState": { "cookie": "asdgjh2095hga984598hg", "states": [] } }, { "chatMessageState": { "cookie": "asdgjh2095hga984598hg", "states": [ { "state": "Read", "userUri": "bbmpim://user/id/23576" } ] } }, { "chatMessageState": { "states": [ { "state": "Delivered", "userUri": "bbmpim://user/id/5" }, { "state": "Read", "userUri": "bbmpim://user/id/6" } ] } } ]
Name | chatMessageStateGet |
---|---|
Since | R4 |
Direction | Outgoing |
Your application sends this request to ask for the per-recipient message delivery state details for a particular message in a chat. If bbmcore accepts the request, it will respond with a 'chatMessageState' response.
Name | Type | Req | Since | Log | Description |
---|---|---|---|---|---|
chatId | chat key | Req | R4 | Yes | The id of the chat containing the message referred to by 'messageId'. |
cookie | string | Opt | R4 | Yes | An opaque value supplied by your application that will be echoed back in the response. |
messageId | chatMessage key | Req | R4 | Yes | The id of the message (within the chat referred to by 'chatId') for which information is to be returned. |
[ { "chatMessageStateGet": { "chatId": "12", "messageId": "256789" } }, { "chatMessageStateGet": { "chatId": "234754", "cookie": "slggjq3240987g0987", "messageId": "8" } } ]
Name | chatParticipantTimes |
---|---|
Since | R5 |
Direction | Incoming |
bbmcore sends this message in response to a 'chatParticipantTimesGet' request.
Name | Type | Req | Since | Log | Description | ||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
cookie | string | Opt | R5 | Yes | An opaque value that is echoed back to your application if it was specified in the request. |
||||||||||||||||||||||||||||||||||
times | array | Req | R5 | Yes | The list of per-participant message delivery times. This will be empty if the specified chat or participant does not exist. The following table describes the type of each array element.
|
[ { "chatParticipantTimes": { "cookie": "asdgjh2095hga984598hg", "times": [] } }, { "chatParticipantTimes": { "cookie": "asdgjh2095hga984598hg", "times": [ { "delivered": 12345, "userUri": "bbmpim://user/id/23576" } ] } }, { "chatParticipantTimes": { "times": [ { "delivered": 12345, "read": 12346, "userUri": "bbmpim://user/id/5" }, { "read": 7124, "userUri": "bbmpim://user/id/6" }, { "userUri": "bbmpim://user/id/7" } ] } } ]
Name | chatParticipantTimesGet |
---|---|
Since | R5 |
Direction | Outgoing |
Your application sends this request to ask for the message delivery time details for a particular participant in a chat. If bbmcore accepts the request, it will respond with a 'chatParticipantTimes' response.
Name | Type | Req | Since | Log | Description |
---|---|---|---|---|---|
chatId | chat key | Req | R5 | Yes | The id of the chat whose participants are being queried. |
cookie | string | Opt | R5 | Yes | An opaque value supplied by your application that will be echoed back in the response. |
userUri | user key | Opt | R5 | Yes | Iff present, then only the information for the one participant with this 'user' URI will be returned. Otherwise, information about all of the chat's participants will be returned. |
[ { "chatParticipantTimesGet": { "chatId": "12" } }, { "chatParticipantTimesGet": { "chatId": "234754", "cookie": "slggjq3240987g0987", "userUri": "bbmpim://user/id/123" } } ]
Name | chatStart |
---|---|
Since | 2017.02 |
Direction | Outgoing |
This message requests that a new chat be started. When successful, a 'listAdd' will be emitted for the new 'chat' element. Otherwise, bbmcore will respond with a 'chatStartFailed' message.
If 'isOneToOne' is true and a 1:1 chat already exists for the invitee, bbmcore will respond with a 'chatStartFailed' with a reason of 'AlreadyExists' and the 'chatId' of that existing chat.
Name | Type | Req | Since | Log | Description | ||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
cookie | string | Req | 2017.02 | Yes | An opaque string generated by your application that will be included in the resulting 'listAdd' or 'chatStartFailed' message. |
||||||||||||||||||||||||||||
data | object | Opt | R6 | No | This field contains opaque data managed by your application. This data can be read or written by any participant. Concurrent writes are resolved in a way that all participants will eventually see the same steady-state outcome. This field is suitable for shared chat metadata that changes infrequently such a chat avatar URL, the identifiers of external resources associated with the chat, or a per-chat setting shared by all participants. Data that changes frequently should be sent to all participants via the 'data' field of 'chatMessage' instead. The the 'data', encoded as JSON in UTF-8, must not exceed 71680 bytes (70 KB). |
||||||||||||||||||||||||||||
invitePolicy | string | Opt ParticipantsOnly | R4 | Yes | The policy that controls who may invite participants to the chat. This only applies when the 'isOneToOne' field is absent or false. This field is an enumeration.
|
||||||||||||||||||||||||||||
invitees | array | Req | 2017.02 | Yes | Holds the list of invitees to invite to the chat. When 'isOneToOne' is true, this list must contain exactly one entry. Otherwise, it may contain zero or more entries. The following table describes the type of each array element.
|
||||||||||||||||||||||||||||
isOneToOne | boolean | Opt False | R3 | Yes | When true, the chat is the singular 1:1 chat between the local user and the other party. bbmcore ensures that only one such non-Defunct chat per remote party will exist at a time. Otherwise, the chat is a multi-party chat, even if there are fewer than two remote parties. |
||||||||||||||||||||||||||||
localData | object | Opt | R6 | No | This field contains opaque local-only data that is associated with this chat and managed by your application. This data is stored locally on this endpoint only. |
||||||||||||||||||||||||||||
privateData | object | Opt | R7 | No | This field contains opaque data managed by your application. This data can be read or written only by endpoints belonging to the local user's identity. Concurrent writes are resolved in a way that all endpoints will eventually see the same steady-state outcome. This field is suitable for chat metadata that changes infrequently and is private to the local user's identity but needs to be known by all the local user's endpoints. The 'privateData', encoded as JSON in UTF-8, must not exceed 71680 bytes (70 KB). |
||||||||||||||||||||||||||||
subject | string | Opt | 2017.02 | No | The subject of the chat. This field has a maximum size of 128 code points. When omitted, this defaults to the empty string. |
[ { "chatStart": { "cookie": "chocolate", "invitePolicy": "ParticipantsOnly", "invitees": [ { "userUri": "bbmpim://user/id/3646" } ], "isOneToOne": true, "subject": "New 1:1 chat" } }, { "chatStart": { "cookie": "vanilla", "invitePolicy": "ParticipantsOnly", "invitees": [], "isOneToOne": false, "subject": "" } }, { "chatStart": { "cookie": "wafer-thin", "data": { "appContextId": "miZPa8ef1Xj5Vl7YmSyYVxKdbJDBIMNK", "avatar": "https://avatar.server/8GWl2rOF" }, "invitePolicy": "AdminsOnly", "invitees": [ { "userUri": "bbmpim://user/id/4573" }, { "chatKeyRolling": true, "displayName": "Cookie Monster", "regId": 10004723564 } ], "isOneToOne": false, "localData": { "someData": "someValue" }, "privateData": { "chatNickname": "Friends from Work", "notificationPriority": "High", "pinned": false }, "subject": "New conference" } } ]
Name | chatStartFailed |
---|---|
Since | 2017.02 |
Direction | Incoming |
Sent by bbmcore when a 'chatStart' request has failed.
Name | Type | Req | Since | Log | Description | ||||||
---|---|---|---|---|---|---|---|---|---|---|---|
chatId | chat key | Opt | R6 | Yes | This is present iff the 'reason' is 'AlreadyExists'. This is the id of the existing 1:1 chat. |
||||||
cookie | string | Req | 2017.02 | Yes | The opaque value supplied by your application when issuing the 'chatStart' request that has failed. |
||||||
reason | string | Req | 2017.02 | Yes | The reason that the 'chatStart' request failed. This field is an enumeration.
|
[ { "chatStartFailed": { "cookie": "chocolate", "reason": "None" } }, { "chatStartFailed": { "chatId": "12", "cookie": "vanilla", "reason": "AlreadyExists" } } ]
Name | chatTyping |
---|---|
Since | R4 |
Direction | Outgoing |
Your application sends this to bbmcore when it considers the user to have started typing in a chat. This event will be relayed in real-time to other participants of the chat.
Received typing events are reported to receivers via the 'typing' list. On the receiving endpoints, the typing state of a user automatically decays back to "not typing" after a short delay or when a message from them is added to the chat's history. There is no need for your application to inform bbmcore when a user stops typing.
In certain conditions, bbmcore may not actually transmit the typing notification to the other participants of the chat. These conditions include when there are no previous messages in the chat (on the local endpoint) or when the previous messages in the chat are older than five minutes. Filtering the events in this way helps optimize message transmission for cases where it is very unlikely that the other participants are expected to read a typing indicator on their endpoints.
It is recommended that your application wait a short delay after the commencement of typing before issuing this request. Short messages can often be typed in a few seconds, and it is often better to simply send the message itself instead of a typing notification followed by the message in very short succession.
Name | Type | Req | Since | Log | Description |
---|---|---|---|---|---|
chatId | chat key | Req | R4 | Yes | The id of the chat in which the local user is typing. |
messageId | chatMessage key | Opt | R6 | Yes | If supplied, this is the id of the 'chatMessage' the local user is taking the action against as indicated by the 'tag' field. This field is ignored when the 'tag' isn't present or when the messageId isn't known to bbmcore. |
tag | string | Opt | R6 | Yes | Your application-specified tag that indicates what kind of typing action the local user is performing. For example, this may be used to indicate that the local user is taking a picture to send, recording a voice note, or editing an existing message. When omitted, receivers will assume the local user is typing a message. |
[ { "chatTyping": { "chatId": "2824" } }, { "chatTyping": { "chatId": "7", "tag": "VoiceNote" } }, { "chatTyping": { "chatId": "88", "messageId": "375", "tag": "Edit" } } ]
Name | endpointDeregister |
---|---|
Since | R4 |
Direction | Outgoing |
Requests that bbmcore de-register endpoint(s). This will forward the de-register request to the BlackBerry Infrastructure, and result in an 'endpointDeregisterResult' with the given cookie from bbmcore.
De-registering an endpoint will revoke its registration on the BlackBerry Infrastructure and remove it from the Spark Communications identity's list of registered endpoints. If currently connected to the BlackBerry Infrastructure, it will be disconnected as soon as possible and wiped.
Name | Type | Req | Since | Log | Description |
---|---|---|---|---|---|
cookie | string | Req | R4 | Yes | An opaque value to be included in the associated 'endpointDeregisterResult'. |
endpointId | string | Opt | R4 | Yes | The identifier of the endpoint to de-register, or to keep if the 'keep' flag is true. When no endpointId is provided all endpoints will be de-registered, including the one issuing the de-register request. The current list of endpoints can be obtained using the 'endpointsGet' request. |
keep | boolean | Opt | R11 | Yes | Flag indicating if the endpointId provided should be kept, and all other endpoints de-registered. |
[ { "endpointDeregister": { "cookie": "cookie1", "endpointId": "13124523943944079cdc729adeff25a2A4gD2diIgj5Jd3SG6HFfda" } }, { "endpointDeregister": { "cookie": "cookie2", "endpointId": "13124523943944079cdc729adeff25a2A4gD2diIgj5Jd3SG6HFfda", "keep": true } }, { "endpointDeregister": { "cookie": "cookie3" } } ]
Name | endpointDeregisterResult |
---|---|
Since | R4 |
Direction | Incoming |
The result of an 'endpointDeregister' request.
Name | Type | Req | Since | Log | Description | ||||||
---|---|---|---|---|---|---|---|---|---|---|---|
cookie | string | Req | R4 | Yes | The opaque value supplied in the 'endpointDeregister' this result is associated to. |
||||||
result | string | Req | R4 | Yes | The result of the update. This field is an enumeration.
|
[ { "endpointDeregisterResult": { "cookie": "chocolate", "result": "Success" } }, { "endpointDeregisterResult": { "cookie": "chocolate", "result": "Failure" } } ]
Name | endpointDeregistered |
---|---|
Since | R6 |
Direction | Incoming |
The local endpoint is no longer registered with the BlackBerry Infrastructure.
bbmcore will wipe and stop in order to forget all information associated with the endpoint, including its user identity. One notable exception is the 'endpointId', will normally will not change.
Your application must delete all information associated with the previous Spark Communications identity. To go through setup again, your application should collect fresh identity credentials from the user and use fresh tokens.
[ { "endpointDeregistered": {} } ]
Name | endpointUpdate |
---|---|
Since | R4 |
Direction | Outgoing |
Requests that bbmcore update the identified endpoint's registration details. This will result in an 'endpointUpdateResult' with the given cookie from bbmcore.
This message should be called for the local endpointId before registering (when the 'setupState' is 'NotRequested'i) to set the potentially new endpoint's description on the BlackBerry Infrastructure.
Name | Type | Req | Since | Log | Description |
---|---|---|---|---|---|
cookie | string | Req | R4 | Yes | An opaque value to be included in the associated 'endpointUpdateResult'. |
description | string | Req | R4 | No | The human-readable description of the device/OS the endpoint is installed on. This should never be empty. This will be truncated to at most 2000 Unicode Code Points. |
endpointId | string | Opt | R4 | Yes | The identifier of the endpoint to update obtained from an 'endpoints' response. If omitted, the local endpointId is used. |
nickname | string | Req | R4 | No | The name assigned to the endpoint by the end-user; empty if none assigned. This will be truncated to at most 2000 Unicode Code Points. |
[ { "endpointUpdate": { "cookie": "chocolate", "description": "Apple iPhone 8s (iOS v10.1)", "endpointId": "13124523943944079cdc729adeff25a2A4gD2diIgj5Jd3SG6HFfda", "isLegacyDelegate": true, "nickname": "" } }, { "endpointUpdate": { "cookie": "chocolate", "description": "Gumshoe OS", "isLegacyDelegate": false, "nickname": "S.M.A.R.T. Watch" } } ]
Name | endpointUpdateResult |
---|---|
Since | R4 |
Direction | Incoming |
The result of an 'endpointUpdate' request.
Name | Type | Req | Since | Log | Description | ||||||
---|---|---|---|---|---|---|---|---|---|---|---|
cookie | string | Req | R4 | Yes | The opaque value supplied in the 'endpointUpdate' this result is associated to. |
||||||
result | string | Req | R4 | Yes | The result of the update. This field is an enumeration.
|
[ { "endpointUpdateResult": { "cookie": "chocolate", "result": "Success" } }, { "endpointUpdateResult": { "cookie": "chocolate", "result": "Failure" } } ]
Name | endpoints |
---|---|
Since | R4 |
Direction | Incoming |
The response to the 'endpointsGet' message. All registered endpoints are included in the 'registeredEndpoints' array.
Name | Type | Req | Since | Log | Description | ||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
cookie | string | Req | R4 | Yes | The opaque value supplied in the 'endpointsGet' this result is associated to. |
||||||||||||||||||||||||||||||||||||||||||||||
maxEndpoints | number (uint64) | Opt | R4 | Yes | The maximum number of persistent endpoints that can be registered for this identity. This field will always be present when the 'result' is 'Success'. |
||||||||||||||||||||||||||||||||||||||||||||||
registeredEndpoints | array | Opt | R4 | Yes | The Spark Communications identity's registered endpoints. This field will always be present when the 'result' is 'Success'. The following table describes the type of each array element.
|
||||||||||||||||||||||||||||||||||||||||||||||
result | string | Req | R4 | Yes | The result of the request. This field is an enumeration.
|
[ { "endpoints": { "cookie": "chocolate", "result": "Failure" } }, { "endpoints": { "cookie": "chocolate", "maxEndpoints": 3, "registeredEndpoints": [ { "description": "BlackBerry KEYone", "endpointId": "13124523943944079cdc729adeff25a2A4gD2diIgj5Jd3SG6HFfda", "isCurrent": false, "isEphemeral": false, "isLegacyDelegate": false, "nickname": "Work Phone" }, { "description": "Debian GNU/Linux 9.0", "endpointId": "53484523943944079cdc729adeff25a2A4gD2diIgj5Jd3Sfsdlij3", "isCurrent": false, "isEphemeral": false, "isLegacyDelegate": true, "nickname": "Work PC" }, { "description": "NVIDIA Shield K1", "endpointId": "fjdsrlgj458944079cdc729adeff25a2A4gD2diIgj5Jd3f35HF569", "isCurrent": false, "isEphemeral": false, "isLegacyDelegate": false, "nickname": "Personal Tablet" } ], "result": "Success" } } ]
Name | endpointsGet |
---|---|
Since | R4 |
Direction | Outgoing |
Requests that bbmcore retrieve all of the Spark Communications identity's registered endpoints and reply with an 'endpoints' message.
Endpoints are individual application installations associated to the same Spark Communications identity. Such an identity can have zero or more endpoints, with a maximum enforced by the BlackBerry Infrastructure.
Name | Type | Req | Since | Log | Description |
---|---|---|---|---|---|
cookie | string | Req | R4 | Yes | An opaque value to be returned in the associated 'endpoints' response. |
[ { "endpointsGet": { "cookie": "13124523-9439-4407-9cdc-729adeff25a2" } } ]
Name | identities |
---|---|
Since | R6 |
Direction | Incoming |
The response to the 'identitiesGet' message.
Name | Type | Req | Since | Log | Description | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
cookie | string | Req | R6 | Yes | The opaque value supplied in the 'identitiesGet' message this result is associated to. |
||||||||||
info | array | Opt | R6 | Yes | The set of identity information found. Each identifier in the request that corresponds to a known identity will have an entry in this array. Each identifier in the request that does not correspond to a known identity will be omitted from this array. The following table describes the type of each array element.
|
||||||||||
result | string | Req | R6 | Yes | The result of the request. This field is an enumeration.
|
[ { "identities": { "cookie": "arrowroot", "result": "Failure" } }, { "identities": { "cookie": "arrowroot", "identities": [ { "appUserId": "23jr95yrr03oe", "regId": "4855746228" }, { "appUserId": "2kfjj5g45kfk4", "regId": "1000002393" }, { "appUserId": "1", "regId": "1" } ], "result": "Success" } } ]
Name | identitiesGet |
---|---|
Since | R6 |
Direction | Outgoing |
Requests that the given list of identities, either application user ids or Spark Communications regIds, be resolved to find the associated identity information, and returned via an 'identities' message.
Identities for which identity information cannot be found are omitted from the results.
Overlapping 'identitiesGet' requests are issued in parallel. Issuing too many parallel requests at once can exceed system limits and cause those requests to fail.
Name | Type | Req | Since | Log | Description | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
appUserIds | array | Opt | R6 | Yes | A list of application user ids to lookup. Either this or 'regIds' must be specified. The following table describes the type of each array element.
|
||||||||||
cookie | string | Req | R6 | Yes | An opaque value to be returned in the associated 'identities' response. |
||||||||||
regIds | array | Opt | R6 | Yes | A list of Spark Communications regIds to lookup. Either this or 'appUserIds' must be specified. A maximum of 50 identities can be present in one request. If more identities are present, 'identities' will return a 'Failure'. The following table describes the type of each array element.
|
[ { "identitiesGet": { "appUserIds": [ "21389hfdhf983", "rhabawe434g3" ], "cookie": "13124523-9439-4407-9cdc-729adeff25a2" } }, { "identitiesGet": { "cookie": "13124523-9439-4407-9cdc-729adeff25a2", "regIds": [ "1872374576594", "95303948244" ] } } ]
Name | listAdd |
---|---|
Since | 2.0 |
Direction | Incoming |
Bbmcore may send this message at any time to insert new elements into a list.
This message contains full element states. All attributes marked as required are also required by this message. Optional attributes are set to their default values if not present.
Either the list attribute must be specified or both the type/id attributes must be specified.
Name | Type | Req | Since | Log | Description | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
cookie | string | Opt | 2.1 | Yes | Holds an optional cookie that was previously generated by your application and included in an outgoing request. This attribute should be omitted for add events that were not specifically requested by your application. Your application must gracefully handle unknown cookies and the case where a cookie it passed to bbmcore is never echoed back. Each outgoing message that includes a cookie will document the circumstances in which bbmcore will echo that cookie back to your application and in which lists. |
||||||||||
elements | array | Opt | 2.0 | Yes | Holds the list elements. Includes a full state of the element. Elements must include all attributes marked as required in the schema. Any optionl attributes will be set to default values. See the documentation for this list type for the element schema. If the 'elements' attribute is omitted, it is treated equivalent to the empty set and this message becomes a no-op. The following table describes the type of each array element.
|
||||||||||
type | string | Opt | 2.1 | Yes | Determines which list the elements belong to. This must be a list type defined elsewhere in the protocol. |
[ { "listAdd": { "elements": [ { "chatId": "8475", "content": "Hello world!", "flags": "I", "messageId": "793873", "recall": "None", "senderUri": "bbmpim://user/id/29", "state": "Delivered", "stateIsPartial": false, "tag": "Text", "timestamp": 30987309874 }, { "chatId": "5", "flags": "I", "messageId": "93874", "recall": "None", "senderUri": "bbmpim://user/id/29", "state": "Delivered", "stateIsPartial": false, "tag": "Join", "timestamp": 30987309921 } ], "type": "chatMessage" } } ]
Name | listAll |
---|---|
Since | 2.1 |
Direction | Incoming |
Replaces the contents of a list. At its option, bbmcore may send this message at any time to replace the entire list contents or to clear the contents of the list. This is also sent in response to a 'requestListAll' message.
'listAll' does not directly contain the new element set. It is a marker indicating that it will be followed by a group of 'listChunk' messages. The last chunk in the group will contain the attribute 'last' set to true. Bbmcore may send any number of chunks and any of the chunks may be empty. This message never appears on its own. It is always followed by a sequence of 'listChunk' messages and it is always contiguous with those 'listChunk' messages.
Name | Type | Req | Since | Log | Description |
---|---|---|---|---|---|
type | string | Req | 2.1 | Yes | Determines which list the elements belong to. This must be a list type defined elsewhere in the protocol. |
[ { "listAll": { "type": "chat" } } ]
Name | listChange |
---|---|
Since | 2.1 |
Direction | Incoming |
Changes attributes of one or more elements in the list. This does not insert or remove elements. At its option, bbmcore may send this message at any time to change existing elements of a list. The elements may appear in any order. The only required attributes are the primary keys of the elements. All other attributes that are normally required are optional. If omitted, the attributes retain their existing values. If specified, the attributes are modified.
Name | Type | Req | Since | Log | Description | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
cookie | string | Opt | 2.1 | Yes | Holds an optional cookie that was previously generated by your application and included in an outgoing request. This attribute should be omitted for add events that were not specifically requested by your application. Your application must gracefully handle unknown cookies and the case where a cookie it passed to bbmcore is never echoed back. Each outgoing message that includes a cookie will document the circumstances in which bbmcore will echo that cookie back to your application and in which lists. |
||||||||||
elements | array | Opt | 2.0 | Yes | Holds the list elements. Includes the primary key of the element, along with any attributes that have changed. Elements may include any subset of attributes listed in the element schema that includes the primary key(s), regardless of whether those attributes are marked as required. Any omitted attributes will remain unchanged. See the documentation for this list type for the element schema. If the 'elements' attribute is omitted, it is treated equivalent to the empty set and this message becomes a no-op. The following table describes the type of each array element.
|
||||||||||
type | string | Opt | 2.1 | Yes | Determines which list the elements belong to. This must be a list type defined elsewhere in the protocol. |
[ { "listChange": { "elements": [ { "chatId": "793873", "state": "Ready" } ], "type": "chat" } } ]
Name | listChunk |
---|---|
Since | 2.1 |
Direction | Incoming |
Used to send a subset of list elements to your application. One or more 'listChunk' messages will follow a 'listAll' or 'listElements' message. The leading message and the set of 'listChunk' messages that follow it are considered a single logical message. 'listChunk' messages contain full states for the set of elements that go with the trigger message. That is, all attributes marked as required in the element schema must also be present in the 'listChunk' message. All attributes marked as optional but not present in the 'listChunk' element must be considered to be unset or have their default value, as documented in the list's definition.
When your application receives the leading message, it starts gathering elements from subsequent 'listChunk' messages until it receives a 'listChunk' with the 'last' attribute present and true. At that point, all the messages are processed together. A header message and its 'listChunk' messages must be contiguous.
Name | Type | Req | Since | Log | Description | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
elements | array | Req | 2.1 | Yes | Holds the list elements. Includes a full state of the element. Elements must include all attributes marked as required in the schema. Any optional attributes will be set to default values. See the documentation for this list type for the element schema. If the elements set is empty, this clears the elements referred to in the trigger message. The following table describes the type of each array element.
|
||||||||||
last | boolean | Opt False | 2.1 | Yes | Determines if this is the last chunk in the sequence. The sequence of 'listChunk' messages is not processed until your application recieves the last chunk. |
||||||||||
type | string | Req | 2.1 | Yes | Determines which list the elements belong to. This must be a list type defined elsewhere in the protocol. |
[ { "listChunk": { "elements": [], "last": false, "type": "chat" } }, { "listChunk": { "elements": [ { "chatId": "38267", "flags": "O", "keyState": "Export", "lastActivity": 1098730987, "lastMessage": 15, "localData": {}, "mailboxId": "mbx123", "numMessages": 10, "restorePoint": 0, "state": "Ready", "subject": "All your base" }, { "chatId": "6", "expiry": 3600, "flags": "AP", "invitePolicy": "AdminsOnly", "keyState": "Synced", "lastActivity": 10987300000, "lastMessage": 10293873870, "localData": { "someData": "someValue" }, "mailboxId": "", "numMessages": 1000, "restorePoint": 500, "state": "Waiting", "subject": "Are belong to us" } ], "last": true, "type": "chat" } } ]
Name | listElements |
---|---|
Since | 2.1 |
Direction | Incoming |
Replaces individual elements in a list. At its option, bbmcore may send this message at any time to replace individual elements in the list. This is also sent in response to a 'requestListElements' message. This message differs from 'listChange' in that it contains full states for the elements being changed rather than a delta, and that the element data follows in a sequence of 'listChunk' messages rather than being embedded within the 'listElements' message
'listElements' does not directly contain the new element set. It is a marker indicating that it will be followed by a group of 'listChunk' messages. The last chunk in the group will contain the attribute 'last' set to true. Bbmcore may send any number of chunks and any of the chunks may be empty. This message never appears on its own. It is always followed by a sequence of 'listChunk' messages and it is always contiguous with those 'listChunk' messages.
The order of the elements may be defined by the outgoing message that triggered this response. In the absence of any ordering contract on the outgoing message, the order of the elements in the result is undefined.
Name | Type | Req | Since | Log | Description |
---|---|---|---|---|---|
cookie | string | Opt | 2.1 | Yes | Holds an optional cookie that was previously generated by your application and included in a request. The presence of this field indicates that the elements in the response match exactly the elements included in the requestListElements. If an element is not present, it indicates that the key was unknown to daemon. |
type | string | Req | 2.1 | Yes | Determines the namespace for the ID attribute and the schema for the list elements. For the set of valid list types, see the doc/lists subdirectory. |
[ { "listElements": { "cookie": "23SJFSDF3", "type": "chat" } } ]
Name | listRemove |
---|---|
Since | 2.0 |
Direction | Incoming |
Bbmcore may send this message at any time to remove elements from the list. The elements in 'listRemove' only contain the primary key. No other attributes may be present, even if they are documented as required in the element schema.
Name | Type | Req | Since | Log | Description | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
cookie | string | Opt | 2.1 | Yes | Holds an optional cookie that was previously generated by your application and included in an outgoing request. This attribute should be omitted for remove events that were not specifically requested by your application. Your application must gracefully handle unknown cookies and the case where a cookie it passed to bbmcore is never echoed back. Each outgoing message that includes a cookie will document the circumstances in which bbmcore will echo that cookie back to your application and in which lists. |
||||||||||
elements | array | Opt | 2.0 | Yes | Holds the primary keys of the list elements. See the documentation for this list type for the element schema. If the 'elements' attribute is omitted, it is treated equivalent to the empty set and this message becomes a no-op. The following table describes the type of each array element.
|
||||||||||
type | string | Opt | 2.1 | Yes | Determines which list the elements belong to. This must be a list type defined elsewhere in the protocol. |
[ { "listRemove": { "cookie": "23SJFSDF3", "elements": [ { "chatId": "1" }, { "chatId": "2" } ], "type": "chat" } } ]
Name | listResync |
---|---|
Since | 2017.02 |
Direction | Incoming |
Indicates that elements of the list that match the given criteria have potentially changed or been removed. bbmcore may send this message at any time it determines that it is more efficient for your application to query the state of elements of interest, rather than emitting events for all the changes in the list's content. listResync does not contain an element set.
Lists do not support this message by default, and those that support requestListAll never support listResync. If the list supports this message, its documentation will indicate which attributes may be used as part of the criteria block. If the list supports multiple criteria attributes then they may be present in any combination. If more than one attribute is present then all the listed attributes must match.
Name | Type | Req | Since | Log | Description |
---|---|---|---|---|---|
criteria | object | Req | 2017.02 | Yes | Specifies a list of criteria key/value pairs. Each key is documented in the 'listResync' rules for the specific list in question. Empty criteria are allowed. |
type | string | Req | 2017.02 | Yes | Determines which list the elements belong to. This must be a list type defined elsewhere in the protocol. |
[ { "listResync": { "criteria": {}, "type": "chatMessage" } }, { "listResync": { "criteria": { "chatId": "5" }, "type": "chatMessage" } } ]
Name | participantDemote |
---|---|
Since | R4 |
Direction | Outgoing |
Demote the given participant to no longer be an admin of the specified chat. The change will be reflected locally immediately via a change to the participant, and a request will be initiated to the BlackBerry Infrastructure to effect the demotion. Once complete, a 'chatMessage' will be posted to the chat indicating that the local user has demoted the participant.
This request is ignored if:
Name | Type | Req | Since | Log | Description |
---|---|---|---|---|---|
chatId | chat key | Req | R4 | Yes | The id of the chat the demotion will occur within. |
userUri | user key | Req | R4 | Yes | The user URI of the participant to be demoted. |
[ { "participantDemote": { "chatId": "2347", "userUri": "bbmpim://user/id/5483" } } ]
Name | participantPromote |
---|---|
Since | R4 |
Direction | Outgoing |
Promote the given participant to be an admin of the specified chat. The change will be reflected locally immediately via a change to the participant, and a request will be initiated to the BlackBerry Infrastructure to effect the promotion. Once complete, a 'chatMessage' will be posted to the chat indicating that the local user has promoted the participant.
This request is ignored if:
Name | Type | Req | Since | Log | Description |
---|---|---|---|---|---|
chatId | chat key | Req | R4 | Yes | The id of the chat the promotion will occur within. |
userUri | user key | Req | R4 | Yes | The user URI of the participant to be promoted. |
[ { "participantPromote": { "chatId": "2347", "userUri": "bbmpim://user/id/5483" } } ]
Name | participantRemove |
---|---|
Since | R4 |
Direction | Outgoing |
Remove the given participant from the specified chat. The change will be reflected locally immediately via a change to the participant, and a request will be initiated to the BlackBerry Infrastructure to effect the removal. Once complete, a 'chatMessage' will be posted to the chat indicating that the local user has removed the participant.
This request is ignored if:
Removing a participant does not remove any messages they have posted in the chat.
Name | Type | Req | Since | Log | Description |
---|---|---|---|---|---|
chatId | chat key | Req | R4 | Yes | The id of the chat the removal will occur within. |
userUri | user key | Req | R4 | Yes | The user URI of the participant to be removed. |
[ { "participantRemove": { "chatId": "2347", "userUri": "bbmpim://user/id/5483" } } ]
Name | pinResult |
---|---|
Since | 2015.06 |
Direction | Incoming |
Returns the result of a requestPin message.
Name | Type | Req | Since | Log | Description | ||||||
---|---|---|---|---|---|---|---|---|---|---|---|
cookie | string | Req | 2015.06 | Yes | An opaque value that is echoed back to your application if it was specified in the request. |
||||||
pins | array | Opt | 2015.12 | No | The list of regId to PIN mappings. This should only be expected and examined when the 'result' is 'Success'. |
||||||
result | string | Req | 2015.06 | Yes | The result of the request. This field is an enumeration.
|
[ { "pinResult": { "cookie": "123456ABCDEF", "pins": [], "result": "Success" } }, { "pinResult": { "cookie": "123456ABCDEF", "pins": [ { "pin": "12345678", "regId": 1 } ], "result": "Success" } }, { "pinResult": { "cookie": "123456ABCDEF", "pins": [ { "pin": "12345678", "regId": 1 }, { "pin": "DEADBEEF", "regId": 2 }, { "pin": "5F735EE2", "regId": 3 } ], "result": "Success" } }, { "pinResult": { "cookie": "123456ABCDEF", "pins": [], "result": "Failure" } }, { "pinResult": { "cookie": "123456ABCDEF", "result": "Failure" } } ]
Name | profileKeys |
---|---|
Since | R3 |
Direction | Incoming |
Sent by bbmcore in response to a 'profileKeysExport' request.
This message will not be sent by bbmcore if your application uses the BlackBerry Key Management Service.
Name | Type | Req | Since | Log | Description | ||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
privateKeys | object | Req | R3 | Yes | The private signing and encryption keys.
|
||||||||||||||||||
publicKeys | object | Req | R3 | Yes | The public signing and encryption keys.
|
[ { "profileKeys": { "privateKeys": { "encryption": "ZW5jcnlwdGlvblByaXZhdGVLZXk", "signing": "c2lnbmluZ1ByaXZhdGVLZXk" }, "publicKeys": { "encryption": "ZW5jcnlwdGlvblB1YmxpY0tleQ", "signing": "c2lnbmluZ1B1YmxpY0tleQ" } } } ]
Name | profileKeysExport |
---|---|
Since | R3 |
Direction | Outgoing |
Request that bbmcore return the identity keys that are being used by the local user. This will trigger a 'profileKeys' response.
To avoid event loops, your application must only react with 'profileKeysExport' (or 'profileKeysImport') to changes of the 'profileKeysState' to 'NotSynced'. Your application must not react to updates from bbmcore that indicate the 'profileKeysState' is 'NotSynced' when the 'profileKeysState' was already known to your application to be 'NotSynced'. In other words, your application must not export keys unless the 'profileKeysState' is actually changing or being learned for the first time. By following this rule, failed exports will not result in tight event loops and will allow retries (at a minimum on application restart, but also whenever bbmcore decides to toggle the state).
The 'profileKeysState' global is not updated in response to this message, and thus must be set to 'Synced' via a 'requestListChange' once the key is successfully stored externally.
This message will be ignored by bbmcore if your application uses the BlackBerry Key Management Service.
Name | Type | Req | Since | Log | Description |
---|
[ { "profileKeysExport": {} } ]
Name | profileKeysImport |
---|---|
Since | R3 |
Direction | Outgoing |
Request that bbmcore set the profile keys.
If the profile's keys are imported successfully, the 'profileKeysState' global will be updated to 'Synced'. If the import fails, the 'profileKeyState' will remain unchanged.
To avoid event loops, your application must only react with 'profileKeysImport' (or 'profileKeysExport') to changes of the 'profileKeysState' to 'NotSynced'. Your application must not react to updates from bbmcore that indicate the 'profileKeysState' is 'NotSynced' when the 'profileKeysState' was already known to your application to be 'NotSynced'. In other words, your application must not import keys unless the 'profileKeysState' is actually changing or being learned for the first time. By following this rule, failed imports will not result in tight event loops and will allow retries (at a minimum on application restart, but also whenever bbmcore decides to toggle the state).
Regardless of the 'profileKeysState', if your application has external evidence that the user has for some reason newly available or updated keys, your application can use 'profileKeysImport' to provide those keys, subject the event reaction restrictions documented above.
This message will be ignored by bbmcore if your application uses the BlackBerry Key Management Service.
Name | Type | Req | Since | Log | Description | ||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
privateKeys | object | Req | R3 | Yes | The private signing and encryption keys.
|
||||||||||||||||||
publicKeys | object | Req | R3 | Yes | The public signing and encryption keys.
|
[ { "profileKeysImport": { "privateKeys": { "encryption": "ZW5jcnlwdGlvblByaXZhdGVLZXk", "signing": "c2lnbmluZ1ByaXZhdGVLZXk" }, "publicKeys": { "encryption": "ZW5jcnlwdGlvblB1YmxpY0tleQ", "signing": "c2lnbmluZ1B1YmxpY0tleQ" } } } ]
Name | profileKeysImportFailure |
---|---|
Since | R4 |
Direction | Incoming |
Indicates that the profile keys received in 'profileKeysImport' failed to import.
This message will not be sent by bbmcore if your application uses the BlackBerry Key Management Service.
Name | Type | Req | Since | Log | Description |
---|
[ { "profileKeysImportFailure": {} } ]
Name | pushReceived |
---|---|
Since | R10 |
Direction | Outgoing |
Every time your application receives a mobile push (on Android or iOS), it should send a 'pushReceived' message to bbmcore.
Your application does not need to "rate limit" or otherwise filter 'pushReceived' messages.
When your application informs the SDK that it has received a mobile push, the SDK sends this message to bbmcore for you.
Name | Type | Req | Since | Log | Description |
---|
[ { "pushReceived": {} } ]
Name | requestListAdd |
---|---|
Since | 2.0 |
Direction | Outgoing |
Requests that bbmcore insert a new element in the list. Most lists do not support this message by default. Those that do contain a section in their documentation explaining what the message is used for and any restrictions on its use.
The documentation for the list indicates a subset of attributes that may be present in the 'requestListAdd' message. If the attributes in the subset are marked as required in the element schema, then they are also required by the 'requestListAdd' message. If they are optional, then they will be reset to their default value if not present.
Name | Type | Req | Since | Log | Description | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
elements | array | Req | 2.0 | Yes | Holds the list elements. Each element must include the primary key. If the list type supports this message the documentation for the list type will describe which additional attributes The following table describes the type of each array element.
|
||||||||||
type | string | Req | 2.1 | Yes | Determines which list the elements belong to. This must be a list type defined elsewhere in the protocol. |
[ { "requestListAdd": { "elements": [ { "calories": 400, "eaten": false, "type": "cheese" }, { "calories": 500, "eaten": true, "type": "roast" } ], "type": "sandwich" } } ]
Name | requestListAll |
---|---|
Since | 2.1 |
Direction | Outgoing |
Requests that bbmcore returns the canonical version of the list by responding with a listAll message.
Name | Type | Req | Since | Log | Description |
---|---|---|---|---|---|
type | string | Req | 2.1 | Yes | Determines which list the elements belong to. This must be a list type defined elsewhere in the protocol. |
[ { "requestListAll": { "type": "chat" } } ]
Name | requestListChange |
---|---|
Since | 2.0 |
Direction | Outgoing |
Requests that bbmcore change attributes of one or more elements in the list. Most lists do not support this message by default. Those that do contain a section in their documentation explaining what the message is used for and any restrictions on its use. This message contains partial element states. The primary key is always required. The documentation for the list will describe a subset of other attributes that may also be present. All non-primary key attributes are optional, even if they are marked as required in the element schema. Elements that are not present remain unchanged and are not reset to default values.
Name | Type | Req | Since | Log | Description | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
cookie | string | Opt | 2.1 | Yes | Holds an optional cookie that was generated by your application and included in this request. |
||||||||||
elements | array | Req | 2.1 | Yes | Holds the list elements. Each element includes the primary key, along with a subset of attributes that should be changed. The set of permissible attributes will be described in the list documentation. The following table describes the type of each array element.
|
||||||||||
id | string | Opt | 2.1 | No | Identifier for the list, unique for a given list type. The exact meaning and format for list ids is determined by the list type. See the documentation in the doc/lists subdirectory for type-specific rules. |
||||||||||
type | string | Req | 2.1 | Yes | Determines which list the elements belong to. This must be a list type defined elsewhere in the protocol. |
[ { "requestListChange": { "cookie": "23SJFSDF3", "elements": [ { "id": "42", "localData": { "associatedResource": "RGF0YSBvZiB0aGUgYXBwJ3MgY2hvb3NpbmcuCg==" } } ], "type": "appMessage" } } ]
Name | requestListElements |
---|---|
Since | 2.1 |
Direction | Outgoing |
Requests that bbmcore send back full states of a given set of elements by responding with a listElements message. All lists support this message. The elements in this message only contain primary keys. No other attributes may be present, even if they are marked as required in the element schema.
Name | Type | Req | Since | Log | Description | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
cookie | string | Opt | 2.1 | Yes | Holds an optional cookie that was generated by your application and included in this request. This allows your application to match up request/response. If present, the daemon will respond with a single listElements with a matching cookie whose elements match exactly those in this request, and the sender will be able to rely on the fact that a missing element is unknown to the daemon. If the cookie is omitted then the daemon may, at its option, merge multiple requestListElements into a single response or break a single requestListElements into multiple responses. |
||||||||||
elements | array | Req | 2.1 | Yes | Specifies the primary keys for the elements being requested. The following table describes the type of each array element.
|
||||||||||
type | string | Req | 2.1 | Yes | Determines which list the elements belong to. This must be a list type defined elsewhere in the protocol. |
[ { "requestListElements": { "cookie": "23SJFSDF3", "elements": [ { "id": 209 }, { "id": 210 } ], "type": "chat" } } ]
Name | requestListMatching |
---|---|
Since | 3.0 |
Direction | Outgoing |
Requests that bbmcore send back full states of all elements that match the given criteria in a single listElements message with a matching cookie.
Lists do not support this message by default. If the list supports this message, its documentation will indicate which attributes may be used as part of the criteria block. If the list supports multiple criteria attributes then they may be present in any combination. If more than one attribute is present then all the listed attributes must match. The resulting listElements message will contain all elements for which all criteria match.
Name | Type | Req | Since | Log | Description |
---|---|---|---|---|---|
cookie | string | Opt | 3.0 | Yes | Holds a cookie that was generated by your application and included in this request. This allows your application to match up request/response. Bbmcore will respond with a single 'listElements' with a matching 'cookie' whose elements match exactly those in this request, and the sender will be able to rely on the fact that a missing element is unknown to bbmcore. |
criteria | object | Req | 3.0 | Yes | Specifies a list of criteria key/value pairs. Each key is documented in the 'requestListMatching' rules for the specific list in question. Iff the list supports 'requestListAll', empty criteria are allowed and will result in all elements of the list being returned (via 'listElements'). |
type | string | Req | 3.0 | Yes | Determines which list the elements belong to. This must be a list type defined elsewhere in the protocol. |
[ { "requestListMatching": { "cookie": "cxZVVuD9WM231Sw3", "criteria": { "regId": "10000" }, "type": "user" } }, { "requestListMatching": { "cookie": "GdVAwVeEjkHayFv611vL6Ovxh", "criteria": { "chatId": "12", "tag": "Remove" }, "type": "chatMessage" } } ]
Name | requestListRemove |
---|---|
Since | 2.0 |
Direction | Outgoing |
Requests that bbmcore remove one or more elements from the list. By default, most lists do not support this message. Those that do contain documentation describing the message and any restrictions on its use. The elements in this message only contain primary keys. No other attributes may be present, even if they are marked as required in the element schema.
Name | Type | Req | Since | Log | Description | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
elements | array | Req | 2.0 | Yes | Holds the list elements. Each element only includes the primary key. The following table describes the type of each array element.
|
||||||||||
type | string | Req | 2.1 | Yes | Determines which list the elements belong to. This must be a list type defined elsewhere in the protocol. |
[ { "requestListRemove": { "elements": [ { "id": "7" }, { "id": "12" } ], "type": "appMessage" } } ]
Name | requestPin |
---|---|
Since | 2015.06 |
Direction | Outgoing |
Sent by your application to bbmcore to request the currently registered device PINs for the given regIds. This always triggers a BlackBerry Infrastructure request; bbmcore never considers its local list of users. Your application should first consult the user list to see if bbmcore already knows a PIN for a regId.
The result is returned via a pinResult message.
Name | Type | Req | Since | Log | Description | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
cookie | string | Req | 2015.06 | Yes | An opaque value supplied by your application that will be echoed back in the response. |
||||||||||
regIds | array | Req | 2015.12 | No | The list of regIds whose PINs are to be looked up. If a regId is unknown or has no PINs associated with it, it may or may not appear in the results. The following table describes the type of each array element.
|
[ { "requestPin": { "cookie": "123456ABCDEF", "regIds": [ 123456 ] } }, { "requestPin": { "cookie": "123456ABCDEF", "regIds": [ 1, 2, 3, 4, 5, 6 ] } } ]
Name | retryServerRequests |
---|---|
Since | 2017.02 |
Direction | Outgoing |
The purpose of this message is to provide bbmcore with a series of user-driven events to drive its internal retry logic, such as retrying failed BlackBerry Infrastructure requests. Your application must determine the best event(s) to use to drive this logic. In the optimum case, your application will use this message whenever your application goes from being 'not on the screen' to being 'on the screen'. This transition event is considered to be a good representation of the user becoming interested in interacting with Spark Communications Services again, and thus a good event to use as a user-driver retry trigger. However, your application may choose to report only when specific screens transition to be 'on the screen', or tie this trigger to an explicit user action such as a 'Refresh' button.
Your application does not need to "rate limit" or otherwise filter 'retryServerRequests' messages.
Name | Type | Req | Since | Log | Description |
---|
[ { "retryServerRequests": {} } ]
Name | search |
---|---|
Since | 2015.06 |
Direction | Outgoing |
Search bbmcore's local data for chat messages and chat subjects. This searches for the following types of results, in priority order. When the maximum number of results have been found, searching stops.
Your application will receive a 'searchResult' in response.
When a 'search' request does not include the 'chatId' field, all chats (in all states) are examined and all result types are possible, but no more than one 'Message' type result will be returned for each matching chat. Each 'Message' result indicates the most recently received matching message in its chat.
When a 'search' request includes the 'chatId' field, only that single chat is examined and multiple 'Message' type results can be returned. Other result types will not be present. Each 'Message' result indicates one matching message in the specified chat, with more recently received messages listed first.
Name | Type | Req | Since | Log | Description |
---|---|---|---|---|---|
chatId | string | Opt | R8 | Yes | Search a single chat for 'Message' type matches only. See this request's description for details on how this alters the search operation and results. |
cookie | string | Req | 2015.06 | Yes | The cookie value that will be included in the 'searchResult' response. |
suggestedMaxResults | number (uint64) | Opt | 2015.06 | Yes | Iff present, then no more than this many results will be returned. The result size can be limited to an internal unspecified maximum that is at least 50. |
text | string | Req | 2015.06 | No | The text of the query for case-insensitive substring search. This string must contain at least one Unicode code point or an empty result set will be returned. |
[ { "search": { "cookie": "search-1", "text": "foo" } }, { "search": { "cookie": "search-2", "suggestedMaxResults": 50, "text": "foobar" } }, { "search": { "chatId": "123", "cookie": "search-3", "text": "foo" } } ]
Name | searchResult |
---|---|
Since | 2015.06 |
Direction | Incoming |
This carries the results of a 'search' request.
Name | Type | Req | Since | Log | Description | ||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
cookie | string | Req | 2015.06 | Yes | The cookie value that was provided in the 'search' request. |
||||||||||||||||||||||||||||||||||||||||
elements | array | Req | 2015.06 | No | The results of the search. The following table describes the type of each array element.
|
[ { "searchResult": { "cookie": "search-1", "elements": [ { "chatId": "17", "type": "DisplayName", "userUri": "bbmpim://user/id/3" }, { "chatId": "18", "messageId": "7", "type": "DisplayName", "userUri": "bbmpim://user/id/3" }, { "chatId": "123", "messageId": "456", "type": "Message" }, { "chatId": "25894", "type": "Subject" } ] } } ]
Name | setupError |
---|---|
Since | 2.1 |
Direction | Incoming |
Sent by bbmcore when a setup attempt encounters an error. The error does not mean that bbmcore has stopped trying to complete setup. In all cases, the 'authTokenState' and the 'setupState' will be updated as necessary and your application must respect and react to those changes accordingly and at user speeds.
Name | Type | Req | Since | Log | Description | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
error | string | Req | 2.1 | Yes | The type of error encountered. This field is an enumeration.
|
[ { "setupError": { "error": "PermanentServerError" } }, { "setupError": { "error": "TemporaryServerError" } } ]
Name | setupRetry |
---|---|
Since | R4 |
Direction | Outgoing |
Requests that bbmcore restart setup after a previous setup attempt was stopped.
If the current 'setupState' 'state' global is 'DeviceSwitchRequired', this will move the user's profile from the user's other device to this one.
If the current 'setupState' 'state' global is 'Full', this will register and add the current endpoint to any existing endpoints.
This message will be ignored for any other 'setupState' 'state'.
Name | Type | Req | Since | Log | Description |
---|
[ { "setupRetry": {} } ]
Name | statsCommitted |
---|---|
Since | 2015.04 |
Direction | Outgoing |
Your application sends this message to indicate two things:
See the 'stat' list for a detailed explanation how to use this message.
Note that 'statsCommitted' always applies to the most recently fetched 'stat' list values. If no 'stat' list values have ever been fetched, this has no effect.
There is no reply to this message.
Name | Type | Req | Since | Log | Description |
---|
[ { "statsCommitted": {} } ]
Name | syncError |
---|---|
Since | R4 |
Direction | Incoming |
Sent by bbmcore when there is an endpoint sync error after receiving an 'syncStart' message on the initiating endpoint.
Name | Type | Req | Since | Log | Description | ||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
error | string | Req | R4 | Yes | The type of endpoint sync error encountered. This field is an enumeration.
|
[ { "syncError": { "error": "IncorrectPasscode" } } ]
Name | syncPasscodeChange |
---|---|
Since | R6 |
Direction | Outgoing |
Applications that use the BlackBerry Key Management Service (KMS) send this message to bbmcore on an endpoint that has completed setup in order to change the passcode that must be provided by 'syncStart' on new endpoints.
This message uses information already known to this endpoint to protect the existing sync data in KMS with the new 'passcode'. The old passcode is not required and will not be checked. Because of this, applications can let users change the sync passcode without knowing the current sync passcode. In all circumstances, applications should take steps to re-confirm the identity of the user with a relevant credentials challenge before issuing this request to bbmcore.
The result of this action is reported by 'syncPasscodeChangeResult'. Applications must not issue overlapping requests.
This action does not deregister existing endpoints (unlike 'syncStart' with 'action' 'New').
It is an error to send a 'syncPasscodeChange' request when your application isn't using the BlackBerry Key Management Service or when setup hasn't yet completed.
Name | Type | Req | Since | Log | Description |
---|---|---|---|---|---|
passcode | string | Req | R6 | No | The passcode to use when re-protecting the identity's existing sync data. |
[ { "syncPasscodeChange": { "passcode": "newSecret" } } ]
Name | syncPasscodeChangeResult |
---|---|
Since | R6 |
Direction | Incoming |
This message reports the result of a previous 'syncPasscodeChange' request.
Name | Type | Req | Since | Log | Description | ||||||
---|---|---|---|---|---|---|---|---|---|---|---|
result | string | Req | R6 | Yes | The result of attempting to set a new passcode. This field is an enumeration.
|
[ { "syncPasscodeChangeResult": { "result": "Success" } }, { "syncPasscodeChangeResult": { "result": "TemporaryFailure" } } ]
Name | syncStart |
---|---|
Since | R4 |
Direction | Outgoing |
This message is only used by applications that use the BlackBerry Key Management Service (KMS). When the 'setupState' is 'SyncRequired', your application must examine the 'syncPasscodeState' global.
Name | Type | Req | Since | Log | Description | ||||||
---|---|---|---|---|---|---|---|---|---|---|---|
action | string | Opt | R6 | Yes | This field is ignored by bbmcore unless your application uses the BlackBerry Key Management Service. This controls whether the passcode is being used to try to unprotect existing keys or to protect new keys. See the message description for more information. This field is an enumeration.
|
||||||
passcode | string | Req | R4 | No | This is the passcode used to protect sync data in the BlackBerry Key Management Service. |
[ { "syncStart": { "passcode": "ABC123" } }, { "syncStart": { "action": "New", "passcode": "NewSecret" } }, { "syncStart": { "action": "Existing", "passcode": "OldSecret" } } ]
Name | userKeysChanged |
---|---|
Since | R6 |
Direction | Incoming |
This message is sent by bbmcore only when your application uses the BlackBerry Key Management Service (KMS). It indicates that bbmcore has found new keys for a user.
This is not sent when the user gains their initial set of keys. It is sent only when the local endpoint has an existing set of keys for a given user and then later learns that the user has different keys for any reason.
This is not sent for the local user.
Name | Type | Req | Since | Log | Description |
---|---|---|---|---|---|
userUri | user key | Req | R6 | Yes | The URI of the user whose keys have changed. |
[ { "userKeysChanged": { "userUri": "bbmpim://user/id/123" } } ]
Name | userKeysImport |
---|---|
Since | R3 |
Direction | Outgoing |
Request that bbmcore set one or more users' keys.
Your application should try to include keys for as many users as possible in a single 'userKeysImport' request (within BBMDS message size limits) for greater efficiency.
If no user with a given 'regId' exists, a new user is created with a 'keyState' of 'Synced' and protection enabled. If the import fails, no user is created at all and no response is sent by bbmcore.
If the user with a given 'regId' exists, the user's 'keyState' will be changed to 'Synced' and protection will be enabled for the user. If the import fails, the user's 'keyState' will remain unchanged.
To avoid event loops, your application must only react with 'userKeysImport' to changes of a user's 'keyState' to 'Import'. Your application must not react to updates from bbmcore that indicate the 'keyState' is 'Import' when the 'keyState' was already known to your application to be 'Import'. When your application first learns of a user (such as after starting up) and their 'keyState' is 'Import', your application should consider that a change and can react to it with 'userKeysImport'. In other words, your application must not import keys unless the 'keyState' is actually changing or being learned for the first time. By following this rule, failed imports will not result in tight event loops and will allow retries (at a minimum on application restart, but also whenever bbmcore decides to toggle the state).
Regardless of a user's 'keyState', if your application has external evidence that the user has for some reason newly available or updated keys, your application can use 'userKeysImport' to provide those keys, subject the event reaction restrictions documented above.
This message will be ignored by bbmcore if your application uses the BlackBerry Key Management Service.
Name | Type | Req | Since | Log | Description | ||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
keys | array | Req | R3 | Yes | The list of user keys to set. The following table describes the type of each array element.
|
[ { "userKeysImport": { "keys": [ { "encryptionPublicKey": "ZW5jcnlwdGlvblB1YmxpY0tleTEyMw", "regId": "123", "signingPublicKey": "c2lnbmluZ1B1YmxpY0tleTEyMw" }, { "encryptionPublicKey": "ZW5jcnlwdGlvblB1YmxpY0tleTMyMQ", "regId": "321", "signingPublicKey": "c2lnbmluZ1B1YmxpY0tleTMyMQ" } ] } } ]
Name | userKeysImportFailure |
---|---|
Since | R4 |
Direction | Incoming |
Indicates that one or more user's keys received in 'userKeysImport' failed to import.
This message will not be sent by bbmcore if your application uses the BlackBerry Key Management Service.
Name | Type | Req | Since | Log | Description | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
regIds | array | Req | R4 | Yes | The list of regIds that failed to import. The following table describes the type of each array element.
|
[ { "userKeysImportFailure": { "regIds": [ "123", "321" ] } } ]
Name | wipe |
---|---|
Since | 2016.06 |
Direction | Outgoing |
Request that bbmcore forget all information associated with the current Spark Communications identity by deleting all data and stopping, thus triggering a required BBMDS resync by your application (as is necessary on all BBMDS reconnects).
Name | Type | Req | Since | Log | Description |
---|
[ { "wipe": {} } ]
The list API is used to synchronize a list of elements between the application and bbmcore. Each list has a type, indicating the type of elements in the list and how the list is used by bbmcore.
Bbmcore owns the model and your application is stateless with respect to it. In other words, bbmcore sends a message to your application every time the list changes, even if the change was requested by your application. The application reacts to these events and occasionally makes requests from bbmcore. Bbmcore has the option to decide how it reacts to your application's requests. Some requests may be ignored or result in changes to multiple lists.
List messages sent from bbmcore start with the prefix list. These are documented with the other incoming messages. The contract for these messages is the same regardless of the list type and your application is responsible for reacting correctly to any list message sent from bbmcore sent at any time. Bbmcore is free to use these messages to change the list contents at any time. Bbmcore is also required to notify your application of every change to a list (if such changes are supported by the list's events), regardless of how that change occurred. For example, bbmcore cannot omit sending a change notification to your application just because the change was requested by your application.
The following table summarizes the messages in the list protocol:
Message | Message Type | Elements | Description |
---|---|---|---|
listAdd | Event | Full | Adds one or more elements to the list. |
listAll | Event | None | Sends the entire list contents to your application. |
listChange | Event | Partial | Changes specific attributes in one or more elements in the list. |
listChunk | Event | Full | This is a degenerate message that can only follow 'listAll' or 'listElements' to carry the actual elements. It is omitted from the documentation of supported event messages because it is implied when those leading messages are supported. |
listElements | Event | None | Updates the entire state of specific elements in the list. |
listRemove | Event | Primary key | Removes one or more elements to the list. |
listResync | Event | None | Indicates that elements of the list that match the given criteria have potentially changed or been removed. |
requestListAdd | Action | Partial | Requests that bbmcore add a new element to the list. |
requestListAll | Action | None | Requests full states for all elements. |
requestListChange | Action | Partial | Requests that bbmcore change an existing element in the list. |
requestListElements | Action | Primary key | Requests full states for one or more elements. |
requestListRemove | Action | Primary key | Requests that bbmcore remove an existing element from the list. |
requestListMatching | Action | None | Requests all elements whose attributes exactly match the criteria supplied. |
Many list messages contain an "elements" attribute, which either contain full or partial element states, or only contain primary keys. The table above describes what sort of elements show up in each message. The following table describes the meaning of the various element types.
Element Type | Description |
---|---|
Full | The 'listAdd' and 'listChunk' messages contain full element states. Full states contain all required attributes, and if any optional attributes are not present, they are reset to their default values. |
Partial |
For the 'listChange' and 'requestListChange' events, the primary key is required and all other attributes are optional, even if they are marked as required in the element schema. Attributes that are not present are treated as unmodified. No attributes are reset to their defaults. In the case of 'requestListChange', only a subset of attributes (documented for each list) may be included in the message. In the case of 'requestListAdd', only a subset of attributes may be included. If an attribute in the subset is marked as required, it is also required in the 'requestListAdd'. If an attribute in the subset is marked as optional, it is reset to its default if not present. Attributes outside the subset may not be included in a 'requestListAdd' even if they are marked as required. The primary key is only required by 'requestListAdd' if named in the subset. |
Primary key | The 'listRemove', 'requestListRemove', and 'requestListElements' messages only contain primary keys. No other attributes may be present, even if they are marked as required. |
None | The 'listAll', 'listElements', and 'requestListAll' messages do not directly contain an elements attribute, although in the first two cases the message will be followed by one or more 'listChunk' messages that do contain elements. |
Not all lists support all messages. Each list defines which "action" and "event" messages it supports in its definition. Almost all lists (except those whose elements contain only one field) implicitly support 'listChange' and 'listElements'. There are no other implicitly supported messages.
The following table discusses some common key attributes of lists.
Attribute | Description |
---|---|
type | This is the unique identifier for the list type, included verbatim in the type attribute of every message in this list. |
primaryKey | Identifies the primary key for the list. If more than one attribute is named, the list uses a composite key. Certain list messages (such as 'listRemove') only require the primary key to be included for each element. |
since | The protocol version in which the list type was added. This is a rough guide for humans only because protocol version is not strong. |
A typical message interaction for a list supporting 'requestListAll', 'requestListAdd', and 'requestListRemove' would look like this. In this example, the elements have two attributes: lineNum and text.
// Your application wakes up and requests the list of elements from bbmcore. Bbmcore decides to break the response into two chunks. Outgoing: {"requestListAll":{"type":"test"}} Incoming: {"listAll":{"type":"test"}} Incoming: {"listChunk":{"type":"test", "elements":[{"lineNum":0, "text":"Hello"},{"lineNum":1, "text":"World"}]}} Incoming: {"listChunk":{"type":"test", "elements":[{"lineNum":2, "text":"Testing"},{"lineNum":3, "text":"123"}], "last":true}} // Your application requests that bbmcore add a new element to the list. Outgoing: {"requestListAdd":{"type":"test", "elements":[{"lineNum":5, "text":"456"}]}} Incoming: {"listAdd":{"type":"test", "elements":[{"lineNum":5, "text":"456"}]}} // Bbmcore decides to add an additional element to the list for unrelated reasons. Incoming: {"listAdd":{"type":"test", "elements":[{"lineNum":6, "text":"789"}]}} // Your application requests that bbmcore remove one of the elements. Outgoing: {"requestListRemove": {"type":"test", "elements":["lineNum":2]}} Incoming: {"listRemove": {"type":"test", "elements":["lineNum":2]}}
Type | appMessage |
---|---|
Since | R4 |
Primary key | id |
Actions | requestListAll, requestListChange, requestListElements, requestListRemove |
Events | listAdd, listAll, listChange, listElements, listRemove |
This list holds the set of application messages known to bbmcore. Application messages are application-specific messages with application-defined content sent to one or more identities for delivery to all their registered endpoints. Application messages are injected at the infrastructure level, not by typical endpoints. If you are interested in sending application messages to your application, please contact the Spark Communications Services sales team.
These messages are not processed by bbmcore but are stored for your application to consume as it sees fit. Only 1000 application messages will be stored by bbmcore at any one time. If more application messages arrive, older ones will be deleted to make room. No 'listRemove' notification will be sent for such removals.
Name | Type | Req | Since | Log | Description |
---|---|---|---|---|---|
data | object | Req | R4 | No | The data of your application message in the form of a JSON object. The meaning of the JSON object's contents are defined by your application. |
externalId | string | Req | R4 | Yes | The id of your application message, as specified by the system that injected it. |
id | string | Req | R4 | Yes | The local id of your application message. |
localData | object | Req | R4 | Yes | This field contains opaque local-only data managed by your application that is associated to your application message. A newly arrived application message always has an empty JSON object (i.e. {}) for its 'localData'. |
postTime | number (int64) | Req | R4 | Yes | The time, in milliseconds since 1970 UTC, at which the message was posted for delivery. |
Message | requestListRemove |
---|---|
Since | R4 |
Use this to remove application messages.
Message | requestListChange |
---|---|
Since | R4 |
Attributes | localData |
requestListChange is used by your application to change the 'localData' field of an application message.
[ { "listAdd": { "elements": [ { "data": { "body": "Enjoy the secure messaging! Your messages are protected.", "ref": 1234, "title": "Welcome." }, "externalId": "456783-ltr392-873jklo", "id": "7", "localData": {}, "postTime": 1499459819000 } ], "type": "appMessage" } }, { "listAll": { "type": "appMessage" } }, { "listChunk": { "elements": [ { "data": { "body": "Enjoy the secure messaging! Your messages are protected.", "ref": 1234, "title": "Welcome." }, "externalId": "456783-ltr392-873jklo", "id": "7", "localData": {}, "postTime": 1499459819000 } ], "last": true, "type": "appMessage" } }, { "listRemove": { "elements": [ { "id": "7" } ], "type": "appMessage" } }, { "listElements": { "type": "appMessage" } }, { "listChunk": { "elements": [ { "data": { "body": "Enjoy the secure messaging! Your messages are protected.", "ref": 1234, "title": "Welcome." }, "externalId": "456783-ltr392-873jklo", "id": "7", "localData": {}, "postTime": 1499459819000 } ], "last": true, "type": "appMessage" } }, { "listChange": { "elements": [ { "id": "7", "localData": {} } ], "type": "appMessage" } } ]
Type | chat |
---|---|
Since | 2017.02 |
Primary key | chatId |
Actions | requestListAll, requestListChange, requestListElements, requestListMatching |
Events | listAdd, listAll, listChange, listElements, listRemove |
This list contains an entry for each chat the user is participating in. Chats are backed by the BlackBerry Infrastructure, and they will be restored when signing into an existing Spark Communications identity.
Chats must be started explicitly via the 'chatStart' message, and content may be added using the 'chatMessageSend' message.
When bbmcore issues a 'listRemove' for a chat, or when the 'numMessages' counter decreases, it is not necessary to also issue a separate 'listRemove' for the messages. Your application will cleanup their cache of the (now orphaned) messages when appropriate.
Name | Type | Req | Since | Log | Description | |||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
chatId | string | Req | 2017.02 | Yes | The unique identifier for this chat. This is used as the value portion of chat URIs. See the URIs section for information on the URI format. |
|||||||||||||||||||
data | object | Req | R6 | No | This field contains opaque data managed by your application. This data can be read or written by any participant. Concurrent writes are resolved in a way that all participants will eventually see the same steady-state outcome. This field is suitable for shared chat metadata that changes infrequently such as a chat avatar URL, the identifiers of external resources associated with the chat, or a per-chat setting shared by all participants. Data that changes frequently should be sent to all participants via the 'data' field of 'chatMessage' instead. The the 'data', encoded as JSON in UTF-8, must not exceed 71680 bytes (70 KB). |
|||||||||||||||||||
flags | string | Req | 2017.02 | Yes | Compact read-only flags about the chat. Each flag that is 'true' has its corresponding letter present in the string. Each flag that is 'false' has its corresponding letter not present in the string. The letters will always be provided in alphabetical order.
|
|||||||||||||||||||
invitePolicy | string | Opt | R4 | Yes | The policy that controls who may invite participants to the chat. This only applies to chats that do not have the 'oneToOne' flag, in which case the field will always be present. The field will never be present for chats with the 'oneToOne' flag. This field is an enumeration.
|
|||||||||||||||||||
keyState | string | Opt Synced | R3 | Yes | The current state of the chat's key. New chats that are created with a key start in the 'Export' state. New chats that are created without a key start in the 'Import' state. This field is an enumeration.
|
|||||||||||||||||||
lastActivity | number (uint64) | Req | 2017.02 | Yes | This holds the timestamp, in seconds since 1970, of the most recent notable activity in the chat. Notable activity includes:
Note that the 'lastActivity' does not always increase. Messages can arrive with lower timestamps than previous messages or the current 'lastActivity' and their timestamps will be applied to this field. |
|||||||||||||||||||
lastMessage | number (uint64) | Req | 2017.02 | Yes | The identifier of the most recent message added to the history. When combined with the chatId, this is a foreign key into 'listChatMessage'. bbmcore notifies your application of new messages by incrementing this value. |
|||||||||||||||||||
localData | object | Req | 2017.02 | No | This field contains opaque local-only data that is associated with this chat and managed by your application. This data is stored locally on this endpoint only. |
|||||||||||||||||||
mailboxId | string | Req | R3 | Yes | The identifier used externally to uniquely identify this chat. Empty when not known. |
|||||||||||||||||||
numMessages | number (uint64) | Req | 2017.02 | Yes | The total number of messages in the chat. When this value decreases, messages have been removed from the 'old' end of the message list. When this value increases, messages have been added to the 'new' end of the message list. bbmcore will increment this attribute whenever a new message arrives. |
|||||||||||||||||||
numUnread | number (uint64) | Req | R5 | Yes | The number of incoming messages in the chat that the local user has yet to mark as Read. This count does not include messages that have 'neverCountUnread' flag set. |
|||||||||||||||||||
privateData | object | Req | R7 | No | This field contains opaque data managed by your application. This data can be read or written only by endpoints belonging to the local user's identity. Concurrent writes are resolved in a way that all endpoints will eventually see the same steady-state outcome. This field is suitable for chat metadata that changes infrequently and is private to the local user's identity but needs to be known by all the local user's endpoints. The 'privateData', encoded as JSON in UTF-8, must not exceed 71680 bytes (70 KB). |
|||||||||||||||||||
restorePoint | number (uint64) | Req | 2017.02 | Yes | The identifier of the most recent message restored from the BlackBerry Infrastructure when the chat was joined or restored. Messages after this point are considered to have arrived while this endpoint was actively receiving content from the chat. This value is not updated when the message it identifies is no longer part of the chat. If no messages existed in the chat when it was created, joined, or restored, or if for some reason the restore point is unknown, then this will be zero. |
|||||||||||||||||||
state | string | Req | 2017.02 | Yes | The state of the chat. This field is an enumeration.
|
|||||||||||||||||||
subject | string | Req | 2017.02 | No | Holds the user-readable subject of the chat. This field has a maximum size of 128 code points. |
Message | requestListChange |
---|---|
Since | R2 |
Attributes | subject, localData, privateData, data, keyState, invitePolicy |
A 'requestListChange' message can be sent by your application to change certain fields of a chat.
The 'keyState' field can be set by your application to 'Synced' only, and only when your application is using Cloud Key Storage. See the 'chatKeyExport' message for details on when to do this.
The 'invitePolicy' field can be changed only if the local user is an admin of the chat
Message | requestListMatching | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Description | Use requestListMatching to lookup subsets of this list. | ||||||||||||
Criteria |
|
[ { "listAdd": { "elements": [ { "avatar": "", "chatId": "38267", "data": {}, "flags": "O", "keyState": "Export", "lastActivity": 1098730987, "lastMessage": 15, "localData": {}, "mailboxId": "mbx123", "numMessages": 10, "numUnread": 0, "orgId": "9029820000", "privateData": { "pinned": false }, "restorePoint": 0, "state": "Ready", "subject": "All your base" }, { "avatar": "", "chatId": "6", "data": { "appContextId": "miZPa8ef1Xj5Vl7YmSyYVxKdbJDBIMNK", "avatar": "https://avatar.server/8GWl2rOF" }, "expiry": 3600, "flags": "AP", "invitePolicy": "AdminsOnly", "keyState": "Synced", "lastActivity": 10987300000, "lastMessage": 10293873870, "localData": { "someData": "someValue" }, "mailboxId": "", "numMessages": 1000, "numUnread": 23, "privateData": { "chatNickname": "Friends from Work", "notificationPriority": "High", "pinned": false }, "restorePoint": 500, "state": "Waiting", "subject": "Are belong to us" } ], "type": "chat" } }, { "listAll": { "type": "chat" } }, { "listChunk": { "elements": [ { "avatar": "", "chatId": "38267", "data": {}, "flags": "O", "keyState": "Export", "lastActivity": 1098730987, "lastMessage": 15, "localData": {}, "mailboxId": "mbx123", "numMessages": 10, "numUnread": 0, "orgId": "9029820000", "privateData": { "pinned": false }, "restorePoint": 0, "state": "Ready", "subject": "All your base" }, { "avatar": "", "chatId": "6", "data": { "appContextId": "miZPa8ef1Xj5Vl7YmSyYVxKdbJDBIMNK", "avatar": "https://avatar.server/8GWl2rOF" }, "expiry": 3600, "flags": "AP", "invitePolicy": "AdminsOnly", "keyState": "Synced", "lastActivity": 10987300000, "lastMessage": 10293873870, "localData": { "someData": "someValue" }, "mailboxId": "", "numMessages": 1000, "numUnread": 23, "privateData": { "chatNickname": "Friends from Work", "notificationPriority": "High", "pinned": false }, "restorePoint": 500, "state": "Waiting", "subject": "Are belong to us" } ], "last": true, "type": "chat" } }, { "listRemove": { "elements": [ { "chatId": "38267" }, { "chatId": "6" } ], "type": "chat" } }, { "listElements": { "type": "chat" } }, { "listChunk": { "elements": [ { "avatar": "", "chatId": "38267", "data": {}, "flags": "O", "keyState": "Export", "lastActivity": 1098730987, "lastMessage": 15, "localData": {}, "mailboxId": "mbx123", "numMessages": 10, "numUnread": 0, "orgId": "9029820000", "privateData": { "pinned": false }, "restorePoint": 0, "state": "Ready", "subject": "All your base" }, { "avatar": "", "chatId": "6", "data": { "appContextId": "miZPa8ef1Xj5Vl7YmSyYVxKdbJDBIMNK", "avatar": "https://avatar.server/8GWl2rOF" }, "expiry": 3600, "flags": "AP", "invitePolicy": "AdminsOnly", "keyState": "Synced", "lastActivity": 10987300000, "lastMessage": 10293873870, "localData": { "someData": "someValue" }, "mailboxId": "", "numMessages": 1000, "numUnread": 23, "privateData": { "chatNickname": "Friends from Work", "notificationPriority": "High", "pinned": false }, "restorePoint": 500, "state": "Waiting", "subject": "Are belong to us" } ], "last": true, "type": "chat" } }, { "listChange": { "elements": [ { "chatId": "38267", "data": {}, "keyState": "Export", "localData": {}, "subject": "All your base" }, { "chatId": "6", "data": { "appContextId": "miZPa8ef1Xj5Vl7YmSyYVxKdbJDBIMNK", "avatar": "https://avatar.server/8GWl2rOF" }, "invitePolicy": "AdminsOnly", "keyState": "Synced", "localData": { "someData": "someValue" }, "subject": "Are belong to us" } ], "type": "chat" } } ]
Type | chatMessage |
---|---|
Since | 2017.02 |
Primary key | chatId, messageId |
Actions | requestListChange, requestListElements, requestListMatching |
Events | listAdd, listChange, listElements, listResync |
Each element in this list is a message in a chat. The primary key for each element is the 'chatId' and 'messageId'.
The range of valid message ids for a given chat can be found in the chat list as ['lastMessage' - 'numMessages', 'lastMessage'].
When a new message is added to a chat, bbmcore will first 'listAdd' the message entry, and then will 'listChange' the chat to update the 'lastMessage' and 'numMessages' fields.
Note that 'listRemove' is not supported for this list. The message counters maintained in the chat list indicate when messages have been removed from this list.
Name | Type | Req | Since | Log | Description | ||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
chatId | chat key | Req | 2017.02 | Yes | The unique identifier of the chat to which this message belongs. |
||||||||||||||||||||||||||||||||||||||||||
content | string | Opt | 2017.02 | No | Holds the text content of the message, when the 'tag' has such a concept; otherwise omitted. |
||||||||||||||||||||||||||||||||||||||||||
data | object | Opt | 2017.02 | Yes | This field contains opaque data managed by your application that is sent with the message. Unless specifically noted, bbmcore does not examine or modify this JSON object. This can contain a single JSON object, or it can not exist at all. It cannot contain any other JSON type. Many 'tag' values have a corresponding object defined as a child of the 'data' object with a key equal to the 'tag'. All 'tags' with such a corresponding child of 'data' require that child to be present. Other tags have no such requirement. The 'data' object can also contain other key-value pairs independently from the 'tag'.
|
||||||||||||||||||||||||||||||||||||||||||
externalId | string | Opt | R13 | Yes | The identifier used externally to uniquely identify this chat message, base64-encoded with the RFC 4648 Section 4 (default) alphabet and padding. This field is present iff this chat message has such an identifier when this BBMDS message was emitted. Bbmcore does not emit 'listChange' or 'listElement' messages when this identifier becomes known for a message that previously lacked one. |
||||||||||||||||||||||||||||||||||||||||||
file | string | Opt | 2017.02 | No | A path to a large file that is not carried in the message. This file is uploaded or download by bbmcore automatically. For downloads, this will only be set once 'fileState' progresses to 'Done'. A maximum file size limit of 128 MB is imposed by bbmcore. The size limit may change in future versions. Clients that encounter files that are larger than their maximums will not download them. |
||||||||||||||||||||||||||||||||||||||||||
fileSize | number (uint64) | Opt | R7 | No | The advertised size of the file, in bytes, as indicated by the sender. This field is only meaningful when this message has a file attachment. The actual file size can differ from this advertised size. When the sender did not indicate a size, this field will not be present. Otherwise, this value is available in all 'fileState' states, even before any attempt is made to download a received attachment. Your application can use this value to decide whether or not to download the attachment. In versions after this field was introduced, bbmcore automatically includes this size value when attaching a file to an outgoing message. |
||||||||||||||||||||||||||||||||||||||||||
fileState | string | Opt | 2017.02 | Yes | Indicates the state of file upload or download. Generally, whether the transfer is an upload or download is not exposed to your application. However, some states imply that the transfer is a download that can be started or restarted by the 'chatMessageFileDownload' message. The 'incoming' 'flag' on this 'chatMessage' does not indicate whether the transfer is an upload or download. Bbmcore automatically handles temporary errors during uploads and downloads. Such errors and the retries that occur are not exposed to your application. Eventually, bbmcore will give up and place a transfer into either the 'Failed' or 'FailedAvailable' state. This field is an enumeration.
|
||||||||||||||||||||||||||||||||||||||||||
flags | string | Req | 2017.02 | Yes | Compact read-only flags about the message. Each flag that is 'true' has its corresponding letter present in the string. Each flag that is 'false' has its corresponding letter not present in the string. The letters will always be provided in alphabetical order.
|
||||||||||||||||||||||||||||||||||||||||||
localData | object | Opt | R5 | No | This field contains opaque local-only data managed by your application that is associated to the message. This field will be omitted until your application sets it via 'requestListChange'. When present, it will always be a valid JSON object. |
||||||||||||||||||||||||||||||||||||||||||
messageId | string (uint64) | Req | 2017.02 | Yes | The unique identifier for this message. These are consecutive integers, ordered by arrival time. The range of valid integers for a given chat is stored in 'listChat's 'lastMessage' and 'numMessages' values. |
||||||||||||||||||||||||||||||||||||||||||
recall | string | Opt None | 2017.02 | Yes | This field indicates the recall state of the message. This field is an enumeration.
|
||||||||||||||||||||||||||||||||||||||||||
ref | array | Opt | R5 | Yes | A 'chatMessage' can reference other messages or be referenced by other messages. All references are directional and known to both messages involved. If message A references message B, then A has an entry in its 'ref' array with the 'messageId' of B, and B has an entry in its 'refBy' array that counts the reference from A. Each reference in the 'ref' array has an application-specified 'tag' that indicates what kind of reference it is. A single message can only have one 'ref' for each tag string. Your application uses 'tag' strings to allow multiple different kinds of references between messages. For example, a message could both 'Quote' one message and 'Edit' another. Each reference in the 'refBy' array has the same application-specified tag. A single message can have multiple references to it with the same 'tag'. To find all messages that refer to a given message, use 'requestListMatching' with the 'tag' and the 'messageId' of the referred-to message. Because the number of incoming references to a message can be large, only the most recent referring message is identified by 'newestRef' in 'refBy', along with a count of the total number of referring messages. When there are no references to any other messages, the 'ref' field is omitted. The following table describes the type of each array element.
|
||||||||||||||||||||||||||||||||||||||||||
refBy | array | Opt | R5 | Yes | See 'ref' for an explanation of 'ref' and 'refBy'. This field will be omitted entirely if there are no references from other messages. The following table describes the type of each array element.
|
||||||||||||||||||||||||||||||||||||||||||
senderUri | user key | Req | 2017.02 | Yes | Holds the user URI of the sender of this message. See the URIs section for information on the URI format. |
||||||||||||||||||||||||||||||||||||||||||
state | string | Req | 2017.02 | Yes | This field indicates the overall delivery state of the message. This field is an enumeration.
|
||||||||||||||||||||||||||||||||||||||||||
stateIsPartial | boolean | Req | 2017.02 | Yes | This indicates whether or not the state applies to some (true) or all (false) recipients. |
||||||||||||||||||||||||||||||||||||||||||
tag | string | Req | 2017.02 | Yes | Indicates the type of content this message represents. This field is an enumeration.
|
||||||||||||||||||||||||||||||||||||||||||
thumb | string | Opt | 2017.02 | No | A path to a small file that is carried in the message. |
||||||||||||||||||||||||||||||||||||||||||
timestamp | number (uint64) | Req | 2017.02 | Yes | The time at which this message was posted to the BlackBerry Infrastructure, in seconds since 1970. |
Message | requestListChange |
---|---|
Since | R5 |
Attributes | localData |
requestListChange may be used to change certain fields of a message.
Message | requestListMatching | ||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Description | Use requestListMatching to lookup subsets of this list. | ||||||||||||||||||||
Criteria |
|
Message | listResync | ||||||||
---|---|---|---|---|---|---|---|---|---|
Description | bbmcore will emit this event to indicate that elements of the list that match the given criteria have potentially changed or been removed. | ||||||||
Criteria |
|
[ { "listAdd": { "elements": [ { "chatId": "8475", "content": "Hello world!", "flags": "I", "localData": { "field": "value" }, "messageId": "793873", "recall": "None", "ref": [ { "messageId": "236", "tag": "Quote" }, { "messageId": "56", "tag": "Edit" }, { "messageId": "8", "tag": "Thread" } ], "senderUri": "bbmpim://user/id/29", "state": "Delivered", "stateIsPartial": false, "tag": "Text", "timestamp": 30987309874 }, { "chatId": "5", "flags": "I", "localData": {}, "messageId": "236", "recall": "None", "refBy": [ { "count": 1, "newestRef": "793873", "tag": "Quote" }, { "count": 7, "newestRef": "793873", "tag": "Thread" } ], "senderUri": "bbmpim://user/id/29", "state": "Delivered", "stateIsPartial": false, "tag": "Join", "timestamp": 30987309921 }, { "chatId": "4347", "content": "Goodbye cruel world!", "flags": "", "messageId": "799873", "recall": "None", "senderUri": "bbmpim://user/id/0", "state": "Delivered", "stateIsPartial": true, "tag": "Text", "timestamp": 309873099870 }, { "chatId": "4347", "data": { "Admin": { "promotion": true, "userUri": "bbmpim://user/id/1" }, "forwarded": false, "priority": "None" }, "file": "/files/report.doc", "fileState": "Done", "flags": "", "messageId": "799874", "recall": "None", "senderUri": "bbmpim://user/id/0", "state": "Delivered", "stateIsPartial": true, "tag": "Admin", "timestamp": 309873099871 }, { "chatId": "4347", "content": "Here is my report", "data": { "File": { "contentType": "application/msword", "suggestedFilename": "report.doc" }, "forwarded": false, "priority": "None" }, "file": "/files/report.doc", "fileState": "Done", "flags": "", "messageId": "799874", "recall": "None", "senderUri": "bbmpim://user/id/0", "state": "Delivered", "stateIsPartial": true, "tag": "File", "timestamp": 309873099871 }, { "chatId": "6", "content": "Follow me on Glympse: www.glympse.com", "data": { "Glympse": { "id": "123234232" }, "forwarded": false, "priority": "None" }, "flags": "", "messageId": "6", "recall": "None", "senderUri": "bbmpim://user/id/0", "state": "Delivered", "stateIsPartial": true, "tag": "Glympse", "timestamp": 309873099871 }, { "chatId": "7", "content": "Follow me on Glympse: www.glympse.com", "data": { "GlympseRequest": { "duration": 300 }, "forwarded": false, "priority": "None" }, "flags": "", "messageId": "7", "recall": "None", "senderUri": "bbmpim://user/id/0", "state": "Delivered", "stateIsPartial": true, "tag": "GlympseRequest", "timestamp": 309873099871 }, { "chatId": "8", "content": "Important Message", "data": { "forwarded": false, "priority": "High" }, "flags": "", "messageId": "8", "recall": "None", "senderUri": "bbmpim://user/id/0", "state": "Delivered", "stateIsPartial": true, "tag": "Text", "timestamp": 309873099871 }, { "chatId": "9", "content": "The answer is 2.", "data": { "Quote": { "source": "John Doe", "text": "What is 1+1?", "timestamp": 562737600 }, "forwarded": false, "priority": "None" }, "flags": "IU", "messageId": "9", "recall": "None", "senderUri": "bbmpim://user/id/0", "state": "Delivered", "stateIsPartial": true, "tag": "Quote", "timestamp": 309873099871 }, { "chatId": "10", "content": "Me too!", "data": { "ReferencedUpdate": { "type": "PersonalMessage", "update": "Looking forward to this weekend." }, "forwarded": false, "priority": "None" }, "flags": "", "messageId": "10", "recall": "None", "senderUri": "bbmpim://user/id/0", "state": "Delivered", "stateIsPartial": true, "tag": "ReferencedUpdate", "timestamp": 309873099871 }, { "chatId": "4347", "data": { "Remove": { "userUri": "bbmpim://user/id/1" }, "forwarded": false, "priority": "None" }, "flags": "", "messageId": "799874", "recall": "None", "senderUri": "bbmpim://user/id/0", "state": "Delivered", "stateIsPartial": true, "tag": "Remove", "timestamp": 309873099871 }, { "chatId": "11", "flags": "", "messageId": "11", "recall": "None", "senderUri": "bbmpim://user/id/0", "state": "Delivered", "stateIsPartial": true, "tag": "Screencap", "timestamp": 309873099871 }, { "chatId": "12", "data": { "Call": { "callType": "Video", "duration": 326, "eventType": "Ended", "secure": false }, "forwarded": false, "priority": "None" }, "flags": "", "messageId": "12", "recall": "None", "senderUri": "bbmpim://user/id/12", "state": "Delivered", "stateIsPartial": true, "tag": "Call", "timestamp": 309873099861 }, { "chatId": "12", "data": { "InviteStatus": { "status": "InterOrgRestriction" }, "forwarded": false, "priority": "None" }, "flags": "", "messageId": "12", "recall": "None", "senderUri": "bbmpim://user/id/12", "state": "Delivered", "stateIsPartial": true, "tag": "InviteStatus", "timestamp": 309873099861 }, { "chatId": "12", "data": { "Leave": { "reason": "InterOrgRestriction" }, "forwarded": false, "priority": "None" }, "flags": "", "messageId": "12", "recall": "None", "senderUri": "bbmpim://user/id/12", "state": "Delivered", "stateIsPartial": true, "tag": "Leave", "timestamp": 309873099861 }, { "chatId": "12", "flags": "", "messageId": "12", "recall": "None", "senderUri": "bbmpim://user/id/12", "state": "Delivered", "stateIsPartial": true, "tag": "Leave", "timestamp": 309873099861 }, { "chatId": "13", "data": { "Location": { "altitude": "3", "city": "Halifax", "country": "Canada", "horizontalAccuracy": "90", "latitude": "44.64692", "longitude": "-63.57822", "name": "Halifax, NS, Canada", "postalCode": "", "state": "NS", "street": "" }, "forwarded": false, "priority": "None" }, "flags": "", "messageId": "13", "recall": "None", "senderUri": "bbmpim://user/id/13", "state": "Delivered", "stateIsPartial": true, "tag": "Location", "timestamp": 309873090861 }, { "chatId": "1000", "content": "Let's discuss this with the others.", "data": { "MediaConf": { "requireAuth": false, "url": "https://conf.bbm.bbmenterprise.com/join?appId=example" }, "forwarded": false, "priority": "None" }, "flags": "", "messageId": "2000", "recall": "None", "senderUri": "bbmpim://user/id/3000", "state": "Delivered", "stateIsPartial": true, "tag": "MediaConf", "timestamp": 309873090861 }, { "chatId": "14", "data": { "Sticker": { "id": "14" }, "forwarded": false, "priority": "None" }, "flags": "", "messageId": "14", "recall": "None", "senderUri": "bbmpim://user/id/14", "state": "Delivered", "stateIsPartial": true, "tag": "Sticker", "timestamp": 309873099861 }, { "chatId": "15", "content": "Cats are funny!", "data": { "Picture": { "mimeType": "image/jpeg", "suggestedFilename": "funny_cat.jpg" }, "forwarded": false, "priority": "None" }, "file": "/picture/funny_cat.jpg", "fileState": "Done", "flags": "", "messageId": "799874", "recall": "None", "senderUri": "bbmpim://user/id/0", "state": "Delivered", "stateIsPartial": true, "tag": "Picture", "thumb": "/picture/funny_cat_small.jpg", "timestamp": 309873099871 }, { "chatId": "16", "content": "Here's the sales rep's info", "data": { "Contact": { "suggestedFilename": "JohnDoe.vcf" }, "forwarded": false, "priority": "None" }, "file": "/contact/JohnDoe.vcf", "fileState": "Done", "flags": "", "messageId": "16", "recall": "None", "senderUri": "bbmpim://user/id/16", "state": "Delivered", "stateIsPartial": true, "tag": "Contact", "timestamp": 309873099871 }, { "chatId": "17", "content": "Our meeting tomorrow", "data": { "Calendar": { "suggestedFilename": "meeting.ics" }, "forwarded": false, "priority": "None" }, "file": "/calendar/meeting.ics", "fileState": "Done", "flags": "", "messageId": "17", "recall": "None", "senderUri": "bbmpim://user/id/17", "state": "Delivered", "stateIsPartial": true, "tag": "Calendar", "timestamp": 309873099871 }, { "chatId": "18", "data": { "VoiceNote": { "suggestedFilename": "note.amr" }, "forwarded": false, "priority": "None" }, "file": "/voicenotes/note.amr", "fileState": "Done", "flags": "", "messageId": "18", "recall": "None", "senderUri": "bbmpim://user/id/18", "state": "Delivered", "stateIsPartial": true, "tag": "VoiceNote", "timestamp": 309873099871 }, { "chatId": "38663836456", "flags": "I", "messageId": "8575645352", "recall": "None", "senderUri": "bbmpim://user/id/0", "state": "Delivered", "stateIsPartial": false, "tag": "Gap", "timestamp": 30984323543 }, { "chatId": "19", "content": "https://www.blackberry.com/us/en/products/blackberry-spark-platform", "data": { "Link": { "descr": "BlackBerry Spark is the only Enterprise of Things (EoT) platform designed and built for ultra-secure hyperconnectivity from the kernel to the edge.", "image": "https://rimblogs.files.wordpress.com/2017/06/business-man-secure.png", "name": "BlackBerry Spark", "title": "BlackBerry Spark: The EoT Platform for Ultra-secure Hyperconnectivity", "url": "https://www.blackberry.com/us/en/products/blackberry-spark-platform" }, "forwarded": false, "priority": "None" }, "flags": "", "messageId": "19", "recall": "None", "senderUri": "bbmpim://user/id/14", "state": "Delivered", "stateIsPartial": false, "tag": "Link", "timestamp": 309873099861 }, { "chatId": "19", "content": "@John Doe, can you please respond to the request from @Jane Doe.", "data": { "forwarded": false, "mentions": { "users": [ { "len": 9, "pos": 0, "regId": "1602329767" }, { "len": 9, "pos": 55, "regId": "1404567733" } ] }, "priority": "None" }, "flags": "", "messageId": "20", "recall": "None", "senderUri": "bbmpim://user/id/14", "state": "Delivered", "stateIsPartial": false, "tag": "Text", "timestamp": 309873039661 } ], "type": "chatMessage" } }, { "listElements": { "type": "chatMessage" } }, { "listChunk": { "elements": [ { "chatId": "8475", "content": "Hello world!", "flags": "I", "localData": { "field": "value" }, "messageId": "793873", "recall": "None", "ref": [ { "messageId": "236", "tag": "Quote" }, { "messageId": "56", "tag": "Edit" }, { "messageId": "8", "tag": "Thread" } ], "senderUri": "bbmpim://user/id/29", "state": "Delivered", "stateIsPartial": false, "tag": "Text", "timestamp": 30987309874 }, { "chatId": "5", "flags": "I", "localData": {}, "messageId": "236", "recall": "None", "refBy": [ { "count": 1, "newestRef": "793873", "tag": "Quote" }, { "count": 7, "newestRef": "793873", "tag": "Thread" } ], "senderUri": "bbmpim://user/id/29", "state": "Delivered", "stateIsPartial": false, "tag": "Join", "timestamp": 30987309921 }, { "chatId": "4347", "content": "Goodbye cruel world!", "flags": "", "messageId": "799873", "recall": "None", "senderUri": "bbmpim://user/id/0", "state": "Delivered", "stateIsPartial": true, "tag": "Text", "timestamp": 309873099870 }, { "chatId": "4347", "data": { "Admin": { "promotion": true, "userUri": "bbmpim://user/id/1" }, "forwarded": false, "priority": "None" }, "file": "/files/report.doc", "fileState": "Done", "flags": "", "messageId": "799874", "recall": "None", "senderUri": "bbmpim://user/id/0", "state": "Delivered", "stateIsPartial": true, "tag": "Admin", "timestamp": 309873099871 }, { "chatId": "4347", "content": "Here is my report", "data": { "File": { "contentType": "application/msword", "suggestedFilename": "report.doc" }, "forwarded": false, "priority": "None" }, "file": "/files/report.doc", "fileState": "Done", "flags": "", "messageId": "799874", "recall": "None", "senderUri": "bbmpim://user/id/0", "state": "Delivered", "stateIsPartial": true, "tag": "File", "timestamp": 309873099871 }, { "chatId": "6", "content": "Follow me on Glympse: www.glympse.com", "data": { "Glympse": { "id": "123234232" }, "forwarded": false, "priority": "None" }, "flags": "", "messageId": "6", "recall": "None", "senderUri": "bbmpim://user/id/0", "state": "Delivered", "stateIsPartial": true, "tag": "Glympse", "timestamp": 309873099871 }, { "chatId": "7", "content": "Follow me on Glympse: www.glympse.com", "data": { "GlympseRequest": { "duration": 300 }, "forwarded": false, "priority": "None" }, "flags": "", "messageId": "7", "recall": "None", "senderUri": "bbmpim://user/id/0", "state": "Delivered", "stateIsPartial": true, "tag": "GlympseRequest", "timestamp": 309873099871 }, { "chatId": "8", "content": "Important Message", "data": { "forwarded": false, "priority": "High" }, "flags": "", "messageId": "8", "recall": "None", "senderUri": "bbmpim://user/id/0", "state": "Delivered", "stateIsPartial": true, "tag": "Text", "timestamp": 309873099871 }, { "chatId": "9", "content": "The answer is 2.", "data": { "Quote": { "source": "John Doe", "text": "What is 1+1?", "timestamp": 562737600 }, "forwarded": false, "priority": "None" }, "flags": "IU", "messageId": "9", "recall": "None", "senderUri": "bbmpim://user/id/0", "state": "Delivered", "stateIsPartial": true, "tag": "Quote", "timestamp": 309873099871 }, { "chatId": "10", "content": "Me too!", "data": { "ReferencedUpdate": { "type": "PersonalMessage", "update": "Looking forward to this weekend." }, "forwarded": false, "priority": "None" }, "flags": "", "messageId": "10", "recall": "None", "senderUri": "bbmpim://user/id/0", "state": "Delivered", "stateIsPartial": true, "tag": "ReferencedUpdate", "timestamp": 309873099871 }, { "chatId": "4347", "data": { "Remove": { "userUri": "bbmpim://user/id/1" }, "forwarded": false, "priority": "None" }, "flags": "", "messageId": "799874", "recall": "None", "senderUri": "bbmpim://user/id/0", "state": "Delivered", "stateIsPartial": true, "tag": "Remove", "timestamp": 309873099871 }, { "chatId": "11", "flags": "", "messageId": "11", "recall": "None", "senderUri": "bbmpim://user/id/0", "state": "Delivered", "stateIsPartial": true, "tag": "Screencap", "timestamp": 309873099871 }, { "chatId": "12", "data": { "Call": { "callType": "Video", "duration": 326, "eventType": "Ended", "secure": false }, "forwarded": false, "priority": "None" }, "flags": "", "messageId": "12", "recall": "None", "senderUri": "bbmpim://user/id/12", "state": "Delivered", "stateIsPartial": true, "tag": "Call", "timestamp": 309873099861 }, { "chatId": "12", "data": { "InviteStatus": { "status": "InterOrgRestriction" }, "forwarded": false, "priority": "None" }, "flags": "", "messageId": "12", "recall": "None", "senderUri": "bbmpim://user/id/12", "state": "Delivered", "stateIsPartial": true, "tag": "InviteStatus", "timestamp": 309873099861 }, { "chatId": "12", "data": { "Leave": { "reason": "InterOrgRestriction" }, "forwarded": false, "priority": "None" }, "flags": "", "messageId": "12", "recall": "None", "senderUri": "bbmpim://user/id/12", "state": "Delivered", "stateIsPartial": true, "tag": "Leave", "timestamp": 309873099861 }, { "chatId": "12", "flags": "", "messageId": "12", "recall": "None", "senderUri": "bbmpim://user/id/12", "state": "Delivered", "stateIsPartial": true, "tag": "Leave", "timestamp": 309873099861 }, { "chatId": "13", "data": { "Location": { "altitude": "3", "city": "Halifax", "country": "Canada", "horizontalAccuracy": "90", "latitude": "44.64692", "longitude": "-63.57822", "name": "Halifax, NS, Canada", "postalCode": "", "state": "NS", "street": "" }, "forwarded": false, "priority": "None" }, "flags": "", "messageId": "13", "recall": "None", "senderUri": "bbmpim://user/id/13", "state": "Delivered", "stateIsPartial": true, "tag": "Location", "timestamp": 309873090861 }, { "chatId": "1000", "content": "Let's discuss this with the others.", "data": { "MediaConf": { "requireAuth": false, "url": "https://conf.bbm.bbmenterprise.com/join?appId=example" }, "forwarded": false, "priority": "None" }, "flags": "", "messageId": "2000", "recall": "None", "senderUri": "bbmpim://user/id/3000", "state": "Delivered", "stateIsPartial": true, "tag": "MediaConf", "timestamp": 309873090861 }, { "chatId": "14", "data": { "Sticker": { "id": "14" }, "forwarded": false, "priority": "None" }, "flags": "", "messageId": "14", "recall": "None", "senderUri": "bbmpim://user/id/14", "state": "Delivered", "stateIsPartial": true, "tag": "Sticker", "timestamp": 309873099861 }, { "chatId": "15", "content": "Cats are funny!", "data": { "Picture": { "mimeType": "image/jpeg", "suggestedFilename": "funny_cat.jpg" }, "forwarded": false, "priority": "None" }, "file": "/picture/funny_cat.jpg", "fileState": "Done", "flags": "", "messageId": "799874", "recall": "None", "senderUri": "bbmpim://user/id/0", "state": "Delivered", "stateIsPartial": true, "tag": "Picture", "thumb": "/picture/funny_cat_small.jpg", "timestamp": 309873099871 }, { "chatId": "16", "content": "Here's the sales rep's info", "data": { "Contact": { "suggestedFilename": "JohnDoe.vcf" }, "forwarded": false, "priority": "None" }, "file": "/contact/JohnDoe.vcf", "fileState": "Done", "flags": "", "messageId": "16", "recall": "None", "senderUri": "bbmpim://user/id/16", "state": "Delivered", "stateIsPartial": true, "tag": "Contact", "timestamp": 309873099871 }, { "chatId": "17", "content": "Our meeting tomorrow", "data": { "Calendar": { "suggestedFilename": "meeting.ics" }, "forwarded": false, "priority": "None" }, "file": "/calendar/meeting.ics", "fileState": "Done", "flags": "", "messageId": "17", "recall": "None", "senderUri": "bbmpim://user/id/17", "state": "Delivered", "stateIsPartial": true, "tag": "Calendar", "timestamp": 309873099871 }, { "chatId": "18", "data": { "VoiceNote": { "suggestedFilename": "note.amr" }, "forwarded": false, "priority": "None" }, "file": "/voicenotes/note.amr", "fileState": "Done", "flags": "", "messageId": "18", "recall": "None", "senderUri": "bbmpim://user/id/18", "state": "Delivered", "stateIsPartial": true, "tag": "VoiceNote", "timestamp": 309873099871 }, { "chatId": "38663836456", "flags": "I", "messageId": "8575645352", "recall": "None", "senderUri": "bbmpim://user/id/0", "state": "Delivered", "stateIsPartial": false, "tag": "Gap", "timestamp": 30984323543 }, { "chatId": "19", "content": "https://www.blackberry.com/us/en/products/blackberry-spark-platform", "data": { "Link": { "descr": "BlackBerry Spark is the only Enterprise of Things (EoT) platform designed and built for ultra-secure hyperconnectivity from the kernel to the edge.", "image": "https://rimblogs.files.wordpress.com/2017/06/business-man-secure.png", "name": "BlackBerry Spark", "title": "BlackBerry Spark: The EoT Platform for Ultra-secure Hyperconnectivity", "url": "https://www.blackberry.com/us/en/products/blackberry-spark-platform" }, "forwarded": false, "priority": "None" }, "flags": "", "messageId": "19", "recall": "None", "senderUri": "bbmpim://user/id/14", "state": "Delivered", "stateIsPartial": false, "tag": "Link", "timestamp": 309873099861 }, { "chatId": "19", "content": "@John Doe, can you please respond to the request from @Jane Doe.", "data": { "forwarded": false, "mentions": { "users": [ { "len": 9, "pos": 0, "regId": "1602329767" }, { "len": 9, "pos": 55, "regId": "1404567733" } ] }, "priority": "None" }, "flags": "", "messageId": "20", "recall": "None", "senderUri": "bbmpim://user/id/14", "state": "Delivered", "stateIsPartial": false, "tag": "Text", "timestamp": 309873039661 } ], "last": true, "type": "chatMessage" } }, { "listChange": { "elements": [ { "chatId": "8475", "localData": { "field": "value" }, "messageId": "793873" }, { "chatId": "5", "localData": {}, "messageId": "236" }, { "chatId": "4347", "messageId": "799873" }, { "chatId": "4347", "messageId": "799874" }, { "chatId": "4347", "messageId": "799874" }, { "chatId": "6", "messageId": "6" }, { "chatId": "7", "messageId": "7" }, { "chatId": "8", "messageId": "8" }, { "chatId": "9", "messageId": "9" }, { "chatId": "10", "messageId": "10" }, { "chatId": "4347", "messageId": "799874" }, { "chatId": "11", "messageId": "11" }, { "chatId": "12", "messageId": "12" }, { "chatId": "12", "messageId": "12" }, { "chatId": "12", "messageId": "12" }, { "chatId": "12", "messageId": "12" }, { "chatId": "13", "messageId": "13" }, { "chatId": "1000", "messageId": "2000" }, { "chatId": "14", "messageId": "14" }, { "chatId": "15", "messageId": "799874" }, { "chatId": "16", "messageId": "16" }, { "chatId": "17", "messageId": "17" }, { "chatId": "18", "messageId": "18" }, { "chatId": "38663836456", "messageId": "8575645352" }, { "chatId": "19", "messageId": "19" }, { "chatId": "19", "messageId": "20" } ], "type": "chatMessage" } } ]
Type | chatMessageFileProgress |
---|---|
Since | R5 |
Primary key | chatId, messageId |
Actions | requestListElements |
Events | listAdd, listChange, listElements, listRemove |
This list reports upload and download progress information for active 'chatMessage' file attachment transfers.
Each item in this list corresponds to a single 'chatMessage' entry and is identified by the same key fields: 'chatId' and 'messageId'. When an entry exists in this list, bbmcore is actively trying to upload or download the attached file. The fields of the entry in this list indicate the progress bbmcore has made in that active transfer. When an entry is removed from this list, bbmcore is no longer actively trying to transfer it. When a transfer attempt fails, it will not be represented in this list until bbmcore retries it, but the associated 'chatMessage' 'fileState' will still be 'Transferring'.
Changes in this list will be reported only when the previously reported value of 'bytes' and the current value of 'bytes' differ enough that the progress towards the 'total' achieves a different 5% increment.
For example, if a file was 100 bytes in 'total' and the previous report was 37 'bytes', then a change would only be reported for this entry after 'bytes' reached at least 40. A change from 37 to 39 would not be reported by bbmcore because 'bytes' must reach at least 40 to move from the 35-40% increment to the 40-45% (or higher) increment.
Your application doesn't have to wait for a change in 'bytes' to get an initial progress value for an active transfer it has previously been ignoring. Your application can query the list directly with 'requestListElements' at any time. When such a request returns no entry for a given pair of ids, it means that bbmcore isn't currently trying to upload or download the attached file or no progress information is available for the transfer. (See the caveat on 'total'.)
Name | Type | Req | Since | Log | Description |
---|---|---|---|---|---|
bytes | number (uint64) | Req | R5 | Yes | The number of bytes transferred so far in this attempt. Your application must not depend on this reaching 'total' to mean the transfer succeeded or completed. Use the 'fileState' of the actual 'chatMessage' to determine the overall transfer state. |
chatId | chat key | Req | R5 | Yes | Holds the id of the chat that contains the attachment's message. |
messageId | chatMessage key | Req | R5 | Yes | Holds the id of the message (within that chat referred to by 'chatId') whose attachment's transfer progress is being reported. |
total | number (uint64) | Req | R5 | Yes | The total number of bytes expected in the transfer. If for some reason the total number of bytes cannot be determined or if the total number of bytes is zero, the transfer will not report progress via this list. This doesn't mean that bbmcore isn't trying to perform the transfer in such cases. Thus, this value is never zero and never changes until the list element is removed. |
[ { "listAdd": { "elements": [ { "bytes": 0, "chatId": "12", "messageId": "2", "total": 1000 }, { "bytes": 16384, "chatId": "1", "messageId": "8122", "total": 32768 }, { "bytes": 400, "chatId": "1", "messageId": "8123", "total": 400 } ], "type": "chatMessageFileProgress" } }, { "listRemove": { "elements": [ { "chatId": "12", "messageId": "2" }, { "chatId": "1", "messageId": "8122" }, { "chatId": "1", "messageId": "8123" } ], "type": "chatMessageFileProgress" } }, { "listElements": { "type": "chatMessageFileProgress" } }, { "listChunk": { "elements": [ { "bytes": 0, "chatId": "12", "messageId": "2", "total": 1000 }, { "bytes": 16384, "chatId": "1", "messageId": "8122", "total": 32768 }, { "bytes": 400, "chatId": "1", "messageId": "8123", "total": 400 } ], "last": true, "type": "chatMessageFileProgress" } } ]
Type | chatParticipant |
---|---|
Since | R4 |
Primary key | chatId, userUri |
Actions | requestListElements, requestListMatching |
Events | listAdd, listChange, listElements, listRemove |
This list holds the participants for each chat identified by chatId. The local user is never included in this list.
Name | Type | Req | Since | Log | Description | ||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
chatId | string | Req | R4 | Yes | The id of the chat this participant is a member of. |
||||||||
flags | string | Req | R4 | Yes | Compact read-only flags about the participant. Each flag that is 'true' has its corresponding letter present in the string. Each flag that is 'false' has its corresponding letter not present in the string. The letters will always be provided in alphabetical order.
|
||||||||
state | string | Req | R4 | Yes | The current state of the participant. This field is an enumeration.
|
||||||||
userUri | user key | Req | R4 | Yes | The URI of the user this participant represents. |
Message | requestListMatching | ||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Description | Use requestListMatching to lookup subsets of this list. | ||||||||||||||||
Criteria |
|
[ { "listAdd": { "elements": [ { "chatId": "2398734", "flags": "", "state": "Active", "userUri": "bbmpim://user/id/123" }, { "chatId": "77", "flags": "A", "state": "Pending", "userUri": "bbmpim://user/id/321" } ], "type": "chatParticipant" } }, { "listRemove": { "elements": [ { "chatId": "2398734", "userUri": "bbmpim://user/id/123" }, { "chatId": "77", "userUri": "bbmpim://user/id/321" } ], "type": "chatParticipant" } }, { "listElements": { "type": "chatParticipant" } }, { "listChunk": { "elements": [ { "chatId": "2398734", "flags": "", "state": "Active", "userUri": "bbmpim://user/id/123" }, { "chatId": "77", "flags": "A", "state": "Pending", "userUri": "bbmpim://user/id/321" } ], "last": true, "type": "chatParticipant" } } ]
Type | global |
---|---|
Since | 2.1 |
Primary key | name |
Actions | requestListChange, requestListElements |
Events | listChange, listElements |
This list holds the set of global variables exchanged between your application and bbmcore. The list uses string keys and mixed-type values. The key is the variable name. The set of valid variables and their meaning is documented in the 'globals' section.
Name | Type | Req | Since | Log | Description |
---|---|---|---|---|---|
name | string | Req | 2.1 | Yes | String name of the global variable. This list has a closed set of valid variable names. See the 'global' section for information about the set of variables and their semantics. |
value | any | Req | 2.1 | Yes | Value of the variable. The type depends on the variable name, so ignore what 'type' is documented for this attribute here. |
Message | requestListChange |
---|---|
Since | 2.1 |
Attributes | value |
requestListChange is used for modifying the value of a global variable. Certain globals are read-only and will ignore attempts to modify their value. The schema of the value attribute must match the schema of the global itself. See the documentation of the global for more information.
[ { "listElements": { "type": "global" } }, { "listChunk": { "elements": [ { "name": "setupState", "value": { "progressMessage": "Restoring", "state": "Ongoing" } }, { "name": "endpointId", "value": "asd4fgdffssf3987bb0a" } ], "last": true, "type": "global" } }, { "listChange": { "elements": [ { "name": "setupState", "value": { "progressMessage": "Restoring", "state": "Ongoing" } }, { "name": "endpointId", "value": "asd4fgdffssf3987bb0a" } ], "type": "global" } } ]
Type | stat |
---|---|
Since | R5 |
Primary key | name |
Actions | requestListAll |
Events | listAll, listChange, listElements |
Your application uses this list to retrieve stats that bbmcore has recorded about its operation and performance. Stats recorded by bbmcore are local to the device and do not contain personally identifiable information. bbmcore will only ever provide this data to your application when requested to do so.
Every time your application retrieves this list with 'requestListAll', it can contain different data. Bbmcore remembers what values were sent in the most recent 'stat' list collected by your application until your application sends a 'statsCommitted' message. When it receives 'statsCommitted', bbmcore considers the values in the most recently collected 'stat' list to have been exported by your application and committed permanently. After that 'statsCommitted' message, subsequent collections of stats with this list will no longer include that committed data.
If your application can't commit the values it collected with 'requestListAll', it must not send 'statsCommitted'. In such cases, the next copy of of this list that your application collects will be even more up to date and will include the data returned previously (back to the previous 'statsCommitted').
The values in this list persist across bbmcore restarts, and a 'statsCommitted' message can and will complete a 'stats' retrieval even if it was from a previous incarnation of bbmcore.
Statistics whose values are zero when the list is requested are not included in the list.
No 'listElements' or 'listChange' will ever be sent for this list.
This list does not define which statistics are recorded. Interpretation of the statistics is intended to be done by offline analysis and reporting.
Name | Type | Req | Since | Log | Description | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
count | array | Req | R5 | Yes | The count(s) associated with this statistic. Iff there are multiple elements, then this statistic has multiple parts, each with its own scalar counter. Each part that has a non-zero count will be included with a number in the 'count' array and its part name in the 'part' array. The part's name and number will be at corresponding positions in the two arrays. If no 'part' array is present, then the statistic does not have multiple parts and the 'count' array will have only one element. The following table describes the type of each array element.
|
||||||||||
name | string | Req | R5 | Yes | The name of the statistic. |
||||||||||
part | array | Opt | R5 | Yes | Iff there are multiple elements, then this statistic has multiple parts, each with its own scalar counter. Each part that has a non-zero count will be included with a number in the 'count' array and its part name in the 'part' array. The part's name and number will be at corresponding positions in the two arrays. If no 'part' array is present, then the statistic does not have multiple parts and the 'count' array will have only one element. The following table describes the type of each array element.
|
[ { "listAll": { "type": "stat" } }, { "listChunk": { "elements": [ { "count": [ 1 ], "name": "setup" }, { "count": [ 77 ], "name": "setup.err" }, { "count": [ 12, 1, 2 ], "name": "mailbox.addMember", "part": [ "ok", "500", "400" ] }, { "count": [ 42 ], "name": "mailbox.removeMember", "part": [ "ok" ] }, { "count": [ 7, 102, 4 ], "name": "msg", "part": [ "Picture", "Text", "File" ] }, { "count": [ 1, 2, 4 ], "name": "msg.thumb.Picture", "part": [ "4K", "8K", "64K" ] }, { "count": [ 1, 2, 2, 1, 1 ], "name": "msg.file.Picture", "part": [ "256K", "2M", "3M", "4M", "8M" ] }, { "count": [ 2, 1, 1 ], "name": "msg.file.File", "part": [ "128K", "48M", "128M" ] } ], "last": true, "type": "stat" } }, { "listElements": { "type": "stat" } }, { "listChunk": { "elements": [ { "count": [ 1 ], "name": "setup" }, { "count": [ 77 ], "name": "setup.err" }, { "count": [ 12, 1, 2 ], "name": "mailbox.addMember", "part": [ "ok", "500", "400" ] }, { "count": [ 42 ], "name": "mailbox.removeMember", "part": [ "ok" ] }, { "count": [ 7, 102, 4 ], "name": "msg", "part": [ "Picture", "Text", "File" ] }, { "count": [ 1, 2, 4 ], "name": "msg.thumb.Picture", "part": [ "4K", "8K", "64K" ] }, { "count": [ 1, 2, 2, 1, 1 ], "name": "msg.file.Picture", "part": [ "256K", "2M", "3M", "4M", "8M" ] }, { "count": [ 2, 1, 1 ], "name": "msg.file.File", "part": [ "128K", "48M", "128M" ] } ], "last": true, "type": "stat" } } ]
Type | typing |
---|---|
Since | R4 |
Primary key | userUri, chatId |
Actions | requestListAll, requestListElements |
Events | listAdd, listAll, listChange, listElements, listRemove |
This is used to store the set of users that are currently typing a message in a chat. When bbmcore believes the remote user to be typing a message in a chat, it will insert the user/chat pair into this list. When it no longer believes the user to be typing a message, it removes the pair from the list. The same user may be typing in multiple chats, and the same chat may contain multiple typing users. This list never contains entries for the local user. This list may contain entries for nonexistent users and chats.
Name | Type | Req | Since | Log | Description |
---|---|---|---|---|---|
chatId | chat key | Req | R4 | Yes | Holds the id of the chat in which the user is typing. |
messageId | chatMessage key | Opt | R6 | Yes | If supplied, this is the id of the 'chatMessage' the user is taking the action against as indicated by the 'tag' field. This field is never present without the 'tag' field. If the message identified by this field isn't known to the local endpoint when the typing notification arrives, the notification (including 'tag') will still be added to this list, but the 'messageId' field will be omitted. |
tag | string | Opt | R6 | Yes | Your application-specified tag that indicates what kind of typing action the user is performing. For example, this may be used to indicate that the user is taking a picture to send, recording a voice note, or editing an existing message. When omitted, your application must assume the user is typing a message. |
userUri | user key | Req | R4 | Yes | Holds the unique identifier of the user that is currently typing. |
[ { "listAdd": { "elements": [ { "chatId": "239789432", "userUri": "bbmpim://user/id/1" }, { "chatId": "17", "tag": "VoiceNote", "userUri": "bbmpim://user/id/5" }, { "chatId": "17", "messageId": "90", "tag": "Edit", "userUri": "bbmpim://user/id/5" } ], "type": "typing" } }, { "listAll": { "type": "typing" } }, { "listChunk": { "elements": [ { "chatId": "239789432", "userUri": "bbmpim://user/id/1" }, { "chatId": "17", "tag": "VoiceNote", "userUri": "bbmpim://user/id/5" }, { "chatId": "17", "messageId": "90", "tag": "Edit", "userUri": "bbmpim://user/id/5" } ], "last": true, "type": "typing" } }, { "listRemove": { "elements": [ { "chatId": "239789432", "userUri": "bbmpim://user/id/1" }, { "chatId": "17", "userUri": "bbmpim://user/id/5" }, { "chatId": "17", "userUri": "bbmpim://user/id/5" } ], "type": "typing" } }, { "listElements": { "type": "typing" } }, { "listChunk": { "elements": [ { "chatId": "239789432", "userUri": "bbmpim://user/id/1" }, { "chatId": "17", "tag": "VoiceNote", "userUri": "bbmpim://user/id/5" }, { "chatId": "17", "messageId": "90", "tag": "Edit", "userUri": "bbmpim://user/id/5" } ], "last": true, "type": "typing" } } ]
Type | user |
---|---|
Since | 2.0 |
Primary key | uri |
Actions | requestListChange, requestListElements, requestListMatching |
Events | listAdd, listChange, listElements, listRemove |
This list consists of all the users known to bbmcore. Other lists, such as the 'participant' list, often refer to entries in this 'user' list. Your application never requests the list in full. Instead, it uses 'requestListElements' calls to lookup one or more users by their 'uri'.
Name | Type | Req | Since | Log | Description | ||||||
---|---|---|---|---|---|---|---|---|---|---|---|
keyState | string | Opt Synced | R3 | Yes | The current state of the user's keys. A new protected user is created in the 'Import' state. This field is an enumeration.
|
||||||
pin | string | Opt | R4 | No | Holds the user's PIN as an 8-character lowercase hexadecimal string. This field will be omitted when the user has no PIN. |
||||||
regId | string (int64) | Opt | 2014.10 | No | Holds the unique identifier for the user. This identifier is exposed to partner applications. If this field is not present, it indicates that the user does not have a regId or that the regId is unknown. |
||||||
uri | string | Req | 2.1 | Yes | Holds the unique identifier for the user. See the URIs section for information on the URI format. |
Message | requestListMatching | ||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Description | Use requestListMatching to lookup subsets of this list. | ||||||||||||||||
Criteria |
|
[ { "listAdd": { "elements": [ { "avatarHash": "450235345", "category": "Colleagues", "displayName": "J. Binks", "flags": "EPR", "isContact": true, "keyState": "Import", "maxVcardSize": 15, "nickname": "J. Binks", "personalMessage": "Busy writing scripts", "personalMessageTimestamp": "98739872", "uri": "bbmpim://dbid/93" }, { "avatarHash": "150235345", "category": "", "displayName": "G. Smith", "flags": "PQS", "isContact": false, "keyState": "Synced", "maxVcardSize": 194, "nickname": "G. Smith", "personalMessage": "Destroy him, my robots.", "personalMessageTimestamp": "28739872", "uri": "bbmpim://dbid/33" }, { "avatarHash": "34234321", "category": "", "displayName": "H. Solo", "flags": "ER", "isContact": true, "keyState": "Synced", "maxVcardSize": 0, "nickname": "H. Solo", "personalMessage": "I shot first", "personalMessageTimestamp": "2987392", "uri": "bbmpim://dbid/100" }, { "avatarHash": "235345", "category": "", "displayName": "John Smith", "flags": "EPQ", "isContact": false, "keyState": "Synced", "maxVcardSize": 0, "nickname": "John from work", "personalMessage": "Boom goes the dynamite", "personalMessageTimestamp": "3434344", "uri": "bbmpim://dbid/400" }, { "avatarHash": "650235345", "category": "", "displayName": "John Traveller", "flags": "EFPRZ", "isContact": true, "keyState": "Synced", "lastConnectedTime": "1432580033", "maxVcardSize": 0, "nickname": "Johnny", "personalMessage": "", "regId": "123456789012", "uri": "bbmpim://dbid/500" }, { "avatarHash": "9024296666", "category": "Rebels", "displayName": "David", "flags": "EFPR", "isContact": false, "keyState": "Synced", "maxVcardSize": 0, "nickname": "", "org": { "firstName": "David", "id": "a1taxi", "lastName": "Jones", "readOnly": true }, "personalMessage": "", "pin": "ca224cbb", "regId": "19024296666", "uri": "bbmpim://dbid/99" }, { "avatarHash": "9024296666", "category": "", "displayName": "JC", "flags": "EFPR", "isContact": false, "keyState": "Synced", "maxVcardSize": 0, "nickname": "", "org": { "department": "Executives", "firstName": "John", "id": "blackberry", "lastName": "Chen", "readOnly": false, "title": "CEO" }, "personalMessage": "", "pin": "ffff1111", "regId": "1902429777", "uri": "bbmpim://dbid/99" } ], "type": "user" } }, { "listRemove": { "elements": [ { "uri": "bbmpim://dbid/93" }, { "uri": "bbmpim://dbid/33" }, { "uri": "bbmpim://dbid/100" }, { "uri": "bbmpim://dbid/400" }, { "uri": "bbmpim://dbid/500" }, { "uri": "bbmpim://dbid/99" }, { "uri": "bbmpim://dbid/99" } ], "type": "user" } }, { "listElements": { "type": "user" } }, { "listChunk": { "elements": [ { "avatarHash": "450235345", "category": "Colleagues", "displayName": "J. Binks", "flags": "EPR", "isContact": true, "keyState": "Import", "maxVcardSize": 15, "nickname": "J. Binks", "personalMessage": "Busy writing scripts", "personalMessageTimestamp": "98739872", "uri": "bbmpim://dbid/93" }, { "avatarHash": "150235345", "category": "", "displayName": "G. Smith", "flags": "PQS", "isContact": false, "keyState": "Synced", "maxVcardSize": 194, "nickname": "G. Smith", "personalMessage": "Destroy him, my robots.", "personalMessageTimestamp": "28739872", "uri": "bbmpim://dbid/33" }, { "avatarHash": "34234321", "category": "", "displayName": "H. Solo", "flags": "ER", "isContact": true, "keyState": "Synced", "maxVcardSize": 0, "nickname": "H. Solo", "personalMessage": "I shot first", "personalMessageTimestamp": "2987392", "uri": "bbmpim://dbid/100" }, { "avatarHash": "235345", "category": "", "displayName": "John Smith", "flags": "EPQ", "isContact": false, "keyState": "Synced", "maxVcardSize": 0, "nickname": "John from work", "personalMessage": "Boom goes the dynamite", "personalMessageTimestamp": "3434344", "uri": "bbmpim://dbid/400" }, { "avatarHash": "650235345", "category": "", "displayName": "John Traveller", "flags": "EFPRZ", "isContact": true, "keyState": "Synced", "lastConnectedTime": "1432580033", "maxVcardSize": 0, "nickname": "Johnny", "personalMessage": "", "regId": "123456789012", "uri": "bbmpim://dbid/500" }, { "avatarHash": "9024296666", "category": "Rebels", "displayName": "David", "flags": "EFPR", "isContact": false, "keyState": "Synced", "maxVcardSize": 0, "nickname": "", "org": { "firstName": "David", "id": "a1taxi", "lastName": "Jones", "readOnly": true }, "personalMessage": "", "pin": "ca224cbb", "regId": "19024296666", "uri": "bbmpim://dbid/99" }, { "avatarHash": "9024296666", "category": "", "displayName": "JC", "flags": "EFPR", "isContact": false, "keyState": "Synced", "maxVcardSize": 0, "nickname": "", "org": { "department": "Executives", "firstName": "John", "id": "blackberry", "lastName": "Chen", "readOnly": false, "title": "CEO" }, "personalMessage": "", "pin": "ffff1111", "regId": "1902429777", "uri": "bbmpim://dbid/99" } ], "last": true, "type": "user" } }, { "listChange": { "elements": [ { "nickname": "J. Binks", "uri": "bbmpim://dbid/93" }, { "nickname": "G. Smith", "uri": "bbmpim://dbid/33" }, { "nickname": "H. Solo", "uri": "bbmpim://dbid/100" }, { "nickname": "John from work", "uri": "bbmpim://dbid/400" }, { "nickname": "Johnny", "uri": "bbmpim://dbid/500" }, { "nickname": "", "uri": "bbmpim://dbid/99" }, { "nickname": "", "uri": "bbmpim://dbid/99" } ], "type": "user" } } ]
Name | authTokenState |
---|---|
Since | 2016.03 |
This global indicates if bbmcore requires an authToken value from your application, using the 'authToken' message. The authToken value is used by identity providers to grant further authorization within the BlackBerry Infrastructure.
Bbmcore will try to avoid requesting authToken values as much as possible.
Your application may rely on bbmcore to rate limit how often this global value is something other than 'Ok'. Your application should react automatically when this global's value changes.
Type | Req | Since | Log | Description | ||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
string | Req | 2016.03 | Yes | The current state of the authToken value in bbmcore. This field is an enumeration.
|
[ { "listElements": { "type": "global" } }, { "listChunk": { "elements": [ { "name": "authTokenState", "value": "Needed" } ], "last": true, "type": "global" } }, { "listChange": { "elements": [ { "name": "authTokenState", "value": "Needed" } ], "type": "global" } }, { "listElements": { "type": "global" } }, { "listChunk": { "elements": [ { "name": "authTokenState", "value": "Ok" } ], "last": true, "type": "global" } }, { "listChange": { "elements": [ { "name": "authTokenState", "value": "Ok" } ], "type": "global" } } ]
Name | chatMessageFileAutoDownload |
---|---|
Since | R5 |
This controls whether bbmcore will automatically download newly received file attachments.
Regardless of this setting, your application can ask for individual attachments to be downloaded using the 'chatMessageFileDownload' request.
Type | Req | Since | Log | Description |
---|---|---|---|---|
boolean | Req | R5 | Yes | When true (the default), bbmcore will download any 'chatMessage' file attachments as soon as it receives a message with an attachment in a 'Ready' chat. (Messages downloaded as part of chat restoration or joining a chat are never automatically downloaded even when 'chatMessageFileAutoDownload' is set to true. Such file attachments remain in the 'Available' state.) When false, bbmcore will not automatically download any 'chatMessage' file attachments. Available file attachments will remain in the 'Available' state. |
Message | requestListChange |
---|---|
Since | R5 |
Attributes | value |
Your application can change the 'chatMessageFileAutoDownload' setting with 'requestListChange' on the 'global' list.
[ { "listElements": { "type": "global" } }, { "listChunk": { "elements": [ { "name": "chatMessageFileAutoDownload", "value": true } ], "last": true, "type": "global" } }, { "listChange": { "elements": [ { "name": "chatMessageFileAutoDownload", "value": true } ], "type": "global" } } ]
Name | endpointId |
---|---|
Since | R5 |
The identifier for this endpoint. This must be treated as an opaque value by application.
Type | Req | Since | Log | Description |
---|---|---|---|---|
string | Req | R5 | No |
[ { "listElements": { "type": "global" } }, { "listChunk": { "elements": [ { "name": "endpointId", "value": "asd4fgdffssf3987bb0a" } ], "last": true, "type": "global" } }, { "listChange": { "elements": [ { "name": "endpointId", "value": "asd4fgdffssf3987bb0a" } ], "type": "global" } } ]
Name | localPin |
---|---|
Since | 2.1 |
Associates the PIN that is assigned by the BlackBerry Infrastructure with the local profile. The PIN is an 8-character hexadecimal string (in lower case), or it is an empty string if no PIN is currently assigned to the local profile.
Type | Req | Since | Log | Description |
---|---|---|---|---|
string | Req | 2.1 | No |
[ { "listElements": { "type": "global" } }, { "listChunk": { "elements": [ { "name": "localPin", "value": "3987bb0a" } ], "last": true, "type": "global" } }, { "listChange": { "elements": [ { "name": "localPin", "value": "3987bb0a" } ], "type": "global" } }, { "listElements": { "type": "global" } }, { "listChunk": { "elements": [ { "name": "localPin", "value": "" } ], "last": true, "type": "global" } }, { "listChange": { "elements": [ { "name": "localPin", "value": "" } ], "type": "global" } } ]
Name | localUri |
---|---|
Since | 2.2 |
This holds the local user's URI as a foreign key into 'listUser'. When a user URI appears elsewhere in the protocol, your application compares the user URI to the 'localUri' value, to determine if the URI refers to the local user.
Type | Req | Since | Log | Description |
---|---|---|---|---|
user key | Req | 2.2 | No |
[ { "listElements": { "type": "global" } }, { "listChunk": { "elements": [ { "name": "localUri", "value": "bbmpim://user/id/0" } ], "last": true, "type": "global" } }, { "listChange": { "elements": [ { "name": "localUri", "value": "bbmpim://user/id/0" } ], "type": "global" } } ]
Name | profileKeysState |
---|---|
Since | R3 |
Indicates the current state of the profile's signing and encryption key pairs.
This state only applies when your application uses Cloud Key Storage without the BlackBerry Key Management Service.
Type | Req | Since | Log | Description | ||||||
---|---|---|---|---|---|---|---|---|---|---|
string | Req | R3 | Yes | The current state of the profile's keys. A new profile is created in the 'NotSynced' state. This field is an enumeration.
|
Message | requestListChange |
---|---|
Since | R3 |
Attributes | value |
requestListChange can be used to set the state to 'Synced'.
[ { "listElements": { "type": "global" } }, { "listChunk": { "elements": [ { "name": "profileKeysState", "value": "Synced" } ], "last": true, "type": "global" } }, { "listChange": { "elements": [ { "name": "profileKeysState", "value": "Synced" } ], "type": "global" } }, { "listElements": { "type": "global" } }, { "listChunk": { "elements": [ { "name": "profileKeysState", "value": "NotSynced" } ], "last": true, "type": "global" } }, { "listChange": { "elements": [ { "name": "profileKeysState", "value": "NotSynced" } ], "type": "global" } } ]
Name | registrationToken |
---|---|
Since | R5 |
In R5, endpoints are given this registration token when they are assigned a regId during setup. This token is signed by the BlackBerry Infrastructure. When decoded, the token contains trusted information about the association of your application user id (as passed to 'authToken') with the assigned regId. The steps for decoding and verifying the registration token are explained in detail in the Developer Guide.
Endpoints that have not yet been assigned a regId and endpoints that were assigned a regId before the R5 release do not have a registration token value. In those endpoints, this global will be the empty string.
Type | Req | Since | Log | Description |
---|---|---|---|---|
string | Req | R5 | No | The registration token given to this endpoint during setup, or the empty string. See above. |
[ { "listElements": { "type": "global" } }, { "listChunk": { "elements": [ { "name": "registrationToken", "value": "50yjSGScACkfrdPE3CHibuopdF7yQWulFafTepbtOCcALhslpwudzZ7X3cMfwUP9Q8aT52GkwXJ2yqEbSLpkJepHbqwrNOVrirlzoChDXk40mEP6kxqi9uw7uY13UkFz" } ], "last": true, "type": "global" } }, { "listChange": { "elements": [ { "name": "registrationToken", "value": "50yjSGScACkfrdPE3CHibuopdF7yQWulFafTepbtOCcALhslpwudzZ7X3cMfwUP9Q8aT52GkwXJ2yqEbSLpkJepHbqwrNOVrirlzoChDXk40mEP6kxqi9uw7uY13UkFz" } ], "type": "global" } } ]
Name | setupAccount |
---|---|
Since | 2015.04 |
Indicates if a new or existing Spark Communications identity was used during the most recent setup attempt. Note: the value of this global changes before setup is complete. To see what kind of identity was used for the most recent setup attempt that was successful, check this 'setupAccount' value when 'setupState' transitions to 'Success'.
Type | Req | Since | Log | Description | ||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
string | Req | 2015.04 | Yes | Indicates what kind of identity was used for the most recent attempt to set up Spark Communications Services. This field is an enumeration.
|
[ { "listElements": { "type": "global" } }, { "listChunk": { "elements": [ { "name": "setupAccount", "value": "None" } ], "last": true, "type": "global" } }, { "listChange": { "elements": [ { "name": "setupAccount", "value": "None" } ], "type": "global" } }, { "listElements": { "type": "global" } }, { "listChunk": { "elements": [ { "name": "setupAccount", "value": "New" } ], "last": true, "type": "global" } }, { "listChange": { "elements": [ { "name": "setupAccount", "value": "New" } ], "type": "global" } }, { "listElements": { "type": "global" } }, { "listChunk": { "elements": [ { "name": "setupAccount", "value": "Existing" } ], "last": true, "type": "global" } }, { "listChange": { "elements": [ { "name": "setupAccount", "value": "Existing" } ], "type": "global" } } ]
Name | setupState |
---|---|
Since | 2.1 |
This indicates the state of the setup process.
Endpoint setup includes registering the endpoint with the BlackBerry Infrastructure and synchronizing the endpoint's copy of identity data, including any security keys.
The following diagram demonstrates the flow of state changes in 'setupState' for all modes of setup:
Name | Type | Req | Since | Log | Description | ||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
progressMessage | string | Opt | 2.1 | Yes | When the 'state' is 'Ongoing', this indicates the current phase of setup. When the 'state' is not 'Ongoing', this field is omitted or set to 'Unknown'. This field is an enumeration.
|
||||||||||||||||
state | string | Req | 2.1 | Yes | This indicates the current setup state. The initial 'authToken' request triggers bbmcore to begin setup. However, 'authTokenState' transitions don't change the setup state. For example, the 'authTokenState' transitions to 'Rejected' or 'Needed', setup doesn't fail (but it might not succeed until a usable 'authToken' is provided). The 'authTokenState' and the 'setupState' are independent, but 'authToken' can trigger a setup attempt when 'setupState' is set to 'NotRequested'. The only way to stop setup after it starts is by sending the 'wipe' command to delete all bbmcore data. When certain minor errors occur during setup, bbmcore automatically retries the setup by using the 'retryServerRequests' message. These minor errors are handled by bbmcore, and they don't result in 'state' changes. This field is an enumeration.
|
[ { "listElements": { "type": "global" } }, { "listChunk": { "elements": [ { "name": "setupState", "value": { "state": "Success" } } ], "last": true, "type": "global" } }, { "listChange": { "elements": [ { "name": "setupState", "value": { "state": "Success" } } ], "type": "global" } }, { "listElements": { "type": "global" } }, { "listChunk": { "elements": [ { "name": "setupState", "value": { "progressMessage": "Transferring", "state": "Ongoing" } } ], "last": true, "type": "global" } }, { "listChange": { "elements": [ { "name": "setupState", "value": { "progressMessage": "Transferring", "state": "Ongoing" } } ], "type": "global" } } ]
Name | syncPasscodeState |
---|---|
Since | R6 |
This state is only used when your application uses the BlackBerry Key Management Service and the 'setupState' is 'SyncRequired'.
When your application sees 'setupState' change to 'SyncRequired', it should examine this global.
See 'syncStart' for more information.
Type | Req | Since | Log | Description | ||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
string | Req | R6 | Yes | This state tells your application whether bbmcore requires a passcode during the endpoint sync phase of setup. This field is an enumeration.
|
[ { "listElements": { "type": "global" } }, { "listChunk": { "elements": [ { "name": "syncPasscodeState", "value": "None" } ], "last": true, "type": "global" } }, { "listChange": { "elements": [ { "name": "syncPasscodeState", "value": "None" } ], "type": "global" } }, { "listElements": { "type": "global" } }, { "listChunk": { "elements": [ { "name": "syncPasscodeState", "value": "New" } ], "last": true, "type": "global" } }, { "listChange": { "elements": [ { "name": "syncPasscodeState", "value": "New" } ], "type": "global" } }, { "listElements": { "type": "global" } }, { "listChunk": { "elements": [ { "name": "syncPasscodeState", "value": "Existing" } ], "last": true, "type": "global" } }, { "listChange": { "elements": [ { "name": "syncPasscodeState", "value": "Existing" } ], "type": "global" } } ]
Name | syncing |
---|---|
Since | R7 |
This global boolean indicates when bbmcore is performing reconnect synchronization with the BlackBerry Infrastructure. On mobile OSes and within other environments that are aggressive about terminating or suspending applications, your application should take steps to keep bbmcore running while this global is true.
For example, consider an Android application that receives push notifications when there are protocol messages waiting for bbmcore to fetch from the BlackBerry Infrastructure. Your application could use this global as part of the following strategy.
In extreme circumstances, the 'syncing' global can remain true for a long time as bbmcore attempts to recover from unusual failure cases. The timers described above give your application control over the maximum duration it is willing to keep the notification raised.
Type | Req | Since | Log | Description |
---|---|---|---|---|
boolean | Req | R7 | No |
[ { "listElements": { "type": "global" } }, { "listChunk": { "elements": [ { "name": "syncing", "value": true } ], "last": true, "type": "global" } }, { "listChange": { "elements": [ { "name": "syncing", "value": true } ], "type": "global" } } ]