Aracılığıyla paylaş


Classification Nodes - Get Classification Nodes

Belirli bir proje için belirli bir düğüm kimliği listesi için kök sınıflandırma düğümlerini veya sınıflandırma düğümlerinin listesini alır. Ids parametresinin sağlanması durumunda, bu kimlikler için sınıflandırma düğümlerinin listesini alırsınız. Aksi takdirde bu proje için kök sınıflandırma düğümleri alırsınız.

GET https://dev.azure.com/{organization}/{project}/_apis/wit/classificationnodes?ids={ids}&api-version=7.1-preview.2
GET https://dev.azure.com/{organization}/{project}/_apis/wit/classificationnodes?ids={ids}&$depth={$depth}&errorPolicy={errorPolicy}&api-version=7.1-preview.2

URI Parametreleri

Name İçinde Gerekli Tür Description
organization
path True

string

Azure DevOps kuruluşunun adı.

project
path True

string

Proje Kimliği veya proje adı

api-version
query True

string

Kullanılacak API sürümü. Api'nin bu sürümünü kullanmak için bu değer '7.1-preview.2' olarak ayarlanmalıdır.

ids
query True

string

array (int32)

Virgülle ayrılmış tamsayı sınıflandırma düğümleri kimlikleri. Kök düğümler istiyorsanız gerekli değildir.

$depth
query

integer

int32

Getirilecek çocukların derinliği.

errorPolicy
query

ClassificationNodesErrorPolicy

Bazı düğümleri alma hatalarını işlemek için bayrak ekleyin. Olası seçenekler Başarısız ve Atla seçenekleridir.

Yanıtlar

Name Tür Description
200 OK

WorkItemClassificationNode[]

başarılı işlem

Güvenlik

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

Name Description
vso.work İş öğelerini, sorguları, panoları, alan ve yineleme yollarını ve diğer iş öğesi izlemeyle ilgili meta verileri okuma yeteneği verir. Ayrıca sorguları yürütme, iş öğelerini arama ve hizmet kancaları aracılığıyla iş öğesi olayları hakkında bildirim alma olanağı verir.

Örnekler

Get classification nodes from list of ids.
Get classification nodes with errorPolicy parameter.
Get the area tree with 2 levels of children
Get the iteration tree with 2 levels of children
Get the root area tree
Get the root iteration tree

Get classification nodes from list of ids.

Sample Request

GET https://dev.azure.com/fabrikam/Fabrikam-Fiber-Git/_apis/wit/classificationnodes?ids=1,3&api-version=7.1-preview.2

Sample Response

{
  "count": 2,
  "value": [
    {
      "id": 1,
      "identifier": "ffba9b15-c8c9-42f8-b2d2-423807d8d3fd",
      "name": "demo",
      "structureType": "iteration",
      "hasChildren": true,
      "path": "\\fabrikam\\fiber\\tfvc\\iteration",
      "_links": {
        "self": {
          "href": "https://dev.azure.com/fabrikam/52202911-0aa5-4f0a-9371-9ef681b0de74/_apis/wit/classificationNodes/Iterations"
        }
      },
      "url": "https://dev.azure.com/fabrikam/52202911-0aa5-4f0a-9371-9ef681b0de74/_apis/wit/classificationNodes/Iterations"
    },
    {
      "id": 3,
      "identifier": "ce814585-1e70-4869-841c-dd0e98118a0c",
      "name": "Iteration 1",
      "structureType": "iteration",
      "hasChildren": false,
      "path": "\\fabrikam\\fiber\\tfvc\\iteration",
      "attributes": {
        "startDate": "2018-01-15T00:00:00Z",
        "finishDate": "2018-01-31T00:00:00Z"
      },
      "_links": {
        "self": {
          "href": "https://dev.azure.com/fabrikam/52202911-0aa5-4f0a-9371-9ef681b0de74/_apis/wit/classificationNodes/Iterations/Iteration%201"
        },
        "parent": {
          "href": "https://dev.azure.com/fabrikam/52202911-0aa5-4f0a-9371-9ef681b0de74/_apis/wit/classificationNodes/Iterations"
        }
      },
      "url": "https://dev.azure.com/fabrikam/52202911-0aa5-4f0a-9371-9ef681b0de74/_apis/wit/classificationNodes/Iterations/Iteration%201"
    }
  ]
}

