moved hostname and ip to api