json api for routines