FME Version
As of FME Server 2019+, this functionality can be completed using FME Server Automations. For more information, please see Getting Started with Automations. Note that this tutorial series will no longer be updated, if you encounter an error, please contact Safe Support.
Sending a notification to a user
To send a notification there are three steps:
-
Create a topic
-
Create a subscription that listens to the topic
- Send a message to the topic
The message sent to the topic and read by the subscriber is a JSON formatted document. In this context, the JSON must contain at least two things:
-
the actual content of the notification to send
- the device id / email address to send the notification to
Example for email:
{
"email_to" : "foo@bar.com",
"subscriber_content" : "Hi, this is your FME Server"
}
Notification content
This is the message you want to broadcast out to anyone that is subscribed.
“subscriber_content”: “here is the notification message”
Device ids / email addresses
For each subscription protocol the JSON is slightly different. Notifications can be sent to one device/user or multiple. For multiple you just need to separate the identifiers with a comma.
Subscribers
Example JSON
"gcm_token" : "987654,83667"
"email_to" : "foo@bar.com,foo2@bar.com"
Apple Push Notification Service
"apns_token" : "678b65h45hbn,62462njxspb"
The following article provides a tutorial on how to create an email subscription and send a message to the topic using the REST API:
Comments
0 comments
Please sign in to leave a comment.