def getServiceTypes(server, port, adminUser, adminPass, useSSL=True, token=None):    
    
    serviceTypesInfoList = []
    
    if token is None:    
        token = gentoken(server, port, adminUser, adminPass, useSSL)    
    
    types = {}       
    URL = "{}{}{}/arcgis/admin/services/types?f=pjson&token={}".format(getProtocol(useSSL), server, getPort(port), token)    

    types = json.loads(urllib2.urlopen(URL).read())
    
    typeList = types.get('types')
    
    for serviceType in typeList:
        info = getServiceTypeExtensions(server, port, adminUser, adminPass, serviceType['Name'], useSSL, token)
        serviceTypesInfoList.append(info)
        
    return serviceTypesInfoList
Function to get all supported service types (and extensions)
dataset/ETHPy150Open Esri/ops-server-config/SupportFiles/AGSRestFunctions.py/getServiceTypes