Hello,
how can I change map service "Service Description" with Python? I would like to avoind changing the Service Description in arcgis/manager manually or republishing the map services.
Changing the "description" properties with Python via the admin route didn't take any effect what so ever. I assume these properties are not supposed to be linked to each other?
Thanks for any help.
Monika
Solved! Go to Solution.
Hi Jake Skinner,
Thank you for your suggestion.
But my services are map services published to federated ArcGIS Server. I want to change the properties of the actual map service (e.g. https://myURL/arcgis/rest/service/folder/mapServiceName/MapServer), not the properties of the portal item associated with that map service.
Thanks,
Monika
Hi Monika,
You can do this using the ArcGIS API for Python. Here is an example of what you are trying to do:
Hi Jake Skinner,
Thank you for your suggestion.
But my services are map services published to federated ArcGIS Server. I want to change the properties of the actual map service (e.g. https://myURL/arcgis/rest/service/folder/mapServiceName/MapServer), not the properties of the portal item associated with that map service.
Thanks,
Monika
I believe the description is defined in the original MXD used to author the map service. You may need to update it there are overwrite the existing service.
Hi Jonathan Quinn,
thanks for your suggestion. However, I'd like to avoid republishing the map services (either with a script or manually). I was hoping that I could edit (with python) the Service Description only.
Hi,
I made the changes using python - manipulating the json object behind iteminfo:
https://developers.arcgis.com/rest/enterprise-administration/server/edititeminfo.htm
https://server:port/arcgis/admin/services/[<folder>]/<serviceName.serviceType>/iteminfo/edit
I am not sure whether the documentation is correct thought. I had to use serviceItemInfo instead of iteminfo?
https://server:port/arcgis/admin/services/Maps/MyMap.MapServer/iteminfo/edit iteminfo={
Each service required a restart for the change to be appear in the map service REST URL.
Thanks, Monika
The documentation on the site (https://developers.arcgis.com/rest/enterprise-administration/server/edititeminfo.htm) is not correct. In your script instead of iteminfo you need to use serviceiteminfo.