Adding metadata handling to basic api