<div dir="ltr"><div style>Hi,</div><div style><br></div><div style>I started a GIST to convert the different gists and readme&#39;s into a server-side spec</div><div>(<a href="https://gist.github.com/matzew/b918eb45d3f17de09b8f">https://gist.github.com/matzew/b918eb45d3f17de09b8f</a>)</div>
<div><br></div><div><br></div><div style>* Regarding the &quot;mobile variant instance&quot;: </div><div style>We need to decide, what a SimplePush client may need on-top of the data, described below (and in the gist). (since they have clientIDs + channels)</div>
<div style><br></div><div style>* Similar... we need to reflect the &quot;&quot; on a &quot;selected&quot; (and broadcast) send as well.</div><div style><br></div><div style>* Sec: there is a different meeting, on the sec - content will be integrated (or linked from this spec)</div>
<div style><br></div><div style><br></div><div style>If this doc, looks good, I will submit it as a PR so that we get it on the homepage</div><div style><br></div><div style><br></div><div style>Next:</div><div style>CLIENT SPEC is coming later today (or tomorrow)</div>
<div style><br></div><div style>Thoughts ?</div><div style>Matthias</div><div style><br></div><div style><br></div><div><br></div><div><br></div><div><br></div><div><h1 style="font-size:28px;margin:0px 0px 10px;padding:0px;color:rgb(0,0,0);font-family:Helvetica,arial,freesans,clean,sans-serif">
AeroGear Unified Push Server (Draft 0.0.3)</h1><p style="margin:0px 0px 15px;color:rgb(0,0,0);font-family:Helvetica,arial,freesans,clean,sans-serif;font-size:13.63636302947998px;line-height:20px">The <em>AeroGear Unified Push Server</em> is a server that allows sending native push messages to different mobile operation systems. The initial version of the server supports <a href="http://developer.apple.com/library/mac/#documentation/NetworkingInternet/Conceptual/RemoteNotificationsPG/Chapters/ApplePushService.html#//apple_ref/doc/uid/TP40008194-CH100-SW9" style="color:rgb(65,131,196);text-decoration:none">Apple&#39;s APNs</a>, <a href="http://developer.android.com/google/gcm/index.html" style="color:rgb(65,131,196);text-decoration:none">Google Cloud Messaging</a> and <a href="https://wiki.mozilla.org/WebAPI/SimplePush" style="color:rgb(65,131,196);text-decoration:none">Mozilla&#39;s Simple Push</a>.</p>
<h2 style="margin:20px 0px 10px;padding:0px;font-size:24px;border-bottom-width:1px;border-bottom-style:solid;border-bottom-color:rgb(204,204,204);color:rgb(0,0,0);font-family:Helvetica,arial,freesans,clean,sans-serif"><a name="motivation--purpose" class="" href="https://gist.github.com/matzew/b918eb45d3f17de09b8f#motivation--purpose" style="color:rgb(65,131,196);text-decoration:none;display:block;padding-left:30px"></a>Motivation / Purpose</h2>
<p style="margin:0px 0px 15px;color:rgb(0,0,0);font-family:Helvetica,arial,freesans,clean,sans-serif;font-size:13.63636302947998px;line-height:20px"><strong>Goal</strong>: Any (JBoss/AeroGear powered) mobile application, that is backed by JBoss technology (e.g. admin console, Errai, drools, etc.), is able to easily work with mobile push messages. For a JBoss &quot;backend application&quot; it should be as simple as possible, to send messages to its different mobile clients.</p>
<h2 style="margin:20px 0px 10px;padding:0px;font-size:24px;border-bottom-width:1px;border-bottom-style:solid;border-bottom-color:rgb(204,204,204);color:rgb(0,0,0);font-family:Helvetica,arial,freesans,clean,sans-serif"><a name="definitions" class="" href="https://gist.github.com/matzew/b918eb45d3f17de09b8f#definitions" style="color:rgb(65,131,196);text-decoration:none;display:block;padding-left:30px"></a>Definitions</h2>
<p style="margin:0px 0px 15px;color:rgb(0,0,0);font-family:Helvetica,arial,freesans,clean,sans-serif;font-size:13.63636302947998px;line-height:20px">Before we get into details, it&#39;s important that we have a good lexicon.</p>
<h4 style="margin:20px 0px 10px;padding:0px;font-size:16px;color:rgb(0,0,0);font-family:Helvetica,arial,freesans,clean,sans-serif"><a name="push-application" class="" href="https://gist.github.com/matzew/b918eb45d3f17de09b8f#push-application" style="color:rgb(65,131,196);text-decoration:none;display:block;padding-left:30px"></a>Push Application</h4>
<p style="margin:0px 0px 15px;color:rgb(0,0,0);font-family:Helvetica,arial,freesans,clean,sans-serif;font-size:13.63636302947998px;line-height:20px">A logical construct that represents an overall mobile application (e.g. <code style="font-size:12px;line-height:normal;font-family:Consolas,&#39;Liberation Mono&#39;,Courier,monospace;margin:0px 2px;padding:0px 5px;border:1px solid rgb(234,234,234);background-color:rgb(248,248,248);border-top-left-radius:3px;border-top-right-radius:3px;border-bottom-right-radius:3px;border-bottom-left-radius:3px;white-space:nowrap">Mobile HR</code>).</p>
<h4 style="margin:20px 0px 10px;padding:0px;font-size:16px;color:rgb(0,0,0);font-family:Helvetica,arial,freesans,clean,sans-serif"><a name="mobile-variant" class="" href="https://gist.github.com/matzew/b918eb45d3f17de09b8f#mobile-variant" style="color:rgb(65,131,196);text-decoration:none;display:block;padding-left:30px"></a>Mobile Variant</h4>
<p style="margin:0px 0px 15px;color:rgb(0,0,0);font-family:Helvetica,arial,freesans,clean,sans-serif;font-size:13.63636302947998px;line-height:20px">A mobile variant of the <em>Push Application</em>. There can be multiple variants for a <em>Push Application</em> (e.g. <code style="font-size:12px;line-height:normal;font-family:Consolas,&#39;Liberation Mono&#39;,Courier,monospace;margin:0px 2px;padding:0px 5px;border:1px solid rgb(234,234,234);background-color:rgb(248,248,248);border-top-left-radius:3px;border-top-right-radius:3px;border-bottom-right-radius:3px;border-bottom-left-radius:3px;white-space:nowrap">HR Android</code>,<code style="font-size:12px;line-height:normal;font-family:Consolas,&#39;Liberation Mono&#39;,Courier,monospace;margin:0px 2px;padding:0px 5px;border:1px solid rgb(234,234,234);background-color:rgb(248,248,248);border-top-left-radius:3px;border-top-right-radius:3px;border-bottom-right-radius:3px;border-bottom-left-radius:3px;white-space:nowrap">HR iPad</code>, <code style="font-size:12px;line-height:normal;font-family:Consolas,&#39;Liberation Mono&#39;,Courier,monospace;margin:0px 2px;padding:0px 5px;border:1px solid rgb(234,234,234);background-color:rgb(248,248,248);border-top-left-radius:3px;border-top-right-radius:3px;border-bottom-right-radius:3px;border-bottom-left-radius:3px;white-space:nowrap">HR iPhone free</code>, <code style="font-size:12px;line-height:normal;font-family:Consolas,&#39;Liberation Mono&#39;,Courier,monospace;margin:0px 2px;padding:0px 5px;border:1px solid rgb(234,234,234);background-color:rgb(248,248,248);border-top-left-radius:3px;border-top-right-radius:3px;border-bottom-right-radius:3px;border-bottom-left-radius:3px;white-space:nowrap">HR iPhone premium</code> or <code style="font-size:12px;line-height:normal;font-family:Consolas,&#39;Liberation Mono&#39;,Courier,monospace;margin:0px 2px;padding:0px 5px;border:1px solid rgb(234,234,234);background-color:rgb(248,248,248);border-top-left-radius:3px;border-top-right-radius:3px;border-bottom-right-radius:3px;border-bottom-left-radius:3px;white-space:nowrap">HR Mobile Web</code>).</p>
<h4 style="margin:20px 0px 10px;padding:0px;font-size:16px;color:rgb(0,0,0);font-family:Helvetica,arial,freesans,clean,sans-serif"><a name="mobile-variant-instance" class="" href="https://gist.github.com/matzew/b918eb45d3f17de09b8f#mobile-variant-instance" style="color:rgb(65,131,196);text-decoration:none;display:block;padding-left:30px"></a>Mobile Variant Instance</h4>
<p style="margin:0px 0px 15px;color:rgb(0,0,0);font-family:Helvetica,arial,freesans,clean,sans-serif;font-size:13.63636302947998px;line-height:20px">Represents an actual installation on a mobile device (e.g. <em>User1 connected via MobileWeb</em> or <em>User2 runs <strong>HR iPhone premium</strong> on his phone</em>)</p>
<h2 style="margin:20px 0px 10px;padding:0px;font-size:24px;border-bottom-width:1px;border-bottom-style:solid;border-bottom-color:rgb(204,204,204);color:rgb(0,0,0);font-family:Helvetica,arial,freesans,clean,sans-serif"><a name="overview" class="" href="https://gist.github.com/matzew/b918eb45d3f17de09b8f#overview" style="color:rgb(65,131,196);text-decoration:none;display:block;padding-left:30px"></a>Overview</h2>
<p style="margin:0px 0px 15px;color:rgb(0,0,0);font-family:Helvetica,arial,freesans,clean,sans-serif;font-size:13.63636302947998px;line-height:20px">The <em>AeroGear Unified Push Server</em> contains three different components:</p>
<ul style="margin:15px 0px;padding:0px 0px 0px 30px;color:rgb(0,0,0);font-family:Helvetica,arial,freesans,clean,sans-serif;font-size:13.63636302947998px;line-height:20px"><li>Registration: <em style="margin-top:0px">Registry for <code style="font-style:normal;font-size:12px;line-height:normal;font-family:Consolas,&#39;Liberation Mono&#39;,Courier,monospace;margin:0px 2px;padding:0px 5px;border:1px solid rgb(234,234,234);background-color:rgb(248,248,248);border-top-left-radius:3px;border-top-right-radius:3px;border-bottom-right-radius:3px;border-bottom-left-radius:3px;white-space:nowrap">Push Applications</code>, <code style="font-style:normal;font-size:12px;line-height:normal;font-family:Consolas,&#39;Liberation Mono&#39;,Courier,monospace;margin:0px 2px;padding:0px 5px;border:1px solid rgb(234,234,234);background-color:rgb(248,248,248);border-top-left-radius:3px;border-top-right-radius:3px;border-bottom-right-radius:3px;border-bottom-left-radius:3px;white-space:nowrap">Mobile Variants</code> and <code style="font-style:normal;font-size:12px;line-height:normal;font-family:Consolas,&#39;Liberation Mono&#39;,Courier,monospace;margin:0px 2px;padding:0px 5px;border:1px solid rgb(234,234,234);background-color:rgb(248,248,248);border-top-left-radius:3px;border-top-right-radius:3px;border-bottom-right-radius:3px;border-bottom-left-radius:3px;white-space:nowrap">Mobile Variant Instances</code></em></li>
<li>Storage: <em style="margin-top:0px">A database, storing the registered applications and instances</em></li><li>Sender: <em style="margin-top:0px">Receives messages and sends them to different <code style="font-style:normal;font-size:12px;line-height:normal;font-family:Consolas,&#39;Liberation Mono&#39;,Courier,monospace;margin:0px 2px;padding:0px 5px;border:1px solid rgb(234,234,234);background-color:rgb(248,248,248);border-top-left-radius:3px;border-top-right-radius:3px;border-bottom-right-radius:3px;border-bottom-left-radius:3px;white-space:nowrap">Mobile Variant Instances</code></em></li>
</ul><p style="margin:15px 0px;color:rgb(0,0,0);font-family:Helvetica,arial,freesans,clean,sans-serif;font-size:13.63636302947998px;line-height:20px">The graphic below gives a little overview: <a href="https://a248.e.akamai.net/camo.github.com/11b903b1eea5c2ba492ee4ec759b205fc363fed6/687474703a2f2f70656f706c652e6170616368652e6f72672f2537456d61747a65772f505553482d5345525645522e706e67" target="_blank" style="color:rgb(65,131,196);text-decoration:none"><img src="https://a248.e.akamai.net/camo.github.com/11b903b1eea5c2ba492ee4ec759b205fc363fed6/687474703a2f2f70656f706c652e6170616368652e6f72672f2537456d61747a65772f505553482d5345525645522e706e67" alt="components" style="border: 0px; max-width: 100%;"></a></p>
<h2 style="margin:20px 0px 10px;padding:0px;font-size:24px;border-bottom-width:1px;border-bottom-style:solid;border-bottom-color:rgb(204,204,204);color:rgb(0,0,0);font-family:Helvetica,arial,freesans,clean,sans-serif"><a name="functionality" class="" href="https://gist.github.com/matzew/b918eb45d3f17de09b8f#functionality" style="color:rgb(65,131,196);text-decoration:none;display:block;padding-left:30px"></a>Functionality</h2>
<h3 style="margin:20px 0px 10px;padding:0px;font-size:18px;color:rgb(0,0,0);font-family:Helvetica,arial,freesans,clean,sans-serif"><a name="registration" class="" href="https://gist.github.com/matzew/b918eb45d3f17de09b8f#registration" style="color:rgb(65,131,196);text-decoration:none;display:block;padding-left:30px"></a>Registration</h3>
<p style="margin:0px 0px 15px;color:rgb(0,0,0);font-family:Helvetica,arial,freesans,clean,sans-serif;font-size:13.63636302947998px;line-height:20px">Three different registration types are provided by the <em>AeroGear Unified Push Server</em>.</p>
<h4 style="margin:20px 0px 10px;padding:0px;font-size:16px;color:rgb(0,0,0);font-family:Helvetica,arial,freesans,clean,sans-serif"><a name="push-application-registration" class="" href="https://gist.github.com/matzew/b918eb45d3f17de09b8f#push-application-registration" style="color:rgb(65,131,196);text-decoration:none;display:block;padding-left:30px"></a>Push Application Registration</h4>
<p style="margin:0px 0px 15px;color:rgb(0,0,0);font-family:Helvetica,arial,freesans,clean,sans-serif;font-size:13.63636302947998px;line-height:20px">Adds a logical construct, that represents an overall mobile application (e.g. Mobile HR). The <em>Push Application</em> contains the following properties:</p>
<ul style="margin:15px 0px;padding:0px 0px 0px 30px;color:rgb(0,0,0);font-family:Helvetica,arial,freesans,clean,sans-serif;font-size:13.63636302947998px;line-height:20px"><li>Name</li><li>Description</li><li>A collection of <code style="font-size:12px;line-height:normal;font-family:Consolas,&#39;Liberation Mono&#39;,Courier,monospace;margin:0px 2px;padding:0px 5px;border:1px solid rgb(234,234,234);background-color:rgb(248,248,248);border-top-left-radius:3px;border-top-right-radius:3px;border-bottom-right-radius:3px;border-bottom-left-radius:3px;white-space:nowrap">Mobile Variant</code>s</li>
</ul><p style="margin:15px 0px;color:rgb(0,0,0);font-family:Helvetica,arial,freesans,clean,sans-serif;font-size:13.63636302947998px;line-height:20px">The server offers an HTTP interfaces to apply a <em>Push Application</em> registration:</p>
<pre style="font-size:13px;line-height:19px;font-family:Consolas,&#39;Liberation Mono&#39;,Courier,monospace;word-wrap:break-word;margin-top:15px;margin-bottom:15px;background-color:rgb(248,248,248);border:1px solid rgb(204,204,204);overflow:auto;padding:6px 10px;border-top-left-radius:3px;border-top-right-radius:3px;border-bottom-right-radius:3px;border-bottom-left-radius:3px;color:rgb(0,0,0)">
<code style="font-size:12px;line-height:normal;font-family:Consolas,&#39;Liberation Mono&#39;,Courier,monospace;margin:0px;padding:0px;border:none;background-color:transparent;border-top-left-radius:3px;border-top-right-radius:3px;border-bottom-right-radius:3px;border-bottom-left-radius:3px">curl -v -H &quot;Accept: application/json&quot; -H &quot;Content-type: application/json&quot;
    -X POST
    -d &#39;{&quot;name&quot; : &quot;MyApp&quot;, &quot;description&quot; :  &quot;awesome app&quot; }&#39;

