如何在 azure devops 项目中查找禁用的 azure 服务
How to find disabled azure services in azure devops project
我们可以禁用 azure devops 服务表单 UI
是否有任何API可用于获取有关启用/禁用服务的信息?
如上图所示,板已禁用,我可以使用 API 找到此信息吗?
这是项目设置中的一项功能。
我检查了团队项目的相关REST API and Azure CLI,但是我没有找到任何可用的接口可以列出有关启用/禁用服务的信息,也没有可用的接口来启用/禁用服务。
所以,我认为你的问题更像是一个功能请求。我建议您可以将功能请求报告给 Developer Community。
[更新]
我从网络浏览器的 网络 日志中找到 API(按 F12
)。我这边测试过API,应该就是你要找的
- 请求 URI:
POST https://dev.azure.com/{Organization_name}/_apis/FeatureManagement/FeatureStatesQuery/host/project/{Project_id}?api-version=4.1-preview.1
- 请求正文:
{
"featureIds": [
"ms.vss-work.agile", // Boards
"ms.vss-code.version-control", // Repos
"ms.vss-build.pipelines", // Pipelines
"ms.vss-test-web.test", // Test Plans
"ms.feed.feed" // Artifacts
],
"featureStates": {},
"scopeValues": {
"project": "{Project_id}"
}
}
- 响应正文:
{
"featureIds": [
"ms.vss-work.agile",
"ms.vss-code.version-control",
"ms.vss-build.pipelines",
"ms.vss-test-web.test",
"ms.feed.feed"
],
"featureStates": {
"ms.vss-work.agile": {
"featureId": "ms.vss-work.agile",
"scope": {
"userScoped": false,
"settingScope": "project"
},
"state": "disabled"
},
"ms.vss-code.version-control": {
"featureId": "ms.vss-code.version-control",
"scope": null,
"state": "enabled"
},
"ms.vss-build.pipelines": {
"featureId": "ms.vss-build.pipelines",
"scope": null,
"state": "enabled"
},
"ms.vss-test-web.test": {
"featureId": "ms.vss-test-web.test",
"scope": null,
"state": "disabled",
"reason": "\"Test Plans\" is off because the \"Boards\" feature is off. In order to manage \"Test Plans\", you must turn on \"Boards\".",
"overridden": true
},
"ms.feed.feed": {
"featureId": "ms.feed.feed",
"scope": null,
"state": "enabled"
}
},
"scopeValues": {
"project": "{Project_id}"
}
}
我们可以禁用 azure devops 服务表单 UI
是否有任何API可用于获取有关启用/禁用服务的信息?
如上图所示,板已禁用,我可以使用 API 找到此信息吗?
这是项目设置中的一项功能。 我检查了团队项目的相关REST API and Azure CLI,但是我没有找到任何可用的接口可以列出有关启用/禁用服务的信息,也没有可用的接口来启用/禁用服务。
所以,我认为你的问题更像是一个功能请求。我建议您可以将功能请求报告给 Developer Community。
[更新]
我从网络浏览器的 网络 日志中找到 API(按 F12
)。我这边测试过API,应该就是你要找的
- 请求 URI:
POST https://dev.azure.com/{Organization_name}/_apis/FeatureManagement/FeatureStatesQuery/host/project/{Project_id}?api-version=4.1-preview.1
- 请求正文:
{
"featureIds": [
"ms.vss-work.agile", // Boards
"ms.vss-code.version-control", // Repos
"ms.vss-build.pipelines", // Pipelines
"ms.vss-test-web.test", // Test Plans
"ms.feed.feed" // Artifacts
],
"featureStates": {},
"scopeValues": {
"project": "{Project_id}"
}
}
- 响应正文:
{
"featureIds": [
"ms.vss-work.agile",
"ms.vss-code.version-control",
"ms.vss-build.pipelines",
"ms.vss-test-web.test",
"ms.feed.feed"
],
"featureStates": {
"ms.vss-work.agile": {
"featureId": "ms.vss-work.agile",
"scope": {
"userScoped": false,
"settingScope": "project"
},
"state": "disabled"
},
"ms.vss-code.version-control": {
"featureId": "ms.vss-code.version-control",
"scope": null,
"state": "enabled"
},
"ms.vss-build.pipelines": {
"featureId": "ms.vss-build.pipelines",
"scope": null,
"state": "enabled"
},
"ms.vss-test-web.test": {
"featureId": "ms.vss-test-web.test",
"scope": null,
"state": "disabled",
"reason": "\"Test Plans\" is off because the \"Boards\" feature is off. In order to manage \"Test Plans\", you must turn on \"Boards\".",
"overridden": true
},
"ms.feed.feed": {
"featureId": "ms.feed.feed",
"scope": null,
"state": "enabled"
}
},
"scopeValues": {
"project": "{Project_id}"
}
}