Get classification nodes with errorPolicy parameter.

Sample Request

GET https://dev.azure.com/fabrikam/Fabrikam-Fiber-Git/_apis/wit/classificationnodes?ids=1,2&api-version=7.1-preview.2

Sample Response

{
  "count": 2,
  "value": [
    {
      "id": 1,
      "identifier": "ffba9b15-c8c9-42f8-b2d2-423807d8d3fd",
      "name": "demo",
      "structureType": "iteration",
      "hasChildren": true,
      "path": "\\fabrikam\\fiber\\tfvc\\iteration",
      "_links": {
        "self": {
          "href": "https://dev.azure.com/fabrikam/52202911-0aa5-4f0a-9371-9ef681b0de74/_apis/wit/classificationNodes/Iterations"
        }
      },
      "url": "https://dev.azure.com/fabrikam/52202911-0aa5-4f0a-9371-9ef681b0de74/_apis/wit/classificationNodes/Iterations"
    },
    null
  ]
}

Get the area tree with 2 levels of children

Sample Request

GET https://dev.azure.com/fabrikam/Fabrikam-Fiber-Git/_apis/wit/classificationnodes?$depth=2&api-version=7.1-preview.2

Sample Response

{
  "id": 3568,
  "identifier": "7fc6fce0-105b-403c-a126-8f8212713fd7",
  "name": "Fabrikam-Fiber-Git",
  "structureType": "area",
  "hasChildren": true,
  "path": "\\fabrikam\\fiber\\tfvc\\iteration",
  "children": [
    {
      "id": 4482,
      "identifier": "7aebdc2d-3b54-416f-8daf-171b2dd38a7b",
      "name": "Devices",
      "structureType": "area",
      "hasChildren": true,
      "path": "\\fabrikam\\fiber\\tfvc\\iteration",
      "children": [
        {
          "id": 4483,
          "identifier": "c3f3c661-9a81-4925-baa3-a91b36ea77f4",
          "name": "Windows Phone",
          "structureType": "area",
          "hasChildren": false,
          "path": "\\fabrikam\\fiber\\tfvc\\iteration",
          "url": "https://dev.azure.com/fabrikam/6ce954b1-ce1f-45d1-b94d-e6bf2464ba2c/_apis/wit/classificationNodes/Areas/Devices/Windows%20Phone"
        },
        {
          "id": 4484,
          "identifier": "5f00e777-9531-4931-9951-d86e18a95569",
          "name": "Surface",
          "structureType": "area",
          "hasChildren": false,
          "path": "\\fabrikam\\fiber\\tfvc\\iteration",
          "url": "https://dev.azure.com/fabrikam/6ce954b1-ce1f-45d1-b94d-e6bf2464ba2c/_apis/wit/classificationNodes/Areas/Devices/Surface"
        },
        {
          "id": 4485,
          "identifier": "459a3f9f-6200-4343-8fd4-5927e01dbe93",
          "name": "iPhone",
          "structureType": "area",
          "hasChildren": false,
          "path": "\\fabrikam\\fiber\\tfvc\\iteration",
          "url": "https://dev.azure.com/fabrikam/6ce954b1-ce1f-45d1-b94d-e6bf2464ba2c/_apis/wit/classificationNodes/Areas/Devices/iPhone"
        }
      ],
      "url": "https://dev.azure.com/fabrikam/6ce954b1-ce1f-45d1-b94d-e6bf2464ba2c/_apis/wit/classificationNodes/Areas/Devices"
    },
    {
      "id": 4486,
      "identifier": "968dbbb1-b355-4d41-9d55-61ffe87f4699",
      "name": "Website",
      "structureType": "area",
      "hasChildren": false,
      "path": "\\fabrikam\\fiber\\tfvc\\iteration",
      "url": "https://dev.azure.com/fabrikam/6ce954b1-ce1f-45d1-b94d-e6bf2464ba2c/_apis/wit/classificationNodes/Areas/Website"
    },
    {
      "id": 4487,
      "identifier": "fb722a2f-ebf6-4c31-959b-334dac1ed31e",
      "name": "Backend",
      "structureType": "area",
      "hasChildren": true,
      "path": "\\fabrikam\\fiber\\tfvc\\iteration",
      "children": [
        {
          "id": 4488,
          "identifier": "b8104791-798c-4ae8-a293-e1adbde7c10a",
          "name": "Database",
          "structureType": "area",
          "hasChildren": false,
          "path": "\\fabrikam\\fiber\\tfvc\\iteration",
          "url": "https://dev.azure.com/fabrikam/6ce954b1-ce1f-45d1-b94d-e6bf2464ba2c/_apis/wit/classificationNodes/Areas/Backend/Database"
        },
        {
          "id": 4489,
          "identifier": "17115d5c-4c63-4530-80df-df6d42a2864d",
          "name": "Middle-tier",
          "structureType": "area",
          "hasChildren": false,
          "path": "\\fabrikam\\fiber\\tfvc\\iteration",
          "url": "https://dev.azure.com/fabrikam/6ce954b1-ce1f-45d1-b94d-e6bf2464ba2c/_apis/wit/classificationNodes/Areas/Backend/Middle-tier"
        }
      ],
      "url": "https://dev.azure.com/fabrikam/6ce954b1-ce1f-45d1-b94d-e6bf2464ba2c/_apis/wit/classificationNodes/Areas/Backend"
    }
  ],
  "_links": {
    "self": {
      "href": "https://dev.azure.com/fabrikam/6ce954b1-ce1f-45d1-b94d-e6bf2464ba2c/_apis/wit/classificationNodes/Areas"
    }
  },
  "url": "https://dev.azure.com/fabrikam/6ce954b1-ce1f-45d1-b94d-e6bf2464ba2c/_apis/wit/classificationNodes/Areas"
}

