dumps.wikimedia.org should have a machine readable interface for listing all sites, all types of dumps for a given site, and all versions of a given dump. This "web API" could just consist of static JSON files. An index.json in each directory, with file names and descriptions, would be a good start.
Feature wish list: https://www.mediawiki.org/wiki/Wikimedia_MediaWiki_Core_Team/Backlog/Improve_dumps#Dump_Organization_and_Discovery