Projects - Set Project Properties

创建、更新和删除团队项目属性。

PATCH https://dev.azure.com/{organization}/_apis/projects/{projectId}/properties?api-version=6.1-preview.1

URI 参数

名称 必需 类型 说明
organization
path True

string

Azure DevOps 组织的名称。

projectId
path True

string

uuid

团队项目 ID。

api-version
query True

string

要使用的 API 版本。 应将其设置为“6.1-preview.1”才能使用此版本的 API。

请求正文

Media Types: "application/json-patch+json"

名称 类型 说明
from

string

移动/复制操作的复制路径。

op

Operation

修补操作

path

string

操作的路径。 对于数组,可以使用从零开始的索引指定数组中的位置 (例如 /饼干/0/name) 。 可以使用“-”字符而不是在数组末尾插入索引, (例如 /biscuits/-) 。

value

object

操作的值。 这是基元或 JToken。

响应

名称 类型 说明
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.project_write 授予读取和更新项目和团队的能力。

示例

Create or update a team project property
Delete a team project property

Create or update a team project property

Sample Request

PATCH https://dev.azure.com/fabrikam/_apis/projects/{projectId}/properties?api-version=6.1-preview.1

[
  {
    "op": "add",
    "path": "/Alias",
    "value": "Frabrikam"
  }
]

Sample Response

Delete a team project property

Sample Request

PATCH https://dev.azure.com/fabrikam/_apis/projects/{projectId}/properties?api-version=6.1-preview.1

[
  {
    "op": "remove",
    "path": "/Alias"
  }
]

Sample Response

定义

名称 说明
JsonPatchDocument

JSON 修补程序操作的 JSON 模型

Operation

修补操作

JsonPatchDocument

JSON 修补程序操作的 JSON 模型

名称 类型 说明
from

string

移动/复制操作的复制路径。

op

Operation

修补操作

path

string

操作的路径。 对于数组,可以使用从零开始的索引指定数组中的位置 (例如 /饼干/0/name) 。 可以使用“-”字符而不是在数组末尾插入索引, (例如 /biscuits/-) 。

value

object

操作的值。 这是基元或 JToken。

Operation

修补操作

名称 类型 说明
add

string

copy

string

move

string

remove

string

replace

string

test

string