improved rest api for lightmare server