def delete_connection(self, name, reason=None):
        """
        Closes an individual connection. Give an optional reason

        :param name: The connection name
        :type name: str

        :param reason: An option reason why the connection was deleted
        :type reason: str
        """
        headers = {'X-Reason': reason} if reason else {}

        self._api_delete(
            '/api/connections/{0}'.format(
                urllib.parse.quote_plus(name)
            ),
            headers=headers,
        )
Closes an individual connection. Give an optional reason

        :param name: The connection name
        :type name: str

        :param reason: An option reason why the connection was deleted
        :type reason: str