Hi Manes,
You could try something like below. It will iterate through all the services and print the properties:
import urllib, urllib2, json
username = 'siteadmin'
password = 'siteadmin'
server = "gis.esri.com"
tokenURL = 'http://{}:6080/arcgis/tokens/'.format(server)
params = {'f': 'pjson', 'username': username, 'password': password, 'client': 'requestip'}
req = urllib2.Request(tokenURL, urllib.urlencode(params))
response = urllib2.urlopen(req)
data = json.load(response)
token = data['token']
baseUrl = "http://{}:6080/arcgis/admin/services".format(server)
catalog = json.load(urllib2.urlopen(baseUrl + "/" + "?token=" + token + "&f=json"))
print("ROOT")
services = catalog['services']
for service in services:
if service['type']!= 'StreamServer':
print("\t" + str(service['serviceName']))
serviceURL = "{0}/{1}.{2}?token={3}&f=json".format(baseUrl, service['serviceName'], service['type'], token)
serviceProperties = json.load(urllib2.urlopen(serviceURL))
print("\t\t" + str(serviceProperties))
folders = catalog['folders']
for folderName in folders:
if str(folderName) not in ('System', 'Utilities', 'DataStoreCatalogs'):
print(str(folderName))
catalog = json.load(urllib2.urlopen(baseUrl + "/" + folderName + "/" + "?token=" + token + "&f=json"))
services = catalog['services']
for service in services:
print("\t" + str(service['serviceName']))
serviceURL = "{0}/{1}/{2}.{3}?token={4}&f=json".format(baseUrl, folderName, service['serviceName'], service['type'], token)
serviceProperties = json.load(urllib2.urlopen(serviceURL))
print("\t\t" + str(serviceProperties))