<a href="http://SERVER/applications">http://SERVER/applications</a>
</code></pre><p style="margin:15px 0px;color:rgb(0,0,0);font-family:Helvetica,arial,freesans,clean,sans-serif;font-size:13.63636302947998px;line-height:20px"><em>The response returns an ID for the Push Application.</em></p>
<h4 style="margin:20px 0px 10px;padding:0px;font-size:16px;color:rgb(0,0,0);font-family:Helvetica,arial,freesans,clean,sans-serif"><a name="mobile-variant-registration" class="" href="https://gist.github.com/matzew/b918eb45d3f17de09b8f#mobile-variant-registration" style="color:rgb(65,131,196);text-decoration:none;display:block;padding-left:30px"></a>Mobile Variant Registration</h4>
<p style="margin:0px 0px 15px;color:rgb(0,0,0);font-family:Helvetica,arial,freesans,clean,sans-serif;font-size:13.63636302947998px;line-height:20px">Adds a <em>mobile variant</em> for an <strong>existing</strong> <em>Push Application</em>. There can be multiple variants for a <em>Push Application</em> (e.g. HR Android, HR iPad, HR iPhone free, HR iPhone premium or HR Mobile Web).</p>
<p style="margin:15px 0px;color:rgb(0,0,0);font-family:Helvetica,arial,freesans,clean,sans-serif;font-size:13.63636302947998px;line-height:20px">The server supports the following variant types:</p><ul style="margin:15px 0px;padding:0px 0px 0px 30px;color:rgb(0,0,0);font-family:Helvetica,arial,freesans,clean,sans-serif;font-size:13.63636302947998px;line-height:20px">
<li>iOS</li><li>Android</li><li>SimplePush</li></ul><h5 style="margin:20px 0px 10px;padding:0px;font-size:14px;color:rgb(0,0,0);font-family:Helvetica,arial,freesans,clean,sans-serif;line-height:20px"><a name="ios-variant" class="" href="https://gist.github.com/matzew/b918eb45d3f17de09b8f#ios-variant" style="color:rgb(65,131,196);text-decoration:none;display:block;padding-left:30px"></a>iOS Variant</h5>
<p style="margin:0px 0px 15px;color:rgb(0,0,0);font-family:Helvetica,arial,freesans,clean,sans-serif;font-size:13.63636302947998px;line-height:20px">An iOS variant represents a logical construct for one iOS application (e.g. <code style="font-size:12px;line-height:normal;font-family:Consolas,&#39;Liberation Mono&#39;,Courier,monospace;margin:0px 2px;padding:0px 5px;border:1px solid rgb(234,234,234);background-color:rgb(248,248,248);border-top-left-radius:3px;border-top-right-radius:3px;border-bottom-right-radius:3px;border-bottom-left-radius:3px;white-space:nowrap">HR for iPhone</code> <em>or</em> <code style="font-size:12px;line-height:normal;font-family:Consolas,&#39;Liberation Mono&#39;,Courier,monospace;margin:0px 2px;padding:0px 5px;border:1px solid rgb(234,234,234);background-color:rgb(248,248,248);border-top-left-radius:3px;border-top-right-radius:3px;border-bottom-right-radius:3px;border-bottom-left-radius:3px;white-space:nowrap">HR for iPad</code> ). The iOS variant requires some APNs specific values:</p>
<ul style="margin:15px 0px;padding:0px 0px 0px 30px;color:rgb(0,0,0);font-family:Helvetica,arial,freesans,clean,sans-serif;font-size:13.63636302947998px;line-height:20px"><li>APNs Push Certificate file</li><li>Passphrase</li>
</ul><p style="margin:15px 0px;color:rgb(0,0,0);font-family:Helvetica,arial,freesans,clean,sans-serif;font-size:13.63636302947998px;line-height:20px">The server offers an HTTP interfaces to register an <em>iOS varian</em>:</p>
<pre style="font-size:13px;line-height:19px;font-family:Consolas,&#39;Liberation Mono&#39;,Courier,monospace;word-wrap:break-word;margin-top:15px;margin-bottom:15px;background-color:rgb(248,248,248);border:1px solid rgb(204,204,204);overflow:auto;padding:6px 10px;border-top-left-radius:3px;border-top-right-radius:3px;border-bottom-right-radius:3px;border-bottom-left-radius:3px;color:rgb(0,0,0)">
<code style="font-size:12px;line-height:normal;font-family:Consolas,&#39;Liberation Mono&#39;,Courier,monospace;margin:0px;padding:0px;border:none;background-color:transparent;border-top-left-radius:3px;border-top-right-radius:3px;border-bottom-right-radius:3px;border-bottom-left-radius:3px">curl -i -H &quot;Accept: application/json&quot; -H &quot;Content-type: multipart/form-data&quot; 

  -F &quot;certificate=@/Users/matzew/Desktop/MyCert.p12&quot;
  -F &quot;passphrase=TopSecret&quot;

  -X POST <a href="http://SERVER/applications/{PUSH_ID}/iOS">http://SERVER/applications/{PUSH_ID}/iOS</a>
