我必须执行TFS内部部署REST API来获取一些数据。现在我想列出执行它们的最低权限要求。
以下是我正在寻找的REST API:
GET https://{instance}/_apis/projectcollections/{collection}?api-version={version}
GET https://{instance}/DefaultCollection/_apis/projects?api-version={version}[&stateFilter{string}&$top={integer}&skip={integer}]
GET https://{instance}/DefaultCollection/_apis/projects/{project}?api-version={version}[&includeCapabilities={boolean}]
GET https://{instance}/DefaultCollection/_apis/projects/{project}/teams?api-version={version}[&$top={integer}&$skip={integer}]
GET https://{instance}/DefaultCollection/_apis/projects/{project}/teams/{team} ?api-version={version}
GET https://{instance}/DefaultCollection/_apis/projects/{project}/teams/{team}/members ?api-version={version}[&$top={integer}&$skip={integer}]
GET https://{instance}/DefaultCollection/_apis/tfvc/branches?api-version={version}[&includeChildren={bool}&includeDeleted={bool}]
GET https://{instance}/DefaultCollection/_apis/tfvc/branches/{path}?api-version={version}[&includeChildren={bool}&includeParent={bool}&includeDeleted={bool}]
GET https://{instance}/DefaultCollection/_apis/tfvc/changesets?api-version={version}
GET https://{instance}/DefaultCollection/_apis/tfvc/changesets/{id}?api-version={version}[&includeDetails={Boolean}&includeWorkItems={Boolean}&includeSourceRenames={Boolean}&maxChangeCount={int}&maxCommentLength={int}]
GET https://{instance}/DefaultCollection/_apis/tfvc/changesets/{id}/changes?api-version={version}[&$skip={int}&$top={int}]
GET https://{instance}/DefaultCollection/_apis/tfvc/shelvesets?api-version={version}[&owner={string}&maxContentLength={int}&$top={int}&$skip={int}]
GET https://{instance}/DefaultCollection/_apis/tfvc/shelvesets/{shelveset};{owner} ?api-version={version}
GET https://{instance}/DefaultCollection/_apis/tfvc/shelvesets/{shelveset};{owner}/changes ?api-version={version}
GET https://{instance}/DefaultCollection/_apis/tfvc/shelvesets/{shelveset};{owner}/workitems?api-version={version}
GET https://{instance}/DefaultCollection/_apis/tfvc/labels ?api-version={version}[&name={srtring}&owner={string}&itemLabelFilter={string}&$top={int}&$skip={int}]
GET https://{instance}/DefaultCollection/_apis/tfvc/labels/{labelId} ?api-version={version}[&maxItemCount={int}]
GET https://{instance}/DefaultCollection/_apis/tfvc/labels/{labelId}/items ?api-version={version}[&$top={int}&$skip={int}]
GET https://{instance}/DefaultCollection/_apis/tfvc/items/{path} ?api-version={version}&[scopePath={scopePath}]
答案 0 :(得分:3)
要使用第1~第3个REST API,您需要成为该集合的colleciton管理员。
要使用第4~6个REST API,您需要成为TFS项目管理员
要使用第7个到最后一个,您需要拥有权限" 查看项目级信息"设置为允许。你可以成为贡献者。并确保使用权限来查看团队项目下的代码。