WebAPI/SimplePush: Difference between revisions

Jump to navigation Jump to search
Line 119: Line 119:
=== API ===
=== API ===
* Requests from UserAgent to PushServer MUST provide a PushServer Generated UserAgentID (UAID) as the "X-UserAgent-ID" header.
* Requests from UserAgent to PushServer MUST provide a PushServer Generated UserAgentID (UAID) as the "X-UserAgent-ID" header.
* All requests and responses '''MUST''' include a <tt>digest</tt> field which is a SHA1 checksum of known channelIDs at the sender. This should be calculated from the state of the persistent database. If a mismatch occurs, it is resolved using the Registration Sync Protocol.
Digest calculation:
** <tt>channels</tt> = Sort channelIDs by lexicographically increasing order as '''strings'''
** <tt>str</tt> - Join sorted channelIDs using a '''comma''' (,)
** <tt>digest</tt> = SHA1(tt)
'''NOTE:''' Digest inconsistency will occur during /register and /unregister. This should NOT be considered as a state mismatch.
* UserAgent requests may include a /{network} prefix to indicate a request may be handled by a third party network (e.g. <code>GET http:<i>host</i>/foonet/update</code> will return update requests for elements provided by the "foonet" sub-provider.
* UserAgent requests may include a /{network} prefix to indicate a request may be handled by a third party network (e.g. <code>GET http:<i>host</i>/foonet/update</code> will return update requests for elements provided by the "foonet" sub-provider.
* Calls will return standard HTTP status headers.  
* Calls will return standard HTTP status headers.  
Confirmed users
93

edits

Navigation menu