ENH: add an api REST endpoint to expose to frontend