Add event API functionality

I'd like to do a follow-up PR where we change all of the parameters to be quoted.