TFS Webservice Documentation

后端 未结 2 669
别跟我提以往
别跟我提以往 2021-02-08 07:43

We use a lot of of python to do much of our deployment and would be handy to connect to our TFS server to get information on iteration paths, tickets etc. I can see the webservi

2条回答
  •  傲寒
    傲寒 (楼主)
    2021-02-08 08:33

    So, this question is friggin' old, but let me take a whack at it (since it keeps coming up in my google searches).

    There's no officiall supported API for the on premise TFS (the MSFT hosted one has http://www.visualstudio.com/en-us/integrate/api/overview).

    That said, you can always use Fiddler (http://www.telerik.com/fiddler) or something like it to inspect the calls that the web client for TFS is making to the server and do your magic to turn those into the scripts in python you want.

    You'll need to run your python scripts under a service account that has TFS privs appropriate to what it is trying to do (read, update, confugure... whatever).

    Since it sounds like you are just trying to read from TFS, this might be a really easy way for you to get what you want since an HTTP get to http://yourserver/tfs/yourcollection/yourproject/_workitems#id=yourworkitemid will hand you back (halfway) sane html payloads.

    If you want lists of iterations or teams or whatever, then your service account needs to have the appropriate admin privileges and hit things like http://yourserver/tfs/yourcollection/yourproject/_admin/_iterations and use that response.

提交回复
热议问题