ArcGIS Server 9.3 REST API First Looks, Part 1
Wed, May 14, 2008
4-minute read
Image via Wikipedia
Which allows you to look at metadata about your services, view them in Google Earth (how cool is that?), ArcMap, ArcGIS Explorer, or the new ArcGIS Javascript API (a subject of posts to come). Also, you can drill-down into your service and get layer info, spatial reference, unit info, and tiling information. In fact, on the tiling information, you can actually LOOK at some of the tiles. Other information includes supported operations that you can execute within the Explorer, like Export Map or Identify. Here's a picture of the service page:
Another item the Service page has is a "Supported Interfaces" section, which I would call supported formats. The ones listed out of the box are REST and SOAP. Clicking on the REST link will give you all (well, most of) the information just mentioned, but in JSON format . Here, lemme show you:
The only difference between the URL to get to the cool HTML Services Explorer page and the URL that spits out JSON is the addition of a 'f' (for 'format') querystring parameter, like so:
http://server/arcgis/rest/services/ServiceName/MapServer?f=json
MMMMM....now, THAT's some good REST.
There is similar love for supported operations, allowing you to crank out a quick image or perform a Find and look at the results. Also, the (impressively comprehensive) API reference is linked on the Services Explorer pages, which, oh by-the-way, takes you here.
Finally, the last thing I want to cover in this post is the REST admin inteface. If you go to the following URL in your browser:
http://server/arcgis/rest/admin
you'll be hit with a login screen for the ArcGIS REST API Admin application. It's pretty sparse right now, not even meriting a screen shot. Currently, you can use the admin site to tell AGS when to recycle the cached service responses and to turn on the REST Services Catalog. Now, that second option was nowhere to be found in my admin app, but the docs assure me it's there.
So far, the only disappointment I have had is that ESRI has chosen not to use GeoJSON as their format to return features in (or, for that matter, even as an option). I don't profess to know why, but I'll try to float that to one of my contacts on the mother ship soon.
Summing up, the AGS REST API looks great before you even show a map on a site. I am hoping to go that in future posts.