Get the iteration tree with 2 levels of children

Sample Request

GET https://dev.azure.com/fabrikam/Fabrikam-Fiber-Git/_apis/wit/classificationnodes?$depth=2&api-version=7.1-preview.2

Sample Response

{
  "id": 3569,
  "identifier": "49cea43c-16b2-417c-a98f-65d511e3ca9d",
  "name": "Fabrikam-Fiber-Git",
  "structureType": "iteration",
  "hasChildren": true,
  "path": "\\fabrikam\\fiber\\tfvc\\iteration",
  "children": [
    {
      "id": 3566,
      "identifier": "6b5153a0-76f7-4aad-bd60-7dbfe3c2947d",
      "name": "Release 3",
      "structureType": "iteration",
      "hasChildren": false,
      "path": "\\fabrikam\\fiber\\tfvc\\iteration",
      "url": "https://dev.azure.com/fabrikam/6ce954b1-ce1f-45d1-b94d-e6bf2464ba2c/_apis/wit/classificationNodes/Iterations/Release%203"
    },
    {
      "id": 3571,
      "identifier": "8c80c27e-8afb-4315-9057-686a1b862ed5",
      "name": "Release 2",
      "structureType": "iteration",
      "hasChildren": false,
      "path": "\\fabrikam\\fiber\\tfvc\\iteration",
      "url": "https://dev.azure.com/fabrikam/6ce954b1-ce1f-45d1-b94d-e6bf2464ba2c/_apis/wit/classificationNodes/Iterations/Release%202"
    },
    {
      "id": 3572,
      "identifier": "92938702-f26f-4f3a-b291-67f84b16c479",
      "name": "Release 4",
      "structureType": "iteration",
      "path": "\\fabrikam\\fiber\\tfvc\\iteration",
      "hasChildren": false,
      "url": "https://dev.azure.com/fabrikam/6ce954b1-ce1f-45d1-b94d-e6bf2464ba2c/_apis/wit/classificationNodes/Iterations/Release%204"
    },
    {
      "id": 3576,
      "identifier": "395a6b4f-6488-41ee-a06a-1514405ab6f0",
      "name": "Release 1",
      "structureType": "iteration",
      "hasChildren": true,
      "path": "\\fabrikam\\fiber\\tfvc\\iteration",
      "children": [
        {
          "id": 3564,
          "identifier": "63d12e9d-37fd-48af-80a5-b93095705806",
          "name": "Sprint 4",
          "structureType": "iteration",
          "hasChildren": false,
          "url": "https://dev.azure.com/fabrikam/6ce954b1-ce1f-45d1-b94d-e6bf2464ba2c/_apis/wit/classificationNodes/Iterations/Release%201/Sprint%204"
        },
        {
          "id": 3565,
          "identifier": "c9206006-4362-4b16-9205-1b94d32a6fb2",
          "name": "Sprint 2",
          "structureType": "iteration",
          "hasChildren": false,
          "path": "\\fabrikam\\fiber\\tfvc\\iteration",
          "attributes": {
            "startDate": "2014-03-17T00:00:00Z",
            "finishDate": "2014-03-28T00:00:00Z"
          },
          "url": "https://dev.azure.com/fabrikam/6ce954b1-ce1f-45d1-b94d-e6bf2464ba2c/_apis/wit/classificationNodes/Iterations/Release%201/Sprint%202"
        },
        {
          "id": 3567,
          "identifier": "ae109273-2806-42b8-8c41-d249c7253760",
          "name": "Sprint 6",
          "structureType": "iteration",
          "hasChildren": false,
          "path": "\\fabrikam\\fiber\\tfvc\\iteration",
          "url": "https://dev.azure.com/fabrikam/6ce954b1-ce1f-45d1-b94d-e6bf2464ba2c/_apis/wit/classificationNodes/Iterations/Release%201/Sprint%206"
        },
        {
          "id": 3573,
          "identifier": "9fd05e41-9dc2-40b0-b826-d7dd0ab3dc24",
          "name": "Sprint 5",
          "structureType": "iteration",
          "hasChildren": false,
          "path": "\\fabrikam\\fiber\\tfvc\\iteration",
          "url": "https://dev.azure.com/fabrikam/6ce954b1-ce1f-45d1-b94d-e6bf2464ba2c/_apis/wit/classificationNodes/Iterations/Release%201/Sprint%205"
        },
        {
          "id": 3574,
          "identifier": "eb2bdabd-0c3c-4f55-adcc-106dcedd8528",
          "name": "Sprint 1",
          "structureType": "iteration",
          "hasChildren": false,
          "path": "\\fabrikam\\fiber\\tfvc\\iteration",
          "attributes": {
            "startDate": "2014-03-03T00:00:00Z",
            "finishDate": "2014-03-14T00:00:00Z"
          },
          "url": "https://dev.azure.com/fabrikam/6ce954b1-ce1f-45d1-b94d-e6bf2464ba2c/_apis/wit/classificationNodes/Iterations/Release%201/Sprint%201"
        },
        {
          "id": 3575,
          "identifier": "5b96a849-05c3-4685-bbf6-d33cc1becd6a",
          "name": "Sprint 3",
          "structureType": "iteration",
          "hasChildren": false,
          "path": "\\fabrikam\\fiber\\tfvc\\iteration",
          "url": "https://dev.azure.com/fabrikam/6ce954b1-ce1f-45d1-b94d-e6bf2464ba2c/_apis/wit/classificationNodes/Iterations/Release%201/Sprint%203"
        }
      ],
      "url": "https://dev.azure.com/fabrikam/6ce954b1-ce1f-45d1-b94d-e6bf2464ba2c/_apis/wit/classificationNodes/Iterations/Release%201"
    }
  ],
  "_links": {
    "self": {
      "href": "https://dev.azure.com/fabrikam/6ce954b1-ce1f-45d1-b94d-e6bf2464ba2c/_apis/wit/classificationNodes/Iterations"
    }
  },
  "url": "https://dev.azure.com/fabrikam/6ce954b1-ce1f-45d1-b94d-e6bf2464ba2c/_apis/wit/classificationNodes/Iterations"
}