</code></pre><p style="margin:15px 0px;color:rgb(0,0,0);font-family:Helvetica,arial,freesans,clean,sans-serif;font-size:13.63636302947998px;line-height:20px"><strong>NOTE:</strong> The above is a <em>multipart/form-data</em>, since it is required to upload the &quot;Apple Push certificate&quot;!</p>
<p style="margin:15px 0px;color:rgb(0,0,0);font-family:Helvetica,arial,freesans,clean,sans-serif;font-size:13.63636302947998px;line-height:20px"><em>The response returns an ID for the iOS variant.</em></p><h5 style="margin:20px 0px 10px;padding:0px;font-size:14px;color:rgb(0,0,0);font-family:Helvetica,arial,freesans,clean,sans-serif;line-height:20px">
<a name="android-variant" class="" href="https://gist.github.com/matzew/b918eb45d3f17de09b8f#android-variant" style="color:rgb(65,131,196);text-decoration:none;display:block;padding-left:30px"></a>Android Variant</h5><p style="margin:0px 0px 15px;color:rgb(0,0,0);font-family:Helvetica,arial,freesans,clean,sans-serif;font-size:13.63636302947998px;line-height:20px">
An Android variant represents a logical construct for one Android application (e.g. <code style="font-size:12px;line-height:normal;font-family:Consolas,&#39;Liberation Mono&#39;,Courier,monospace;margin:0px 2px;padding:0px 5px;border:1px solid rgb(234,234,234);background-color:rgb(248,248,248);border-top-left-radius:3px;border-top-right-radius:3px;border-bottom-right-radius:3px;border-bottom-left-radius:3px;white-space:nowrap">HR for Android</code>). The Android variant requires some Google specific values:</p>
<ul style="margin:15px 0px;padding:0px 0px 0px 30px;color:rgb(0,0,0);font-family:Helvetica,arial,freesans,clean,sans-serif;font-size:13.63636302947998px;line-height:20px"><li>Google API Key</li></ul><p style="margin:15px 0px;color:rgb(0,0,0);font-family:Helvetica,arial,freesans,clean,sans-serif;font-size:13.63636302947998px;line-height:20px">
The server offers an HTTP interfaces to register an <em>Android variant</em>:</p><pre style="font-size:13px;line-height:19px;font-family:Consolas,&#39;Liberation Mono&#39;,Courier,monospace;word-wrap:break-word;margin-top:15px;margin-bottom:15px;background-color:rgb(248,248,248);border:1px solid rgb(204,204,204);overflow:auto;padding:6px 10px;border-top-left-radius:3px;border-top-right-radius:3px;border-bottom-right-radius:3px;border-bottom-left-radius:3px;color:rgb(0,0,0)">
<code style="font-size:12px;line-height:normal;font-family:Consolas,&#39;Liberation Mono&#39;,Courier,monospace;margin:0px;padding:0px;border:none;background-color:transparent;border-top-left-radius:3px;border-top-right-radius:3px;border-bottom-right-radius:3px;border-bottom-left-radius:3px">curl -v -H &quot;Accept: application/json&quot; -H &quot;Content-type: application/json&quot;
  -X POST
  -d &#39;{&quot;googleKey&quot; : &quot;IDDASDASDSA&quot;}&#39;

  <a href="http://SERVER/applications/{PUSH_ID}/android">http://SERVER/applications/{PUSH_ID}/android</a> 
