WebAPI/SimplePush: Difference between revisions

Jump to navigation Jump to search
Line 208: Line 208:
  {"digest": "hash string", "updates": [{"channelID":"1ced595d7f6c9f60cc5c9395dc6b72aa7e1a69a7","version":"42"},{"channelID":"bf08e25861c900c3ab343670eee1873d0b724eef","version":"1"}], "expired": ["channelID1", "channelID2", ...]}
  {"digest": "hash string", "updates": [{"channelID":"1ced595d7f6c9f60cc5c9395dc6b72aa7e1a69a7","version":"42"},{"channelID":"bf08e25861c900c3ab343670eee1873d0b724eef","version":"1"}], "expired": ["channelID1", "channelID2", ...]}


<h4> POST /v1/update </h4>
==== POST /v1/update ====
<p>Refresh the server from the client.
<p>Refresh the server from the client.
</p><p>This request requires a X-UserAgent-ID header. If the UserAgent attempts to POST information to the server which already has data for that X-UserAgent-ID, the server will deny the request with a 403 error. In that case, the UserAgent should request re-registration for all Channels.  
</p><p>This request requires a X-UserAgent-ID header. If the UserAgent attempts to POST information to the server which already has data for that X-UserAgent-ID, the server will deny the request with a 403 error. In that case, the UserAgent should request re-registration for all Channels.  
</p>
</p>


<h5> Arguments </h5>
===== Arguments =====
<p>The POST body is a JSON encoded block which matches the form and structure of the GET /v1/update/ request.
<p>The POST body is a JSON encoded block which matches the form and structure of the GET /v1/update/ request.
</p>
</p>
<h5> Returns </h5>
===== Returns =====
<p>This will return an empty object.
<p>This will return an empty object.
</p>
</p>
<h5> Example </h5>
===== Example =====
<pre class="_fck_mw_lspace">POST http://push.m.o/v1/update
<pre class="_fck_mw_lspace">POST http://push.m.o/v1/update
{&quot;channels&quot;:[{&quot;channelID&quot;:&quot;1ced595d7f6c9f60cc5c9395dc6b72aa7e1a69a7&quot;,&quot;version&quot;:&quot;42&quot;},{&quot;channelID&quot;:&quot;bf08e25861c900c3ab343670eee1873d0b724eef&quot;,&quot;version&quot;:&quot;1&quot;}]}
{&quot;channels&quot;:[{&quot;channelID&quot;:&quot;1ced595d7f6c9f60cc5c9395dc6b72aa7e1a69a7&quot;,&quot;version&quot;:&quot;42&quot;},{&quot;channelID&quot;:&quot;bf08e25861c900c3ab343670eee1873d0b724eef&quot;,&quot;version&quot;:&quot;1&quot;}]}
Confirmed users
93

edits

Navigation menu