« Publishing KML Services with ArcGIS Server 9.3
2008 ESRI Developer Summit Plenary by James Fee »
2008 ESRI Developer Summit - Using the ArcGIS Server REST API by James Fee
Note: This article was written by James Fee and published in his website.
2008 ESRI Developer Summit - Using the ArcGIS Server REST API
Jeremy Bartley and Keyur Shah (of http goodness fame) presented the first ArcGIS Server REST API session. ArcGIS Server can work with practically any client moving forward. To use the REST API, you publish your ArcGIS Server service like you’ve been doing (or reading about) for years. This means you can serve up simple maps like you would have done with ArcIMS, but also Geoprocessing services as well can be use (imagine having Google Maps work with a Geoprocessing service). The change from 9.2 is that rather than using SOAP to access the services, you can use use REST.
ArcGIS Server (or ArcIMS ) developers
ArcGIS 9.3 supports KML out of the box. Therefore you can build web pages that include links to KML content. Not only does it support KML/KMZ, but it also supports query results, geocode results, Geoprocessing task results and custom raster or vector results corresponding to selected layers from a map service. So you can pass the results from analysis performed in ArcGIS Server and offer them up in your webpages for users. Rather than export a KML/KMZ out of ArcMap and linking to that on your webpage, you would just make a REST call to the KMZ format on that mxd that you published on ArcGIS Server.
REST API Admin allows developers to clear the REST API Cache that gets created. If your add, delete or updates services, you’ll want to clear the cache. You can clear the cache by clicking on a button or have it clears periodically depending on your needs. REST API Security ties in with general ArcGIS Server Security policies so you won’t have to set anything different just to use the REST API.
Jeremy demonstrated how you want to set your correct projection in your MXD file before publishing (to match Google Maps or Virtual Earth). This of course is very simple, but you want to make sure it is set correctly if you want to match the web Mercator projection. ESRI and Microsoft/Google use different cache schemes, but ESRI has a tool that will convert your tile cache from the ESRI “format” to the Microsoft/Google tile format. This is only needed for 3D as ESRI handles the conversion automatically for the 2D. One nice function is the REST API support KML regions as well.
Jeremy also ran a Python demo to access the ArcGIS Server services via REST. If you aren’t a .NET or Java “guy” and want to use Ruby, you can now work within your favorite language. Heck, you like Yahoo! Pipes? Just add your RESTful URLs to Pipes and run the pipe to use the Yahoo! services with your ArcGIS Server services.
The freedom to use these RESTful services where you are comfortable, or where you client requires will stop the need to “sell” the need for installing .NET or Java on a server. Any “old” http server will be able to run these applications and there is definitely no reason to be afraid of ArcGIS Server anymore. As one ArcIMS developer told me, I finally see a reason to leave AXL and move to ArcGIS Server. The REST API is well thought out, very extensive and allows access to the power of ArcGIS Server in a “simple” html page.