Get the root area tree

Sample Request

GET https://dev.azure.com/fabrikam/Fabrikam-Fiber-Git/_apis/wit/classificationnodes?api-version=7.1-preview.2

Sample Response

{
  "id": 3568,
  "identifier": "2e5e8ec1-40d1-4da1-bcca-49949b2e5607",
  "name": "Fabrikam-Fiber-Git",
  "structureType": "area",
  "hasChildren": true,
  "path": "\\fabrikam\\fiber\\tfvc\\iteration",
  "_links": {
    "self": {
      "href": "https://dev.azure.com/fabrikam/6ce954b1-ce1f-45d1-b94d-e6bf2464ba2c/_apis/wit/classificationNodes/Areas"
    }
  },
  "url": "https://dev.azure.com/fabrikam/6ce954b1-ce1f-45d1-b94d-e6bf2464ba2c/_apis/wit/classificationNodes/Areas"
}

Get the root iteration tree

Sample Request

GET https://dev.azure.com/fabrikam/Fabrikam-Fiber-Git/_apis/wit/classificationnodes?api-version=7.1-preview.2

Sample Response

{
  "id": 3569,
  "identifier": "bfd21f76-1329-4ef8-b26d-ccc290282d4f",
  "name": "Fabrikam-Fiber-Git",
  "structureType": "iteration",
  "hasChildren": true,
  "path": "\\fabrikam\\fiber\\tfvc\\iteration",
  "_links": {
    "self": {
      "href": "https://dev.azure.com/fabrikam/6ce954b1-ce1f-45d1-b94d-e6bf2464ba2c/_apis/wit/classificationNodes/Iterations"
    }
  },
  "url": "https://dev.azure.com/fabrikam/6ce954b1-ce1f-45d1-b94d-e6bf2464ba2c/_apis/wit/classificationNodes/Iterations"
}

