Refactored the status function, added it to the API, documented it