Extracting the API host

Signed-off-by: Alan Gardner <alan@armoin.com>