</code></pre><p style="margin:15px 0px;color:rgb(0,0,0);font-family:Helvetica,arial,freesans,clean,sans-serif;font-size:13.63636302947998px;line-height:20px">_The response returns an ID for the Android variant.</p><h5 style="margin:20px 0px 10px;padding:0px;font-size:14px;color:rgb(0,0,0);font-family:Helvetica,arial,freesans,clean,sans-serif;line-height:20px">
<a name="simplepush-variant" class="" href="https://gist.github.com/matzew/b918eb45d3f17de09b8f#simplepush-variant" style="color:rgb(65,131,196);text-decoration:none;display:block;padding-left:30px"></a>SimplePush Variant</h5>
<p style="margin:0px 0px 15px;color:rgb(0,0,0);font-family:Helvetica,arial,freesans,clean,sans-serif;font-size:13.63636302947998px;line-height:20px">An SimplePush variant represents a logical construct for one SimplePush application (e.g. <code style="font-size:12px;line-height:normal;font-family:Consolas,&#39;Liberation Mono&#39;,Courier,monospace;margin:0px 2px;padding:0px 5px;border:1px solid rgb(234,234,234);background-color:rgb(248,248,248);border-top-left-radius:3px;border-top-right-radius:3px;border-bottom-right-radius:3px;border-bottom-left-radius:3px;white-space:nowrap">HR mobile Web</code>). The SimplePush variant requires some <em>Simple Push Network</em> specific values:</p>
<ul style="margin:15px 0px;padding:0px 0px 0px 30px;color:rgb(0,0,0);font-family:Helvetica,arial,freesans,clean,sans-serif;font-size:13.63636302947998px;line-height:20px"><li>URL of the PushNetwork server</li></ul><p style="margin:15px 0px;color:rgb(0,0,0);font-family:Helvetica,arial,freesans,clean,sans-serif;font-size:13.63636302947998px;line-height:20px">
The server offers an HTTP interfaces to register an <em>SimplePush variant</em>:</p><pre style="font-size:13px;line-height:19px;font-family:Consolas,&#39;Liberation Mono&#39;,Courier,monospace;word-wrap:break-word;margin-top:15px;margin-bottom:15px;background-color:rgb(248,248,248);border:1px solid rgb(204,204,204);overflow:auto;padding:6px 10px;border-top-left-radius:3px;border-top-right-radius:3px;border-bottom-right-radius:3px;border-bottom-left-radius:3px;color:rgb(0,0,0)">
<code style="font-size:12px;line-height:normal;font-family:Consolas,&#39;Liberation Mono&#39;,Courier,monospace;margin:0px;padding:0px;border:none;background-color:transparent;border-top-left-radius:3px;border-top-right-radius:3px;border-bottom-right-radius:3px;border-bottom-left-radius:3px">curl -v -H &quot;Accept: application/json&quot; -H &quot;Content-type: application/json&quot;
  -X POST
  -d &#39;{&quot;pushNetworkURL&quot; : &quot;<a href="http://localhost:7777/endpoint/">http://localhost:7777/endpoint/</a>&quot;}&#39;

  <a href="http://SERVER/applications/{PUSH_ID}/simplePush">http://SERVER/applications/{PUSH_ID}/simplePush</a> 
