api: Use StatusValue::getMessages() instead of deprecated methods
This is the final bunch of more complex uses remaining in the API code.
Change-Id: Ia5b503fbd1e53f39d7d883313bbabdee21f1138e