Add support to only return keys in ApiAllMessages