Add getMetaById function to API