Jump to content

Welcome! You're currently a Guest.

If you'd like to join in the Discussion, or access additional features in our forums, please sign in with your Evernote Account here. Have an Evernote Account but forgot your password? Reset it! Don't have an account yet? Create One! You'll need to set your Display Name before your first post.

Photo

webhooks and note deletions

webhook

  • Please log in to reply
3 replies to this topic

#1 psalaets

psalaets

  • Pip
  • Title: Member
  • Group: Members
  • 2 posts

Posted 02 January 2013 - 09:03 PM

In my web service, I want to get the notebook of a note that was just deleted. Is this possible?

After delete I get a webhook hit with query string: userId=<user id>&guid=<guid>&reason=update

I can do a noteStore.getNote to figure out if it was deleted but by then its too late to look up notebook id.

#2 Julien Boedec

Julien Boedec

  • Title: Browncoat
  • Group: Evernote Employee
  • 408 posts

Posted 03 January 2013 - 07:11 PM

If the note was deleted (sent to the trash) it isn't part of any notebook. Your only option is to cache the note's notebook every time you receive an update / create notification.

#3 psalaets

psalaets

  • Pip
  • Title: Member
  • Group: Members
  • 2 posts

Posted 08 January 2013 - 04:16 PM

Your only option is to cache the note's notebook every time you receive an update / create notification.


For my project, that'd mean caching all of a user's note/notebook assocations up front (after initial oauth handshake) because a delete could be the first webhook hit involving a given note. I wanted to avoid duplicating Evernote's data mainly due to laziness but also lack of resources.

Has there been any consideration in splitting the "update" webhook out into more specific ones? Examples would be note deleted, note moved, tags added, tags removed, etc. While probably increasing complexity on EN's backend it would, in theory, reduce load on EN's web services because webhook clients are being told what happened instead of having to figure it out by querying.

The new webhooks could have data specific to them:
note moved - old notebook id, new notebook id
note deleted - old notebook id
tags added - tags that were added
tags removed - tags that were removed
etc

This could be "EN webhooks v2.0" so clients using the current webhooks aren't broken.

#4 Julien Boedec

Julien Boedec

  • Title: Browncoat
  • Group: Evernote Employee
  • 408 posts

Posted 08 January 2013 - 06:11 PM

Thank you for your suggestion! We will keep you informed if we update our webhook service.





0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

Clip to Evernote