Tanımlar

Name Description
ClassificationNodesErrorPolicy

Bazı düğümleri alma hatalarını işlemek için bayrak ekleyin. Olası seçenekler Başarısız ve Atla seçenekleridir.

ReferenceLinks

REST başvuru bağlantıları koleksiyonunu temsil eden sınıf.

TreeNodeStructureType

Düğüm yapısı türü.

WorkItemClassificationNode

İş öğesi izleme için bir sınıflandırma düğümü tanımlar.

ClassificationNodesErrorPolicy

Bazı düğümleri alma hatalarını işlemek için bayrak ekleyin. Olası seçenekler Başarısız ve Atla seçenekleridir.

Name Tür Description
fail

string

omit

string

REST başvuru bağlantıları koleksiyonunu temsil eden sınıf.

Name Tür Description
links

object

Bağlantıların salt okunur görünümü. Başvuru bağlantıları salt okunur olduğundan, bunları yalnızca salt okunur olarak göstermek istiyoruz.

TreeNodeStructureType

Düğüm yapısı türü.

Name Tür Description
area

string

Alan türü.

iteration

string

Yineleme türü.

WorkItemClassificationNode

İş öğesi izleme için bir sınıflandırma düğümü tanımlar.

Name Tür Description
_links

ReferenceLinks

İlgili REST kaynaklarına bağlantı başvuruları.

attributes

object

Yineleme düğümleri için başlangıç/bitiş tarihi gibi düğüm özniteliklerine sahip sözlük.

children

WorkItemClassificationNode[]

Getirilen alt düğümlerin listesi.

hasChildren

boolean

Sınıflandırma düğümünde alt düğüm olup olmadığını gösteren bayrak.

id

integer

Sınıflandırma düğümünün tamsayı kimliği.

identifier

string

Sınıflandırma düğümünün GUID kimliği.

name

string

Sınıflandırma düğümünün adı.

path

string

Sınıflandırma düğümünün yolu.

structureType

TreeNodeStructureType

Düğüm yapısı türü.

url

string