Projects - Get Project Properties

取得 Team 專案屬性的集合。

GET https://dev.azure.com/{organization}/_apis/projects/{projectId}/properties?api-version=7.1-preview.1
GET https://dev.azure.com/{organization}/_apis/projects/{projectId}/properties?keys={keys}&api-version=7.1-preview.1

URI 參數

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

string

Azure DevOps 組織的名稱。

projectId
path True

string

uuid

小組專案識別碼。

api-version
query True

string

要使用的 API 版本。 這應該設定為 '7.1-preview.1' 以使用此版本的 API。

keys
query

string

array (string)

Team 專案屬性名稱的逗號分隔字串。 支援萬用字元 (「?」 和 「*」) 。 如果未指定任何索引鍵,則會傳回所有屬性。

回應

名稱 類型 Description
200 OK

ProjectProperty[]

成功的作業

安全性

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

名稱 Description
vso.profile 授與讀取設定檔、帳戶、集合、專案、小組和其他最上層組織成品的能力。
vso.project 授與讀取專案和小組的能力。

範例

Get all team project properties
Get specific team project properties

Get all team project properties

Sample Request

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

Sample Response

{
  "count": 8,
  "value": [
    {
      "name": "System.CurrentProcessTemplateId",
      "value": "2dc3221a-2d39-4138-a4e1-fc4d20d8912d"
    },
    {
      "name": "System.OriginalProcessTemplateId",
      "value": "2dc3221a-2d39-4138-a4e1-fc4d20d8912d"
    },
    {
      "name": "System.ProcessTemplateType",
      "value": "adcc42ab-9882-485e-a3ed-7678f01f66bc"
    },
    {
      "name": "System.Process Template",
      "value": "Agile"
    },
    {
      "name": "System.Microsoft.TeamFoundation.Team.Default",
      "value": "9b7ae5b9-826f-4353-99d6-daaa5cd94ec6"
    },
    {
      "name": "System.SourceControlCapabilityFlags",
      "value": "2"
    },
    {
      "name": "System.SourceControlGitEnabled",
      "value": "True"
    },
    {
      "name": "System.SourceControlGitPermissionsInitialized",
      "value": "True"
    }
  ]
}

Get specific team project properties

Sample Request

GET https://dev.azure.com/fabrikam/_apis/projects/{projectId}/properties?keys=System.CurrentProcessTemplateId,*SourceControl*&api-version=7.1-preview.1

Sample Response

{
  "count": 4,
  "value": [
    {
      "name": "System.CurrentProcessTemplateId",
      "value": "2dc3221a-2d39-4138-a4e1-fc4d20d8912d"
    },
    {
      "name": "System.SourceControlCapabilityFlags",
      "value": "2"
    },
    {
      "name": "System.SourceControlGitEnabled",
      "value": "True"
    },
    {
      "name": "System.SourceControlGitPermissionsInitialized",
      "value": "True"
    }
  ]
}

定義

ProjectProperty

與專案相關聯的具名值。

名稱 類型 Description
name

string

屬性的名稱。

value

object

屬性的值。