def getHostedServiceDefinition(server, port, adminUser,  adminPass, folder, serviceNameAndType, useSSL=True, token=None):    
    
    definition = None
    
    if token is None:    
        token = gentoken(server, port, adminUser, adminPass, useSSL)    
    
    if folder is not None:
        folderServerNameType = folder + "/" + serviceNameAndType
    else:
        folderServerNameType = serviceNameAndType
    
    serviceInfo = getServiceInfo(server, port, adminUser, adminPass, folder, serviceNameAndType)     
    
    definition = {}
    definition['capabilities'] = serviceInfo['capabilities']
    definition['allowGeometryUpdates'] = serviceInfo['jsonProperties']['allowGeometryUpdates']
    #definition['hasStaticData'] = serviceInfo['jsonProperties']['hasStaticData']
    definition['editorTrackingInfo'] = serviceInfo['jsonProperties']['editorTrackingInfo']
    
    jsonProperties = serviceInfo['jsonProperties']
    definition['allowGeometryUpdates'] = jsonProperties['allowGeometryUpdates']
    definition['editorTrackingInfo'] = jsonProperties['editorTrackingInfo']
    
    
    # if jsonProperties.get('hasStaticData'):
    #     definition['hasStaticData'] = jsonProperties['hasStaticData']
    #     print '\thasStaticData: {}'.format(definition['hasStaticData'])
    # else:
    #     layers = jsonProperties['layers']
    #     for i in layers.keys():
    #         has_static_data = layers[i].get('hasStaticData')
    #         print '\tlayer: {}, hasStaticData: {}'.format(i, has_static_data)
            
    
    
    return definition
Function to get the json "definition" of the service
dataset/ETHPy150Open Esri/ops-server-config/SupportFiles/AGSRestFunctions.py/getHostedServiceDefinition