Calling Team Foundation Server(TFS) APIs via SQL Server stored procedure

Update:

You could call a web service from SQL CLR. Some tutorials maybe helpful:

  • How to create a SQL CLR stored procedure to get data from a web service and insert results into a SQL Server table
  • Generate JSON Data Using Web Service And SQL Server Stored Procedure

No, the only database that's designed for user querying is the warehouse database. The others are explicitly not supported and should not be directly queried.

Do not make any changes to the TFS Databases directly, otherwise you may lose the support from Microsoft.

Please take a look at this similar question here: Add a stored procedure to TFS database

In addition to using client API, you could also use Rest API in TFS to do the something.

Work Items - Create

POST https://{instance}/{collection}/{project}/_apis/wit/workitems/${type}?api-version=5.0