TFS REST API-搜索

问题描述 投票:0回答:1

我正在尝试使用TFS REST API搜索我们的仓库。看来我的要求正在运作,但我只得到结果计数,而没有实际结果数据。对我来说可能是简单但不明显的事情。


(POST)

http:// {tfsserver}:8080 / tfs / {repo} / {project} /_apis/search/codesearchresults?api-version=5.0-preview.1

(身体)

{
  "searchText": "what",
  "$skip": 0,
  "$top": 10,
  "filters": null,
  "sortOptions":"",
  "$orderBy": null,
  "includeFacets": false
}

结果:200 OK

{
    "count": 533,
    "results": [],
    "infoCode": 0,
    "facets": {}
}

提前感谢。

tfs
1个回答
0
投票

我已经在AzureDevOps2019.Update1.1中进行过测试,此API可以按预期工作:

enter image description here

请检查您的DevOps服务器版本,并使用其他“ searchText”以查看是否可以得到结果。

© www.soinside.com 2019 - 2024. All rights reserved.