With the introduction of REST modules (T362480), there is no longer a single API spec that covers all endpoints. Instead, each component defines its own spec. For the purpose of discoverability, it seems useful to have a machine readable listing of all available modules on a wiki, including modules defined by MW core, by extensions, and potentially also modules provided by external services such as PCS. MediaWiki will have to know about this list anyway, for the benefit of T325558.
There seems to be no standard for this kind of directory, so we are free to (force to) come up with a format that suites our needs.