python 链接sharepoint 2013 REST api

import requests,simplejson

from requests_ntlm import HttpNtlmAuth

p1 = requests.get("http://your_share_point_server_link/_api/Web/Lists(GUID ID#)/items", auth=HttpNtlmAuth('domain\\username','password'),headers={'accept': 'application/json;odata=verbose'})



print simplejson.dumps(simplejson.loads(simplejson.dumps(p1.json())))

 

关键是要用 requests_ntlm 来进行链接!

 

 

GUID ID# 

http://<YOUR SERVER>/_api/web/lists

是个XML格式,你可以在里面查到guid id#

 

你可能感兴趣的:(SharePoint)