Let JENKINS_BUILDS_URL point to JSON API directly.

Extract base_url from Jenkins' JSON response.