User Tools

Site Tools


Sidebar

apiv4:polling_v4

Polling

Polling in v4 has been consolidated into polling by last updated timestamp (milliseconds since epoch).

  • Keep the value of the last updated time stamp retrieved from the server in memory or saved
  • When polling time is up, compare with the latest from the server
  • If changed, then server data has been modified, use an “updated since” mechanism of the corresponding service to get the latest since a particular time. For example, for voicemail messages, use updatedFrom parameter in API:Voicemail Lookup to get the latest messages.
  • Back to (1)

Recommendation of use

  • Use http instead of https when possible.
  • It is not necessary to authenticate.
  • Please poll at a reasonable rate.
  • For android, use this dedicated host: androidpoll.youmail.com instead of the standard apipoll.youmail.com

Composite Polling

Composite polling consists of all the possible changes to the system. The following timestamp are maintained by this polling, in order within the result:

Type Available Description
history all changes last time a call or hang up was made to a user
entry all changes last time a message was created, changed, or deleted
contact all changes last time a contact was created, changed or deleted
entitlement all changes last time entitlements were changed
greeting all changes last time a greeting was created, changed or deleted
account user profile, user phone numbers (not virtual), avatars last time the account information (user profile, user phone numbers (not virtual), avatars) was changed
settings not active (TBA)
ecommerce ecommerce/order status (purchase, cancel, suspend, resume) last time an ecommerce order was purchased, cancelled, suspended, or resumed

To retrieve the latest composite timestamps, perform an HTTP GET to this URL:

http://apipoll.youmail.com/vm/poll/{ones place of accountid}/{accountid}

Result is a commas separated long values representing the number of milliseconds since epoch of history, entry, contact, entitlement, greeting, account, and settings respectively. Ex: 243427273,34437373103,3373712092,3923844747,3923844747,3923844747,3923844747,3923844747

Example

curl http://apipoll.youmail.com/vm/poll/8/62158"

The result is : 243427273,34437373103,3373712092,3923844747,3923844747,3923844747,3923844747,3923844747

Response Status Codes:

  • 200 (successful)
  • 404 (not found, this is probably a new user, the user must at least cause a change to one of the various maintained polling services before a valid polling result will be returned)
  • 304 (not modified)
apiv4/polling_v4.txt · Last modified: 2017/08/31 14:39 by youmail

Page Tools