def getServiceInfo2(server_url, user_name,  user_pass, servicename_and_type, token=None):    
    
    
    if token is None:    
        token = gentoken2(server_url, user_name, user_pass)    
        
    serviceInfo = {}       
    URL = "{}/admin/services/{}?token={}&f=json".format(server_url, servicename_and_type, token)    

    serviceInfo = json.loads(urllib2.urlopen(URL).read())
    
    return serviceInfo
Account edit
dataset/ETHPy150Open Esri/ops-server-config/SupportFiles/AGSRestFunctions.py/getServiceInfo2--crossover with--dataset/ETHPy150Open treeio/treeio/treeio/account/views.py/account_edit