ArcGIS includes the ArcPy site package that you can use for managing data store items and publishing service definitions with Python.
ArcPy complements the server administration operations in the ArcGIS REST API. For example, using ArcPy, you can convert map documents into service definitions and upload them to the server, change the paths of layers in a map document, or add more layers and then publish a service.
Here are some ways you can use ArcPy with ArcGIS Server:
- Register databases and folders with ArcGIS Server.
- Analyze your map documents and create service definitions out of them.
- Analyze your imagery or geoprocessing model results and create service definitions from them.
- Publish a service definition as an ArcGIS Server service.
- Publish all service definitions in a folder to ArcGIS Server.
This section of the documentation contains several examples of ArcPy code written to accomplish various tasks in ArcGIS Server.