Now that the location database has a column for hostname, add an endpoint to link a valid (findable) hostname to the table. Also a retrieval endpoint.
If the hostname is not finadable, let the administrator (person using the UI to access it) know that it either offline or doesn't exist. Also don't allow duplication hostnames.