Call Itop's WebService interface via Python:
#!/usr/bin/env python#Coding:utf-8ImportRequestsImportJsonitopurl="https://itsm.google.cn/webservices/rest.php"#OPR = Json.dumps (#{' operation ': ' List_operations '}# )OPR =Json.dumps ({'Operation':'Core/get', 'class':'Functionalci', 'Key':"SELECT Functionalci", 'Output_fields':'name, Contacts_list'}) Payload={ "version":"1.0", "Auth_User":"Admin", "auth_pwd":"your_pwd", "Json_data": Opr}r= Requests.post (Url=itopurl, Data=payload) Dict_r=json.loads (r.content) FP= Open ("Server.csv","w+") forIteminchdict_r['Objects']: ifLen (dict_r['Objects'][item][' Fields']['contacts_list']) ==0:#print dict_r[' objects '][item][' Fields ' [' Name ']Fp.write (dict_r['Objects'][item][' Fields']['name'] +"\ n") Fp.close ()
https://sourceforge.net/p/itop/discussion/922361/thread/0c0ad12f/
Https://wiki.openitop.org/doku.php?id=advancedtopics:rest_json
Http://www.07net01.com/program/2016/02/1304701.html
Rich OQL functionality via Itop WebService interface