working code for fetching container's json abstracting away the baseURL and constructing it using a map within the listContainers function