I am using ArcGIS Server 9.3.1 SP 1. I want to be able to determine the capabilities of each published layer, specifically I am looking for all layers with query capabilities.
Being familiar with ArcGIS Server 10 I thought I could programmatically inspect the capabilities list on the layer response page. For example, Average US Household Size has MAP, QUERY, and DATA capabilities.
However it appears that ArcGIS Server 9.3.1 does not publish layer capabilities through the REST API. I think that I could get this information by scraping the HTML for the layer resource and looking for the list of supported operations in the HTML.
<a href="/ArcGIS/rest/services/Demographics/USA_Average_Household_Size/MapServer/1/query">Query</a>
But this seems like brittle code.
How would you programmatically determine if a layer supports the query capability via the ArcGIS Server 9.3.1 REST API?