</code></pre><p style="margin:15px 0px;color:rgb(0,0,0);font-family:Helvetica,arial,freesans,clean,sans-serif;font-size:13.63636302947998px;line-height:20px"><em>The response returns an ID for the SimplePush variant.</em></p>
<h4 style="margin:20px 0px 10px;padding:0px;font-size:16px;color:rgb(0,0,0);font-family:Helvetica,arial,freesans,clean,sans-serif"><a name="mobile-variant-instance-registration" class="" href="https://gist.github.com/matzew/b918eb45d3f17de09b8f#mobile-variant-instance-registration" style="color:rgb(65,131,196);text-decoration:none;display:block;padding-left:30px"></a>Mobile Variant Instance Registration</h4>
<p style="margin:0px 0px 15px;color:rgb(0,0,0);font-family:Helvetica,arial,freesans,clean,sans-serif;font-size:13.63636302947998px;line-height:20px">Adds an <em>mobile variant instance</em> to an existing <em>mobile variant</em> (e.g. User1 runs HR-iPad on his device). It is possible that one user can have multiple devices. A <em>mobile variant instance</em> contains the following properties:</p>
<h6 style="margin:20px 0px 10px;padding:0px;color:rgb(119,119,119);font-size:14px;font-family:Helvetica,arial,freesans,clean,sans-serif;line-height:20px"><a name="required-data" class="" href="https://gist.github.com/matzew/b918eb45d3f17de09b8f#required-data" style="color:rgb(65,131,196);text-decoration:none;display:block;padding-left:30px"></a>Required Data</h6>
<ul style="margin:15px 0px;padding:0px 0px 0px 30px;color:rgb(0,0,0);font-family:Helvetica,arial,freesans,clean,sans-serif;font-size:13.63636302947998px;line-height:20px"><li><strong style="margin-top:0px">deviceToken</strong></li>
</ul><p style="margin:15px 0px;color:rgb(0,0,0);font-family:Helvetica,arial,freesans,clean,sans-serif;font-size:13.63636302947998px;line-height:20px"><em>The platform specific device token, that identifies the device with the used push network, in order to deliver messages</em></p>
<ul style="margin:15px 0px;padding:0px 0px 0px 30px;color:rgb(0,0,0);font-family:Helvetica,arial,freesans,clean,sans-serif;font-size:13.63636302947998px;line-height:20px"><li><strong style="margin-top:0px">operatingSystem</strong></li>
</ul><p style="margin:15px 0px;color:rgb(0,0,0);font-family:Helvetica,arial,freesans,clean,sans-serif;font-size:13.63636302947998px;line-height:20px"><em>It is required for the device to submit it&#39;s exact name of the underlying OS.</em></p>
<ul style="margin:15px 0px;padding:0px 0px 0px 30px;color:rgb(0,0,0);font-family:Helvetica,arial,freesans,clean,sans-serif;font-size:13.63636302947998px;line-height:20px"><li><strong style="margin-top:0px">osVersion</strong></li>
</ul><p style="margin:15px 0px;color:rgb(0,0,0);font-family:Helvetica,arial,freesans,clean,sans-serif;font-size:13.63636302947998px;line-height:20px"><em>It is required for the device to submit it&#39;s exact version of the underlying OS.</em></p>
<ul style="margin:15px 0px;padding:0px 0px 0px 30px;color:rgb(0,0,0);font-family:Helvetica,arial,freesans,clean,sans-serif;font-size:13.63636302947998px;line-height:20px"><li><strong style="margin-top:0px">Mobile Variation ID</strong></li>
</ul><p style="margin:15px 0px;color:rgb(0,0,0);font-family:Helvetica,arial,freesans,clean,sans-serif;font-size:13.63636302947998px;line-height:20px"><em>ID received when registering a <code style="font-style:normal;font-size:12px;line-height:normal;font-family:Consolas,&#39;Liberation Mono&#39;,Courier,monospace;margin:0px 2px;padding:0px 5px;border:1px solid rgb(234,234,234);background-color:rgb(248,248,248);border-top-left-radius:3px;border-top-right-radius:3px;border-bottom-right-radius:3px;border-bottom-left-radius:3px;white-space:nowrap">Mobile Variant</code>. This ID needs to be submitted as a request header (<code style="font-style:normal;font-size:12px;line-height:normal;font-family:Consolas,&#39;Liberation Mono&#39;,Courier,monospace;margin:0px 2px;padding:0px 5px;border:1px solid rgb(234,234,234);background-color:rgb(248,248,248);border-top-left-radius:3px;border-top-right-radius:3px;border-bottom-right-radius:3px;border-bottom-left-radius:3px;white-space:nowrap">ag-mobile-variant</code>). <strong>NOTE:</strong> It is possible that this ID goes away, in favor for a digital signature in a future release</em></p>
<h6 style="margin:20px 0px 10px;padding:0px;color:rgb(119,119,119);font-size:14px;font-family:Helvetica,arial,freesans,clean,sans-serif;line-height:20px"><a name="optional-data" class="" href="https://gist.github.com/matzew/b918eb45d3f17de09b8f#optional-data" style="color:rgb(65,131,196);text-decoration:none;display:block;padding-left:30px"></a>Optional Data</h6>
<ul style="margin:15px 0px;padding:0px 0px 0px 30px;color:rgb(0,0,0);font-family:Helvetica,arial,freesans,clean,sans-serif;font-size:13.63636302947998px;line-height:20px"><li><strong style="margin-top:0px">deviceType</strong></li>
</ul><p style="margin:15px 0px;color:rgb(0,0,0);font-family:Helvetica,arial,freesans,clean,sans-serif;font-size:13.63636302947998px;line-height:20px"><em>It is recommended to store the (exact) device type (e.g. <code style="font-style:normal;font-size:12px;line-height:normal;font-family:Consolas,&#39;Liberation Mono&#39;,Courier,monospace;margin:0px 2px;padding:0px 5px;border:1px solid rgb(234,234,234);background-color:rgb(248,248,248);border-top-left-radius:3px;border-top-right-radius:3px;border-bottom-right-radius:3px;border-bottom-left-radius:3px;white-space:nowrap">phone</code> vs <code style="font-style:normal;font-size:12px;line-height:normal;font-family:Consolas,&#39;Liberation Mono&#39;,Courier,monospace;margin:0px 2px;padding:0px 5px;border:1px solid rgb(234,234,234);background-color:rgb(248,248,248);border-top-left-radius:3px;border-top-right-radius:3px;border-bottom-right-radius:3px;border-bottom-left-radius:3px;white-space:nowrap">tablet</code>).</em></p>
<ul style="margin:15px 0px;padding:0px 0px 0px 30px;color:rgb(0,0,0);font-family:Helvetica,arial,freesans,clean,sans-serif;font-size:13.63636302947998px;line-height:20px"><li><strong style="margin-top:0px">alias</strong></li>
</ul><p style="margin:15px 0px;color:rgb(0,0,0);font-family:Helvetica,arial,freesans,clean,sans-serif;font-size:13.63636302947998px;line-height:20px"><em>If the business application requires the conecpt of a user, the registration must submit an unique identifier (like a username), to identify the user. It is possible that one user has multiple devices.</em></p>
<h6 style="margin:20px 0px 10px;padding:0px;color:rgb(119,119,119);font-size:14px;font-family:Helvetica,arial,freesans,clean,sans-serif;line-height:20px"><a name="business-data" class="" href="https://gist.github.com/matzew/b918eb45d3f17de09b8f#business-data" style="color:rgb(65,131,196);text-decoration:none;display:block;padding-left:30px"></a>Business Data</h6>
<p style="margin:0px 0px 15px;color:rgb(0,0,0);font-family:Helvetica,arial,freesans,clean,sans-serif;font-size:13.63636302947998px;line-height:20px">The above are technical information bits that are required to get a message to the device. This the app wants to send notification based on a criteria, the relevant data has to be stored in the business backend. This way the backend app is very flexible on the criterias (e.g. max salary, geolocation, number of children, etc). All this data is NOT directly related to the technical functionality of sending data. The usage of the AeroGear Pipe is <strong>highly recommended</strong> to store business data on the business backend.</p>
<p style="margin:15px 0px;color:rgb(0,0,0);font-family:Helvetica,arial,freesans,clean,sans-serif;font-size:13.63636302947998px;line-height:20px">The server offers an HTTP interfaces to register an <em>mobile variant instance</em>:</p>
<pre style="font-size:13px;line-height:19px;font-family:Consolas,&#39;Liberation Mono&#39;,Courier,monospace;word-wrap:break-word;margin-top:15px;margin-bottom:15px;background-color:rgb(248,248,248);border:1px solid rgb(204,204,204);overflow:auto;padding:6px 10px;border-top-left-radius:3px;border-top-right-radius:3px;border-bottom-right-radius:3px;border-bottom-left-radius:3px;color:rgb(0,0,0)">
<code style="font-size:12px;line-height:normal;font-family:Consolas,&#39;Liberation Mono&#39;,Courier,monospace;margin:0px;padding:0px;border:none;background-color:transparent;border-top-left-radius:3px;border-top-right-radius:3px;border-bottom-right-radius:3px;border-bottom-left-radius:3px">curl -v -H &quot;Accept: application/json&quot; -H &quot;Content-type: application/json&quot; 
   -H &quot;ag-push-app: {id}&quot;
   -H &quot;ag-mobile-app: {id}&quot;
   -X POST
   -d &#39;{
      &quot;alias&quot; : &quot;<a href="mailto:user@company.com">user@company.com</a>&quot;, 
      &quot;deviceToken&quot; : &quot;someTokenString&quot;, 
      &quot;deviceType&quot; : &quot;ANDROID&quot;, 
      &quot;mobileOperatingSystem&quot; : &quot;android&quot;, 
      &quot;osVersion&quot; : &quot;4.0.1&quot;
    }&#39;

