rest api.
add event class