WebAPI/SimplePush: Difference between revisions

Line 124: Line 124:
* On Errors, calls will return a proper error code, and where permitted, a standard JSON block containing information regarding the error. The contents of this block are not intended for end user display and have yet to be finalized.
* On Errors, calls will return a proper error code, and where permitted, a standard JSON block containing information regarding the error. The contents of this block are not intended for end user display and have yet to be finalized.


==== GET /v1/register ====
==== GET /v1/register/<channelID> ====
Request a new ChannelID.  
Request a new ChannelID.  


If the <i>X-UserAgent-ID</i> is not provided, the UserAgent is presumed to be new and a new UserAgentID will be generated for the UserAgent.
If the <i>X-UserAgent-ID</i> is not provided, the UserAgent is presumed to be new and a new UAID will be generated for the UserAgent.
 
The PushServer '''SHOULD''':
* Ensure that the channelID is compliant with any formatting requirements the PushServer may have
* Ensure that the channelID is unique for the UAID.


===== Arguments =====
===== Arguments =====
Line 135: Line 139:
===== Returns =====
===== Returns =====
  { "channelID": "New Channel ID",  
  { "channelID": "New Channel ID",  
   "uaid": "UserAgent ID"
   "uaid": "UserAgent ID" (optional)
  }
  }


NOTE: The uaid is either the X-UserAgent-ID value echoed back, or a new X-UserAgent-ID value to be used for all subsequent calls if no X-UserAgent-ID was present.
NOTE: The uaid is either the X-UserAgent-ID value echoed back, or a new X-UserAgent-ID value to be used for all subsequent calls if no X-UserAgent-ID was present.
===== Errors =====
* Invalid Channel ID
* Duplicate Channel ID


===== Example =====
===== Example =====
Confirmed users
93

edits