Select to view content in your preferred language

Automate administration of ArcGIS Server "search service"

2726
1
08-04-2015 01:14 PM
Will
by
Frequent Contributor

Hi,

Is it possible to automate the adminstration of ArcGIS Server search services using Python?  I know you can for map and image services, etc., but are there capabilities in ArcPy, etc. to create/stop/restart search services as well?

Thanks,

Will

0 Kudos
1 Reply
JonathanQuinn
Esri Notable Contributor

You'll need to use the urllib or urllib2 and the JSON module within Python to stop or start any service published to ArcGIS Server.  You'll need to generate a token first using the arcgis/tokens/ URL, create an administrative or publisher token, and then append the token to stop or start a service through the Admin API for Server, ex arcgis/admin/services/Utilities/Search.SearchServer/stop or arcgis/admin/services/Utilities/Search.SearchServer/start.  To create them, you can follow the instructions here and recreate that request using Python following the instructions above in appending a token creating through the arcgis/tokens URL to the recreate to create the search service.

0 Kudos