Scripting ArcGIS Server administration
ArcGIS 10.1 for Server includes an Administrator API and related utilities for scripting administrative actions on your server. Scripting your server administration allows you to automatically execute common tasks at scheduled times. It also reduces the chance of making mistakes when performing a complicated or repetitive task.
The ArcGIS Server Administrator API
Through the Administrator API, you can invoke every administrative task that ArcGIS Server supports. In fact, all administration tools provided with ArcGIS, including ArcGIS for Desktop and ArcGIS Server Manager, make use of this API.
Here's a sample of the many server administration tasks that you can do programmatically through the Administrator API:
- Create a site after installing ArcGIS Server silently
- Send an e-mail to you if a service is unavailable
- Add services
- Edit properties of services such as the maximum number of instances
- Grant and revoke user permissions on services
- Stop and start services
- Query the logs and create usage reports from them
ArcGIS Server command line utilities
ArcGIS Server includes some scriptable utilities that allow you to administer the server from batch files or the operating system command line. For basic actions such as starting services and building caches, using these utilities may be easier than writing a script from scratch.
ArcPy functions for publishing services and registering data locations
The ArcPy Python site package offers functions for publishing services to ArcGIS Server, working with service definition (SD) files, and registering folders and databases with ArcGIS Server. ArcPy can be used to script administrative tasks involving service publishing. It can also analyze map documents and report errors and warnings related to the map's use with ArcGIS Server.