add way to specify api host and path
re-format, re-name variable