<a href="http://SERVER/registry/device">http://SERVER/registry/device</a> 
</code></pre><p style="margin:15px 0px;color:rgb(0,0,0);font-family:Helvetica,arial,freesans,clean,sans-serif;font-size:13.63636302947998px;line-height:20px"><strong>NOTE</strong>: Platform specific Client SDKs will be provided to submit the require data to the <em>AeroGear Unified Push Server</em>.</p>
<h3 style="margin:20px 0px 10px;padding:0px;font-size:18px;color:rgb(0,0,0);font-family:Helvetica,arial,freesans,clean,sans-serif"><a name="storage" class="" href="https://gist.github.com/matzew/b918eb45d3f17de09b8f#storage" style="color:rgb(65,131,196);text-decoration:none;display:block;padding-left:30px"></a>Storage</h3>
<p style="margin:0px 0px 15px;color:rgb(0,0,0);font-family:Helvetica,arial,freesans,clean,sans-serif;font-size:13.63636302947998px;line-height:20px">A (configurable) database that stores all registered applications and instances.</p>
<h3 style="margin:20px 0px 10px;padding:0px;font-size:18px;color:rgb(0,0,0);font-family:Helvetica,arial,freesans,clean,sans-serif"><a name="sender" class="" href="https://gist.github.com/matzew/b918eb45d3f17de09b8f#sender" style="color:rgb(65,131,196);text-decoration:none;display:block;padding-left:30px"></a>Sender</h3>
<p style="margin:0px 0px 15px;color:rgb(0,0,0);font-family:Helvetica,arial,freesans,clean,sans-serif;font-size:13.63636302947998px;line-height:20px">HTTP interface that receives messages for a delivery to different Mobile Push Networks. A few different <em>Sender Types</em> are supported by the push server.</p>
<h4 style="margin:20px 0px 10px;padding:0px;font-size:16px;color:rgb(0,0,0);font-family:Helvetica,arial,freesans,clean,sans-serif"><a name="global-broadcast-sender" class="" href="https://gist.github.com/matzew/b918eb45d3f17de09b8f#global-broadcast-sender" style="color:rgb(65,131,196);text-decoration:none;display:block;padding-left:30px"></a>Global Broadcast Sender</h4>
<p style="margin:0px 0px 15px;color:rgb(0,0,0);font-family:Helvetica,arial,freesans,clean,sans-serif;font-size:13.63636302947998px;line-height:20px">Sends a push message to all <em>mobile variants</em> (and all of its <em>mobile variant intances</em>), of a given <em>Push Application</em>:</p>
<pre style="font-size:13px;line-height:19px;font-family:Consolas,&#39;Liberation Mono&#39;,Courier,monospace;word-wrap:break-word;margin-top:15px;margin-bottom:15px;background-color:rgb(248,248,248);border:1px solid rgb(204,204,204);overflow:auto;padding:6px 10px;border-top-left-radius:3px;border-top-right-radius:3px;border-bottom-right-radius:3px;border-bottom-left-radius:3px;color:rgb(0,0,0)">
<code style="font-size:12px;line-height:normal;font-family:Consolas,&#39;Liberation Mono&#39;,Courier,monospace;margin:0px;padding:0px;border:none;background-color:transparent;border-top-left-radius:3px;border-top-right-radius:3px;border-bottom-right-radius:3px;border-bottom-left-radius:3px">curl -v -H &quot;Accept: application/json&quot; -H &quot;Content-type: application/json&quot; 
   -X POST

   -d &#39;{&quot;key&quot;:&quot;blah&quot;, &quot;alert&quot;:&quot;HELLO!&quot;}&#39;

