共用方式為


Teams - Create

在小組專案中建立小組。

可能的失敗案例 無效的專案名稱/標識符 (專案不存在) 404 無效的小組名稱或描述 400 小組已經存在 400 許可權不足 400

POST https://dev.azure.com/{organization}/_apis/projects/{projectId}/teams?api-version=7.1

URI 參數

名稱 位於 必要 類型 Description
organization
path True

string

Azure DevOps 組織的名稱。

projectId
path True

string

要在其中建立團隊之小組專案的名稱或標識碼(GUID)。

api-version
query True

string

要使用的 API 版本。 這應該設定為 『7.1』 以使用此版本的 API。

要求本文

名稱 類型 Description
description

string

小組描述

id

string (uuid)

團隊(身分識別)Guid。 Team Foundation 識別符。

identity

Identity

小組身分識別。

identityUrl

string

此小組的身分識別 REST API URL

name

string

小組名稱

projectId

string (uuid)

projectName

string

url

string

小組 REST API URL

回應

名稱 類型 Description
200 OK

WebApiTeam

成功作業

安全性

oauth2

類型: oauth2
Flow: accessCode
授權 URL: https://app.vssps.visualstudio.com/oauth2/authorize&response_type=Assertion
權杖 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

範圍

名稱 Description
vso.project_manage 授與建立、讀取、更新和刪除專案和小組的能力。

範例

範例要求

POST https://dev.azure.com/fabrikam/_apis/projects/8e5a3cfb-fed3-46f3-8657-e3b175cd0305/teams?api-version=7.1

{
  "name": "My new team"
}

範例回覆

{
  "id": "8e8aa4ff-848a-474a-9033-93190137c8e4",
  "name": "My New Team",
  "url": "https://dev.azure.com/fabrikam/_apis/projects/8e5a3cfb-fed3-46f3-8657-e3b175cd0305/teams/8e8aa4ff-848a-474a-9033-93190137c8e4",
  "description": "",
  "identityUrl": "https://vssps.dev.azure.com/fabrikam/_apis/Identities/8e8aa4ff-848a-474a-9033-93190137c8e4"
}

定義

名稱 Description
Identity
IdentityDescriptor

身分識別描述元是識別類型 (Windows SID, Passport) 的包裝函式,以及 SID 或 PUID 等唯一識別碼。

PropertiesCollection

類別會將屬性包表示為索引鍵/值組的集合。 接受 DBNull 以外的所有基本類型值(任何具有 TypeCode != TypeCode.Object的類型)。 Byte[]、Int32、Double、DateType 和 String 類型的值會保留其類型,其他基本類型會重新調整為 String。 Byte[] 預期為base64編碼字串。

WebApiTeam

Identity

名稱 類型 Description
customDisplayName

string

身分識別的自定義顯示名稱(如果有的話)。 將此屬性設定為空字串將會清除現有的自訂顯示名稱。 將此屬性設定為 null 不會影響現有的持續性值(因為 Null 值不會透過網路或資料庫傳送)

descriptor

IdentityDescriptor

身分識別描述元是識別類型 (Windows SID, Passport) 的包裝函式,以及 SID 或 PUID 等唯一識別碼。

id

string (uuid)

識別標識碼。 也稱為記憶體金鑰或 VSID

isActive

boolean

如果身分識別在組織中任何 Azure Devops 群組中具有成員資格,則為 True。

isContainer

boolean

如果身分識別是群組,則為 True。

masterId

string (uuid)

memberIds

string[] (uuid)

身分識別成員的標識碼(僅限群組)。

memberOf

IdentityDescriptor[]

身分識別描述元是識別類型 (Windows SID, Passport) 的包裝函式,以及 SID 或 PUID 等唯一識別碼。

members

IdentityDescriptor[]

身分識別描述元是識別類型 (Windows SID, Passport) 的包裝函式,以及 SID 或 PUID 等唯一識別碼。

metaTypeId

integer (int32)

properties

PropertiesCollection

類別會將屬性包表示為索引鍵/值組的集合。 接受 DBNull 以外的所有基本類型值(任何具有 TypeCode != TypeCode.Object的類型)。 Byte[]、Int32、Double、DateType 和 String 類型的值會保留其類型,其他基本類型會重新調整為 String。 Byte[] 預期為base64編碼字串。

providerDisplayName

string

來源識別提供者所指定之身分識別的顯示名稱。

resourceVersion

integer (int32)

socialDescriptor

string

subjectDescriptor

string

Graph 實體的主體描述元。

uniqueUserId

integer (int32)

IdentityDescriptor

身分識別描述元是識別類型 (Windows SID, Passport) 的包裝函式,以及 SID 或 PUID 等唯一識別碼。

名稱 類型 Description
identifier

string

此身分識別的唯一標識符,不超過 256 個字元,這會保存。

identityType

string

描述項的類型(例如 Windows、Passport 等)。

PropertiesCollection

類別會將屬性包表示為索引鍵/值組的集合。 接受 DBNull 以外的所有基本類型值(任何具有 TypeCode != TypeCode.Object的類型)。 Byte[]、Int32、Double、DateType 和 String 類型的值會保留其類型,其他基本類型會重新調整為 String。 Byte[] 預期為base64編碼字串。

名稱 類型 Description
count

integer (int32)

集合中的屬性計數。

item

object

keys

string[]

集合中的索引鍵集合。

values

string[]

集合中的值集合。

WebApiTeam

名稱 類型 Description
description

string

小組描述

id

string (uuid)

團隊(身分識別)Guid。 Team Foundation 識別符。

identity

Identity

小組身分識別。

identityUrl

string

此小組的身分識別 REST API URL

name

string

小組名稱

projectId

string (uuid)

projectName

string

url

string

小組 REST API URL