REST API

metadata pref and next fixed