api: support the expected_string in the API
plugin: add support for the expected_string param