It is rather to common to use filters in Web API to perform common tasks around your actions in an AOP (aspect oriented programming) way.
To create a filter you simply inherit from an abstract ActionFilterAttribute class and override the relevant method:
public abstract class ActionFilterAttribute : FilterAttribute, IActionFilter
public virtual void OnActionExecuting(HttpActionContext actionContext)
public virtual void OnActionExecuted(HttpActionExecutedContext actionExecutedContext)
This is all nice and simple, but what if the operation you need to perform, should by asynchronous? Surely async void is a terrible idea.