Day 1 Using The ArcGIS Server REST API At The ESRI Developer Summit 2008

Comments Off
Share

This was the first technical session where we started to get more in depth about  some of the technology. I had been holding out for this session for quite a while and by the end I was very impressed.

The ArcGIS Server REST API is new for ArcGIS Server 9.3. The Java and .NET platforms have been REST enabled. So why have they developed this REST API? Well it’s there so developers can do things simply.

Here are some of my notes from the session:

With ArcGIS Server 9.3 there is a new geometry service which is a computational service that provides basic geometric operations for web service clients. Services are accessible via SOAP or REST.

REST is all about URL’s. All resources are URL’s. This includes everything from map services right through to layers.  Every request is also stateless. The server does not maintain any session. The ArGIS Server Services Explorer is an HTML face for the REST API and once again everything is a URL so it can be accessed by a number of languages out there. The cool thing about this, is that it can be bookmarkable or indexable. Basically the browser has become the new command line!

HTTP goodness. Keyur’s famous word! The REST API makes use of cache control headers. Etags which are conditional gets check for updates. It supports gZip compression which saves bandwidth and it also returns status codes for HTTP. LIke I mentioned before, every request is stateless. The server does not maintain session state which allows for scalability.

Publishing a new service in ArcGIS Server means that HTML pages are automatically generated for you from the REST API. I mentioned that the pages are indexable which means that the Google bots will pick these up.

The supported formats for the REST API include:

JSON
KMZ
IMAGE
HELP
LYR
NMF
JSAPI
GMAPS
VE

This is configurable using the f format parameter.

The HTML format which is the ArcGIS Server Services Explorer is a developer tool which provides are overview of the services on the ArcGIS Server. It gives you access to the metadata. The JSON JavaScript libraries support callbacks. There is also a new feature called pretty JSON which makes the results more readable. This is for debugging purposes only.  There is out of the box KML as well.

The REST API works on a caching model. Since the metadata rarely changes, it is cached the first time it is accessed. Other requests will be served directly of the cache. There are advantages for this which include performance and reduced consumption of resources. There is however a side effect to having this model. It means that updates are not picked up unless the cache has been reset. This can be done using the REST API administration tool which allows you to clear the cache and set scheduled times as well.

Since there is a uniform security model across all of the API’s, configuring security on the ArcGIS Server will follow through to the REST API.

The REST API supports basic types at the current stage which include points, lines and polygons.

So it’s an open API accessible from lots of clients. It adheres to HTTP standards and if there is one thing Keyur wanted us to take away from the session? It was these three points:

Everything is a URL
Everything is a URL
Everything is a URL

A great session! The REST API is going to be a powerful resource and it will grow as time goes on. I have already been working with this and I have to say it’s dam impressive.

Comments Are Closed.