SysSendEventToProfiles
Sends an event to multiple users with the attached json data.
Service | Operation |
---|---|
event | SYS_SEND_EVENT_TO_PROFILES |
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 toIds = [
"profileId1",
"profileId2"
];
var eventType = "type1";
var eventData = {
"someMapAttribute": "someValue"
};
var fromProfileId = "sendersProfileId";
var eventProxy = bridge.getEventServiceProxy();
var postResult = eventProxy.SysSendEventToProfiles(toIds, eventType, eventData, fromProfileId);
{
"service":"event",
"operation":"SYS_SEND_EVENT_TO_PROFILES",
"data":{
"toIds":[
"profileId1",
"profileId2"
],
"eventType":"type1",
"eventData":{
"someMapAttribute":"someValue"
},
"fromProfileId":"sendersProfileId"
}
}
JSON Response
{
"status": 200,
"data": {
"errorProfiles": [],
"errorCount": 0,
"sentCount": 2
}
}
Method Parameters
Parameter | Description |
---|---|
toIds | The profile ids of the users to send the event. |
eventType | The user-defined type of the event. |
eventData | The user-defined data for this event encoded in JSON. |
fromProfileId | Profile id of the user/system triggering the event. Accepted values are the session profile id or, to send as system event, specify null or 'System'. |