<a href="http://SERVER/sender/broadcast/{PushApplicationID}">http://SERVER/sender/broadcast/{PushApplicationID}</a> 
</code></pre><p style="margin:15px 0px;color:rgb(0,0,0);font-family:Helvetica,arial,freesans,clean,sans-serif;font-size:13.63636302947998px;line-height:20px">Sends a JSON map to the server. If platform specific key words (e.g. alert for APNs) are used, they are honored for the specific platform. This transformation is done by the <em>AeroGear Unified Push Server</em>.</p>
<h4 style="margin:20px 0px 10px;padding:0px;font-size:16px;color:rgb(0,0,0);font-family:Helvetica,arial,freesans,clean,sans-serif"><a name="variant-specific-broadcast" class="" href="https://gist.github.com/matzew/b918eb45d3f17de09b8f#variant-specific-broadcast" style="color:rgb(65,131,196);text-decoration:none;display:block;padding-left:30px"></a>Variant specific Broadcast</h4>
<p style="margin:0px 0px 15px;color:rgb(0,0,0);font-family:Helvetica,arial,freesans,clean,sans-serif;font-size:13.63636302947998px;line-height:20px">Sends a push message to only one <em>mobile variants</em> (and all of its <em>mobile variant intances</em>).:</p>
<pre style="font-size:13px;line-height:19px;font-family:Consolas,&#39;Liberation Mono&#39;,Courier,monospace;word-wrap:break-word;margin-top:15px;margin-bottom:15px;background-color:rgb(248,248,248);border:1px solid rgb(204,204,204);overflow:auto;padding:6px 10px;border-top-left-radius:3px;border-top-right-radius:3px;border-bottom-right-radius:3px;border-bottom-left-radius:3px;color:rgb(0,0,0)">
<code style="font-size:12px;line-height:normal;font-family:Consolas,&#39;Liberation Mono&#39;,Courier,monospace;margin:0px;padding:0px;border:none;background-color:transparent;border-top-left-radius:3px;border-top-right-radius:3px;border-bottom-right-radius:3px;border-bottom-left-radius:3px">curl -v -H &quot;Accept: application/json&quot; -H &quot;Content-type: application/json&quot; 
   -X POST

   -d &#39;{&quot;key&quot;:&quot;blah&quot;, &quot;alert&quot;:&quot;HELLO!&quot;}&#39;

