reworked to use the stat rest request