This is an archive of a previous version of the ArcGIS REST API. The current version can be found at http://resources.arcgis.com/en/help/arcgis-rest-api/
KML is supported as an output format when using the REST API in the following ways:
Note that KML options are not available when services are secured using token based authentication.
The following options are available for requesting data in KML format:
fparameter in the URL. The response is a KML document wrapped in a KMZ file. It may be a footprint or the result of an operation. In the Services Directory, this option is used when you click the "View Footprint In: Google Earth" link.
In the following example, a request is made for a KML footprint of a map service of Portland, Oregon:
The following is a URL request for a map service returned as a KML Region:
The next example shows a URL to an image service. Image services are always returned as ground overlay KML:
Note that a server administrator can limit or disable some options. For example, the administrator may have disabled the ability for the server to return vector features, or the administrator may have set a limit on how many KML features the server can return.For more information, see Generate KML (Operation).