SysGetMessagesForOwnerPage
Retrieves the page of messages, owned by specified ownerId, from the server based on the encoded context.
Service | Operation |
---|---|
messaging | SYS_GET_MESSAGES_FOR_OWNER_PAGE |
Method Parameters
Parameter | Description |
---|---|
ownerId | The profile ID of the owner |
context | The search and paging criteria |
Usage
http://localhost:3000
- C#
- C++
- Objective-C
- Java
- JavaScript
- Dart
- Cloud Code
- Raw
// Cloud Code only. To view example, switch to the Cloud Code tab
// Cloud Code only. To view example, switch to the Cloud Code tab
// Cloud Code only. To view example, switch to the Cloud Code tab
// Cloud Code only. To view example, switch to the Cloud Code tab
// Cloud Code only. To view example, switch to the Cloud Code tab
// Cloud Code only. To view example, switch to the Cloud Code tab
var ownerId = "493dd9ad-5196-4494-aab1-02fbffa4c7af";
var context = {
"pagination": {
"rowsPerPage": 10,
"pageNumber": 1
},
"searchCriteria": {
"message.from.id": null
},
"sortCriteria": {
"mbCr": 1,
"mbUp": -1
}
};
var messagingProxy = bridge.getMessagingServiceProxy();
var postResult = messagingProxy.sysGetMessagesForOwnerPage(context);
if (postResult.status == 200) {
// Success!
}
{
"service": "messaging",
"operation": "SYS_GET_MESSAGES_FOR_OWNER_PAGE",
"data": {
"ownerId": "493dd9ad-5196-4494-aab1-02fbffa4c7af",
"context": {
"pagination": {
"rowsPerPage": 10,
"pageNumber": 1
},
"searchCriteria": {
"message.from.id": null
},
"sortCriteria": {
"mbCr": 1,
"mbUp": -1
}
}
}
}
JSON Response
{
"data": {
"context": "eyJzZWFyY2hDcml0ZXJpYSI6e30sInNvcnRDcml0ZXJpYSI6eyJtYkNyIjoxLCJtYlVwIjotMX0sInBhZ2luYXRpb24iOnsicm93c1BlclBhZ2UiOjEwLCJwYWdlTnVtYmVyIjoxLCJkb0NvdW50IjpmYWxzZSwic2tpcFJlY291bnQiOmZhbHNlfSwib3B0aW9ucyI6bnVsbCwicmVzdWx0Q291bnQiOjF9",
"results": {
"count": 1,
"page": 1,
"items": [
{
"mbVer": 1,
"mbUp": 1623349641504,
"read": false,
"msgCr": 1623349641498,
"msgVer": 1,
"mbCr": 1623349641504,
"msgId": "f6631ba6-c11e-4fea-bd65-181b16ec9335",
"msgUp": 1623349641498,
"message": {
"from": {
"id": "a687ba2f-cc66-463a-8b3c-db900eba7e94",
"name": "Rookie"
},
"sentAt": 1623349641498,
"to": [
"493dd9ad-5196-4494-aab1-02fbffa4c7af"
],
"content": {
"subject": "new",
"text": "test"
}
},
"msgbox": "inbox"
}
],
"moreAfter": false,
"moreBefore": false
}
},
"status": 200
}
Common Error Code
Status Codes
Code | Name | Description |
---|---|---|
40601 | FEATURE_NOT_ENABLED | Messaging feature is not enabled for app. |