1
使用舊TFS API,它可以訪問已刪除的構建使用下面的代碼:無法訪問已刪除的構建使用TFS 2015年REST API
IBuildDetailSpec buildDetailSpec = buildServer.CreateBuildDetailSpec(m_teamProject, m_buildDefinition);
buildDetailSpec.BuildNumber = (string.IsNullOrEmpty(m_buildPrefixOverride))? m_buildDefinition + "*" : m_buildPrefixOverride + "*";
buildDetailSpec.MaxBuildsPerDefinition = m_maxBuildPerDefinition;
buildDetailSpec.Status = BuildStatus.All;
buildDetailSpec.QueryDeletedOption = QueryDeletedOption.IncludeDeleted;
buildDetailSpec.QueryOrder = BuildQueryOrder.StartTimeDescending;
buildDetailSpec.InformationTypes = null;
IBuildQueryResult buildQueryResult = buildServer.QueryBuilds(buildDetailSpec);
在另一方面,這似乎是不可能查詢同樣的事情根據文檔使用TFS 2015 Update 2(內部部署)REST API。
這是查詢我運行:
http://tfsserver:8080/tfs/defaultcollection/BuildTools/_apis/build/builds?api-version=2.0&definitions=1227
沒有人管理查詢呢?如果是這樣,怎麼樣?
謝謝你確認。我已經張貼在這裏用戶音色:https://visualstudio.uservoice.com/forums/330519-team-services/suggestions/13833075-add-deleted-builds-option-in-the-builds-rest-api-q –