Access Control Lists - Set Access Control Lists
创建或更新一个或多个访问控制列表。 当前为提供的 ACL 存在的所有数据将被覆盖。
POST https://dev.azure.com/{organization}/_apis/accesscontrollists/{securityNamespaceId}?api-version=7.1-preview.1
URI 参数
名称 | 在 | 必需 | 类型 | 说明 |
---|---|---|---|---|
security
|
path | True |
string uuid |
安全命名空间标识符。 |
organization
|
path |
string |
Azure DevOps 组织的名称。 |
|
api-version
|
query | True |
string |
要使用的 API 版本。 应将其设置为“7.1-preview.1”才能使用此版本的 API。 |
请求正文
名称 | 类型 | 说明 |
---|---|---|
count |
integer |
序列化的项数。 |
value |
string |
序列化的项。 |
响应
名称 | 类型 | 说明 |
---|---|---|
200 OK |
成功的操作 |
安全性
oauth2
Type:
oauth2
Flow:
accessCode
Authorization URL:
https://app.vssps.visualstudio.com/oauth2/authorize&response_type=Assertion
Token URL:
https://app.vssps.visualstudio.com/oauth2/token?client_assertion_type=urn:ietf:params:oauth:client-assertion-type:jwt-bearer&grant_type=urn:ietf:params:oauth:grant-type:jwt-bearer
Scopes
名称 | 说明 |
---|---|
vso.security_manage | 授予读取、写入和管理安全权限的能力。 |
示例
Sample Request
POST https://dev.azure.com/fabrikam/_apis/accesscontrollists/5a27515b-ccd7-42c9-84f1-54c998f03866?api-version=7.1-preview.1
{
"value": [
{
"inheritPermissions": false,
"token": "token1",
"acesDictionary": {
"Microsoft.TeamFoundation.Identity;S-1-9-1551374245-1204400969-2402986413-2179408616-0-0-0-0-1": {
"descriptor": "Microsoft.TeamFoundation.Identity;S-1-9-1551374245-1204400969-2402986413-2179408616-0-0-0-0-1",
"allow": 31,
"deny": 0
}
}
},
{
"inheritPermissions": false,
"token": "token2",
"acesDictionary": {
"Microsoft.TeamFoundation.Identity;S-1-9-1551374245-1204400969-2402986413-2179408616-0-0-0-0-1": {
"descriptor": "Microsoft.TeamFoundation.Identity;S-1-9-1551374245-1204400969-2402986413-2179408616-0-0-0-0-1",
"allow": 1,
"deny": 0
},
"Microsoft.TeamFoundation.Identity;S-1-9-1551374245-1204400969-2402986413-2179408616-0-0-0-0-2": {
"descriptor": "Microsoft.TeamFoundation.Identity;S-1-9-1551374245-1204400969-2402986413-2179408616-0-0-0-0-2",
"allow": 8,
"deny": 0
}
}
}
]
}
Sample Response
定义
VssJsonCollectionWrapper
此类用于将集合序列化为网络上的单个 JSON 对象。
名称 | 类型 | 说明 |
---|---|---|
count |
integer |
序列化的项数。 |
value |
string |
序列化的项。 |
反馈
https://aka.ms/ContentUserFeedback。
即将发布:在整个 2024 年,我们将逐步淘汰作为内容反馈机制的“GitHub 问题”,并将其取代为新的反馈系统。 有关详细信息,请参阅:提交和查看相关反馈