rest hooks