AnsweredAssumed Answered

Edit Service

Question asked by lorenzmeyer77 on Jun 2, 2020
Latest reply on Jun 8, 2020 by lorenzmeyer77

Hi

I would like to adapt the min- and max instance per node for my service with the python api. I would like to do that with the following API arcgis.gis.server module — arcgis 1.8.0 documentation .

I'm not able to edit the service, since I have no idea what the functions exactly expects. It's written that it needs "Required dict. The service JSON as a dictionary." 

So I grabed from the service the properties, edited the two properties and tried to pass the properties to the edit function.

import arcgis
from arcgis import *
from arcgis.gis import server
import json
s = server.Server("https://mystandalongeserver/site/admin",username='myuser',password='mypassword')
service3 = s.services.list(folder='MyFolder',refresh=True)[3]
props = service3.properties
props['minInstancesPerNode'] = 2
props['maxInstancesPerNode'] = 4
service3.edit(props)


What exactly is needed to update the service? Unfortunately there's no example and the documentation doesn't say much.

Any help appreciated, thanks.

Outcomes