The summary 2.0 endpoint spec dictates that the server must return an empty 204 response to requests for summaries for pages outside the content namespace(s); "content namespace" is undefined. The service is currently hardcoded to return a 204 for any namespace other than the main namespace (namespace 0).
In principle, a wiki may configure any number of its namespaces as "content namespaces" via $wgContentNamespaces, and this designation will be client-retrievable via ApiSiteInfo.
In practice, most WMF production wikis define mainspace to be their only content namespace (see here for the full config setting—the file will take a minute to load and scroll to target).
Meanwhile, our intention appears to be to consider a broader range of namespaces (such as File) to constitute "content namespaces" for the purposes of the summary API.
Options:
- Keep the current logic in place (i.e., return a 204 for all requests outside namespace 0);
- Determine the wiki's content namespace(s) from siteinfo, and return summaries for any page in those namespaces (most often just 0 in practice);
- Hard-code a specific set of namespaces as "content namespaces" for purposes of the summary API.