<a href="http://SERVER/sender/broadcast/variant/{MobileVariantID}">http://SERVER/sender/broadcast/variant/{MobileVariantID}</a> 
</code></pre><p style="margin:15px 0px;color:rgb(0,0,0);font-family:Helvetica,arial,freesans,clean,sans-serif;font-size:13.63636302947998px;line-height:20px">Sends a JSON map to the server. If platform specific key words (e.g. alert for APNs) are used, they are honored for the specific platform. This transformation is done by the <em>AeroGear Unified Push Server</em>.</p>
<h4 style="margin:20px 0px 10px;padding:0px;font-size:16px;color:rgb(0,0,0);font-family:Helvetica,arial,freesans,clean,sans-serif"><a name="selected-sender" class="" href="https://gist.github.com/matzew/b918eb45d3f17de09b8f#selected-sender" style="color:rgb(65,131,196);text-decoration:none;display:block;padding-left:30px"></a>Selected Sender</h4>
<p style="margin:0px 0px 15px;color:rgb(0,0,0);font-family:Helvetica,arial,freesans,clean,sans-serif;font-size:13.63636302947998px;line-height:20px">Sends a push message to a selected list of identified users (regardless of their variant):</p>
<pre style="font-size:13px;line-height:19px;font-family:Consolas,&#39;Liberation Mono&#39;,Courier,monospace;word-wrap:break-word;margin-top:15px;margin-bottom:15px;background-color:rgb(248,248,248);border:1px solid rgb(204,204,204);overflow:auto;padding:6px 10px;border-top-left-radius:3px;border-top-right-radius:3px;border-bottom-right-radius:3px;border-bottom-left-radius:3px;color:rgb(0,0,0)">
<code style="font-size:12px;line-height:normal;font-family:Consolas,&#39;Liberation Mono&#39;,Courier,monospace;margin:0px;padding:0px;border:none;background-color:transparent;border-top-left-radius:3px;border-top-right-radius:3px;border-bottom-right-radius:3px;border-bottom-left-radius:3px">curl -v -H &quot;Accept: application/json&quot; -H &quot;Content-type: application/json&quot; 
   -X POST

   -d &#39;{
       alias: [&quot;<a href="mailto:user@foo.com">user@foo.com</a>&quot;, &quot;<a href="mailto:bar@moz.org">bar@moz.org</a>&quot;, ....],
       message: {&quot;key&quot;:&quot;blah&quot;, &quot;alert&quot;:&quot;HELLO!&quot;}
       }&#39;

<a href="http://SERVER/sender/selected">http://SERVER/sender/selected</a> 
</code></pre><p style="margin-top:15px;margin-right:0px;margin-left:0px;color:rgb(0,0,0);font-family:Helvetica,arial,freesans,clean,sans-serif;font-size:13.63636302947998px;line-height:20px;margin-bottom:0px!important">The <code style="font-size:12px;line-height:normal;font-family:Consolas,&#39;Liberation Mono&#39;,Courier,monospace;margin:0px 2px;padding:0px 5px;border:1px solid rgb(234,234,234);background-color:rgb(248,248,248);border-top-left-radius:3px;border-top-right-radius:3px;border-bottom-right-radius:3px;border-bottom-left-radius:3px;white-space:nowrap">alias</code> value is used to identied the desired users. The payload (<code style="font-size:12px;line-height:normal;font-family:Consolas,&#39;Liberation Mono&#39;,Courier,monospace;margin:0px 2px;padding:0px 5px;border:1px solid rgb(234,234,234);background-color:rgb(248,248,248);border-top-left-radius:3px;border-top-right-radius:3px;border-bottom-right-radius:3px;border-bottom-left-radius:3px;white-space:nowrap">messages</code>) is a standard JSON map. If platform specific key words (e.g. alert for APNs) are used, they are honored for the specific platform. This transformation is done by the <em>AeroGear Unified Push Server</em>.</p>
<p style="margin-top:15px;margin-right:0px;margin-left:0px;color:rgb(0,0,0);font-family:Helvetica,arial,freesans,clean,sans-serif;font-size:13.63636302947998px;line-height:20px;margin-bottom:0px!important"><br></p></div></div>