def start_stop_service(connection, login, password, name, id, address, action="START", error_msg=None):
    """Start or stop registered service.

    Args:
        connection(object): MicroStrategy connection object returned by
            'connection.Connection()
        login (string): login for SSH operation
        password (string): password for SSH operation
        name(string): name of the service
        id(string): name of the service
        action(string): action to do on the service (available are "START" and "STOP")
        error_msg (string, optional): Custom Error Message for Error Handling
    Returns:
        Complete HTTP response object.
    """

    body = {
        "name": name,
        "id": id,
        "action": action,
        "address": address,
        "login": login,
        "password": password
    }

    response = connection.session.post(url=connection.base_url + '/api/registrations/services/control',
                                       json=body)
    return response