Implement the environmentGet API endpoint.

Also call it to retrieve the MAAS server address when in MAAS.
Done.