def match(self, action_alias_match_api):
        """
        Find a matching action alias.

        Handles requests:
            POST /actionalias/match
        """
        command = action_alias_match_api.command

        try:
            format_ = get_matching_alias(command=command)
        except ActionAliasAmbiguityException as e:
            LOG.exception(
                'Command "%s" matched (%s) patterns.', e.command, len(e.matches)
            )
            return abort(http_client.BAD_REQUEST, six.text_type(e))

        # Convert ActionAliasDB to API
        action_alias_api = ActionAliasAPI.from_model(format_["alias"])
        return {
            "actionalias": action_alias_api,
            "display": format_["display"],
            "representation": format_["representation"],
        }

        Find a matching action alias.

        Handles requests:
            POST /actionalias/match
        
st2api/st2api/controllers/v1/actionalias.py