<p>The message field takes effect only when the application is not running (more precisely, when the application is not connected to the push service.) If a notification with the above message field arrives at the device where the application is running, the push service delivers the notification directly to the application, neither showing the "Hi" message in the quick panel nor increasing the badge count.</p>
</li>
-<li>Send notifications.
+
+
+
+
+
+
+<li>Rest APIs for sending push notifications.
+<ol>
+<li>Single request
+
<p>With the created message field, you can construct a notification using a JSON query and send it to the RQM server using the POST method. The following list contains the details:</p>
<ul>
<li>URI: URI of the RQM server chosen based on the first 2 digits of the registration ID</li>
</li>
</ul>
</li>
+
+
+
+
+
+<li> Multiple Request
+<p>You can construct a Multiple Request in a RestAPI call. The following list contains the details:</p>
+<ul>
+<li>URI: URI of the RQM server chosen based on the first 2 digits of the registration ID</li>
+<li>Method: POST</li>
+<li>Data: JSON </li>
+<li>Description: Request a notification push to a push client</li>
+<li>Argument: Refer to single request</li>
+<li>Note: Total request message body must be less than the system default value, 200 kb. If not, "3034 – error of too long chuned message data" is returned. System default value can be changed as needed.</li>
+<li>Example header:
+<pre class="prettyprint">
+appID: 1234567890987654
+appSecret: dYo/o/m11gmWmjs7+5f+2zLNVOc=
+</pre></li>
+
+<li>Example request:
+<pre class="prettyprint lang-html">
+{
+ "messages":
+ [{
+ "encoding" : "base64" <!--Optional-->
+ "regID" : "ab123456",
+ "requestID" : "0000001",
+ "sender" : "oscal", <!--Optional-->
+ "type" : 0 <!--Optional-->
+ "message" : "example", <!--Optional-->
+ "appData" : "{id:asdf&passwd:1234}", <!--Optional, (Opaque)-->
+ "expiryDate" : 720, <!--Optional-->
+ "delayDate" : 60, <!--Optional-->
+ "reliableOption" : "Transport", <!--Optional-->
+ "sessionInfo" : "192.168.0.1-8080-12345567", <!--Optional-->
+ "timeStamp" : 1234567890, <!--Optional-->
+ "connectionTerm" : 0, <!--Optional-->
+ }
+ {
+ "encoding" : "base64" <!--Optional-->
+ "regID" : "ab234567",
+ "requestID" : "0000002",
+ "sender" : "oscal", <!--Optional-->
+ "type" : 0 <!--Optional-->
+ "message" : "example", <!--Optional-->
+ "appData" : "{id:asdf&passwd:1234}", <!--Optional, (Opaque)-->
+ "expiryDate" : 720, <!--Optional-->
+ "delayDate" : 60, <!--Optional-->
+ "reliableOption" : "Transport", <!--Optional-->
+ "sessionInfo" : "192.168.0.1-8080-12345567", <!--Optional-->
+ "timeStamp" : 1234567890, <!--Optional-->
+ "connectionTerm" : 0, <!--Optional-->
+ ]}
+
+}
+</pre>
+</li>
+
+
+<li>Example response:
+<ul>
+<li>
+<p>The following example shows a response message when the request is successful:</p>
+<pre class="prettyprint">
+{
+ "results":
+ [{
+ "regID":"ab123456",
+ "requestID":"0000001",
+ "statusCode":1000,
+ "statusMsg":"Success"
+ }
+ {
+ "regID":"ab234567",
+ "requestID":"0000002",
+ "statusCode":1000,
+ "statusMsg":"Success"
+ }]
+}
+</pre>
+</li>
+<li>
+<p>The following example shows a response message when the request fails due to malformation:</p>
+<pre class="prettyprint">
+{
+ "results":
+ [{
+ "regID":"",
+ "requestID":"",
+ "statusCode":3023,
+ "statusMsg":"error of json mapping exception"
+ }]
+}
+</pre>
+</li>
+<li>
+<p>The following example shows a response message when some of multiple request are failed and the others are not:</p>
+<pre class="prettyprint">
+{
+ "results":
+ [{
+ "regID":"ab123456",
+ "requestID":"0000001",
+ "statusCode":1000,
+ "statusMsg":"Success"
+ }
+ {
+ "regID":"ab234567",
+ "requestID":"0000002",
+ "statusCode":3008,
+ "statusMsg":"error of not registered regID"
+ }]
+}
+</pre>
+</li>
+</ul>
+</li>
+</ul>
+</li>
+
+
+<li> Multicast
+<p>You can construct a multicast to send a push notification to multiple applications. The following list contains the details:</p>
+<ul>
+<li>URI: URI of the RQM server chosen based on the first 2 digits of the registration ID</li>
+<li>Method: POST</li>
+<li>Data: JSON </li>
+<li>Description: Request a notification push to a push client</li>
+<li>Argument: Refer to single request</li>
+<li>Note: Total request message body must be less than the system default value, 200 kb. If not, "3034 – error of too long chuned message data" is returned. System default value can be changed as needed.</li>
+<li>Example header:
+<pre class="prettyprint">
+appID: 1234567890987654
+appSecret: dYo/o/m11gmWmjs7+5f+2zLNVOc=
+</pre></li>
+
+<li>Example request:
+<pre class="prettyprint lang-html">
+{
+ "messages":
+ [{
+ "encoding" : "base64" <!--Optional-->
+ "regID" : ["ab123456", "ab234567", "ab345678"]
+ "requestID" : "0000001",
+ "sender" : "oscal", <!--Optional-->
+ "type" : 0 <!--Optional-->
+ "message" : "example", <!--Optional-->
+ "appData" : "{id:asdf&passwd:1234}", <!--Optional, (Opaque)-->
+ "expiryDate" : 720, <!--Optional-->
+ "delayDate" : 60, <!--Optional-->
+ "reliableOption" : "Transport", <!--Optional-->
+ "sessionInfo" : "192.168.0.1-8080-12345567", <!--Optional-->
+ "timeStamp" : 1234567890, <!--Optional-->
+ "connectionTerm" : 0, <!--Optional-->
+ ]}
+
+}
+</pre>
+</li>
+
+<li>Example response:
+<ul>
+<li>
+<p>The following example shows a response message when the request is successful:</p>
+<pre class="prettyprint">
+{
+ "results":
+ [{
+ "regID":"ab123456",
+ "requestID":"0000001",
+ "statusCode":1000,
+ "statusMsg":"Success"
+ }
+ {
+ "regID":"ab234567",
+ "requestID":"0000002",
+ "statusCode":1000,
+ "statusMsg":"Success"
+ }
+ {
+ "regID":"ab345678",
+ "requestID":"0000002",
+ "statusCode":1000,
+ "statusMsg":"Success"
+ }]
+}
+</pre>
+</li>
+<li>
+<p>The following example shows a response message when the request fails due to malformation:</p>
+<pre class="prettyprint">
+{
+ "results":
+ [{
+ "regID":"",
+ "requestID":"",
+ "statusCode":3023,
+ "statusMsg":"error of json mapping exception"
+ }]
+}
+</pre>
+</li>
+<li>
+<p>The following example shows a response message when some of multiple request are failed and the others are not:</p>
+<pre class="prettyprint">
+{
+ "results":
+ [{
+ "regID":"ab123456",
+ "requestID":"0000001",
+ "statusCode":1000,
+ "statusMsg":"Success"
+ }
+ {
+ "regID":"ab234567",
+ "requestID":"0000001",
+ "statusCode":3008,
+ "statusMsg":"error of not registered regID"
+ }
+ {
+ "regID":"ab345678",
+ "requestID":"0000001",
+ "statusCode":3013,
+ "statusMsg":"error of impossible to enqueue"
+ }]
+}
+</pre>
+</li>
+</ul>
+</li>
+</ul>
+</li>
+</ol>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
</ol>
<h2 id="receive_push" name="receive_push">Receiving Push Notifications</h2>