다음을 통해 공유


Categories of work item types

TFS 2017 | TFS 2015 | TFS 2013

Note

Looking for REST APIS that support TFS 2018 or later versions? See the Azure DevOps REST API Reference.

api-version = 1.0

Categories define the set of work item types that are used in a specific role in your project. For example, work item types in the "requirements" category show up in your backlog.

If you haven't already, look at the information on getting started with these APIs.

Get a list of work item type categories

no-highlight GET https://{instance}/DefaultCollection/{project}/_apis/wit/workItemTypeCategories?api-version={version}
Property Type Description
URL
instance string TFS server name ({server:port}).
project string Name or ID of a project that contains the categories
Query
api-version string Version of the API to use.

Sample request

GET https://mytfsserver/DefaultCollection/Fabrikam-Fiber-Git/_apis/wit/workItemTypeCategories?api-version=1.0

Sample response

{
  "count": 14,
  "value": [
    {
      "name": "Bug Category",
      "referenceName": "Microsoft.BugCategory",
      "defaultWorkItemType": {
        "name": "Bug",
        "url": "https://mytfsserver/DefaultCollection/6ce954b1-ce1f-45d1-b94d-e6bf2464ba2c/_apis/wit/workItemTypes/Bug"
      },
      "workItemTypes": [
        {
          "name": "Bug",
          "url": "https://mytfsserver/DefaultCollection/6ce954b1-ce1f-45d1-b94d-e6bf2464ba2c/_apis/wit/workItemTypes/Bug"
        }
      ],
      "url": "https://mytfsserver/DefaultCollection/6ce954b1-ce1f-45d1-b94d-e6bf2464ba2c/_apis/wit/workItemTypeCategories/Microsoft.BugCategory"
    },
    {
      "name": "Feature Category",
      "referenceName": "Microsoft.FeatureCategory",
      "defaultWorkItemType": {
        "name": "Feature",
        "url": "https://mytfsserver/DefaultCollection/6ce954b1-ce1f-45d1-b94d-e6bf2464ba2c/_apis/wit/workItemTypes/Feature"
      },
      "workItemTypes": [
        {
          "name": "Feature",
          "url": "https://mytfsserver/DefaultCollection/6ce954b1-ce1f-45d1-b94d-e6bf2464ba2c/_apis/wit/workItemTypes/Feature"
        }
      ],
      "url": "https://mytfsserver/DefaultCollection/6ce954b1-ce1f-45d1-b94d-e6bf2464ba2c/_apis/wit/workItemTypeCategories/Microsoft.FeatureCategory"
    },
    {
      "name": "Requirement Category",
      "referenceName": "Microsoft.RequirementCategory",
      "defaultWorkItemType": {
        "name": "Product Backlog Item",
        "url": "https://mytfsserver/DefaultCollection/6ce954b1-ce1f-45d1-b94d-e6bf2464ba2c/_apis/wit/workItemTypes/Product%20Backlog%20Item"
      },
      "workItemTypes": [
        {
          "name": "Product Backlog Item",
          "url": "https://mytfsserver/DefaultCollection/6ce954b1-ce1f-45d1-b94d-e6bf2464ba2c/_apis/wit/workItemTypes/Product%20Backlog%20Item"
        }
      ],
      "url": "https://mytfsserver/DefaultCollection/6ce954b1-ce1f-45d1-b94d-e6bf2464ba2c/_apis/wit/workItemTypeCategories/Microsoft.RequirementCategory"
    },
    {
      "name": "Test Case Category",
      "referenceName": "Microsoft.TestCaseCategory",
      "defaultWorkItemType": {
        "name": "Test Case",
        "url": "https://mytfsserver/DefaultCollection/6ce954b1-ce1f-45d1-b94d-e6bf2464ba2c/_apis/wit/workItemTypes/Test%20Case"
      },
      "workItemTypes": [
        {
          "name": "Test Case",
          "url": "https://mytfsserver/DefaultCollection/6ce954b1-ce1f-45d1-b94d-e6bf2464ba2c/_apis/wit/workItemTypes/Test%20Case"
        }
      ],
      "url": "https://mytfsserver/DefaultCollection/6ce954b1-ce1f-45d1-b94d-e6bf2464ba2c/_apis/wit/workItemTypeCategories/Microsoft.TestCaseCategory"
    },
    {
      "name": "Shared Step Category",
      "referenceName": "Microsoft.SharedStepCategory",
      "defaultWorkItemType": {
        "name": "Shared Steps",
        "url": "https://mytfsserver/DefaultCollection/6ce954b1-ce1f-45d1-b94d-e6bf2464ba2c/_apis/wit/workItemTypes/Shared%20Steps"
      },
      "workItemTypes": [
        {
          "name": "Shared Steps",
          "url": "https://mytfsserver/DefaultCollection/6ce954b1-ce1f-45d1-b94d-e6bf2464ba2c/_apis/wit/workItemTypes/Shared%20Steps"
        }
      ],
      "url": "https://mytfsserver/DefaultCollection/6ce954b1-ce1f-45d1-b94d-e6bf2464ba2c/_apis/wit/workItemTypeCategories/Microsoft.SharedStepCategory"
    },
    {
      "name": "Code Review Request Category",
      "referenceName": "Microsoft.CodeReviewRequestCategory",
      "defaultWorkItemType": {
        "name": "Code Review Request",
        "url": "https://mytfsserver/DefaultCollection/6ce954b1-ce1f-45d1-b94d-e6bf2464ba2c/_apis/wit/workItemTypes/Code%20Review%20Request"
      },
      "workItemTypes": [
        {
          "name": "Code Review Request",
          "url": "https://mytfsserver/DefaultCollection/6ce954b1-ce1f-45d1-b94d-e6bf2464ba2c/_apis/wit/workItemTypes/Code%20Review%20Request"
        }
      ],
      "url": "https://mytfsserver/DefaultCollection/6ce954b1-ce1f-45d1-b94d-e6bf2464ba2c/_apis/wit/workItemTypeCategories/Microsoft.CodeReviewRequestCategory"
    },
    {
      "name": "Code Review Response Category",
      "referenceName": "Microsoft.CodeReviewResponseCategory",
      "defaultWorkItemType": {
        "name": "Code Review Response",
        "url": "https://mytfsserver/DefaultCollection/6ce954b1-ce1f-45d1-b94d-e6bf2464ba2c/_apis/wit/workItemTypes/Code%20Review%20Response"
      },
      "workItemTypes": [
        {
          "name": "Code Review Response",
          "url": "https://mytfsserver/DefaultCollection/6ce954b1-ce1f-45d1-b94d-e6bf2464ba2c/_apis/wit/workItemTypes/Code%20Review%20Response"
        }
      ],
      "url": "https://mytfsserver/DefaultCollection/6ce954b1-ce1f-45d1-b94d-e6bf2464ba2c/_apis/wit/workItemTypeCategories/Microsoft.CodeReviewResponseCategory"
    },
    {
      "name": "Feedback Request Category",
      "referenceName": "Microsoft.FeedbackRequestCategory",
      "defaultWorkItemType": {
        "name": "Feedback Request",
        "url": "https://mytfsserver/DefaultCollection/6ce954b1-ce1f-45d1-b94d-e6bf2464ba2c/_apis/wit/workItemTypes/Feedback%20Request"
      },
      "workItemTypes": [
        {
          "name": "Feedback Request",
          "url": "https://mytfsserver/DefaultCollection/6ce954b1-ce1f-45d1-b94d-e6bf2464ba2c/_apis/wit/workItemTypes/Feedback%20Request"
        }
      ],
      "url": "https://mytfsserver/DefaultCollection/6ce954b1-ce1f-45d1-b94d-e6bf2464ba2c/_apis/wit/workItemTypeCategories/Microsoft.FeedbackRequestCategory"
    },
    {
      "name": "Feedback Response Category",
      "referenceName": "Microsoft.FeedbackResponseCategory",
      "defaultWorkItemType": {
        "name": "Feedback Response",
        "url": "https://mytfsserver/DefaultCollection/6ce954b1-ce1f-45d1-b94d-e6bf2464ba2c/_apis/wit/workItemTypes/Feedback%20Response"
      },
      "workItemTypes": [
        {
          "name": "Feedback Response",
          "url": "https://mytfsserver/DefaultCollection/6ce954b1-ce1f-45d1-b94d-e6bf2464ba2c/_apis/wit/workItemTypes/Feedback%20Response"
        }
      ],
      "url": "https://mytfsserver/DefaultCollection/6ce954b1-ce1f-45d1-b94d-e6bf2464ba2c/_apis/wit/workItemTypeCategories/Microsoft.FeedbackResponseCategory"
    },
    {
      "name": "Task Category",
      "referenceName": "Microsoft.TaskCategory",
      "defaultWorkItemType": {
        "name": "Task",
        "url": "https://mytfsserver/DefaultCollection/6ce954b1-ce1f-45d1-b94d-e6bf2464ba2c/_apis/wit/workItemTypes/Task"
      },
      "workItemTypes": [
        {
          "name": "Task",
          "url": "https://mytfsserver/DefaultCollection/6ce954b1-ce1f-45d1-b94d-e6bf2464ba2c/_apis/wit/workItemTypes/Task"
        }
      ],
      "url": "https://mytfsserver/DefaultCollection/6ce954b1-ce1f-45d1-b94d-e6bf2464ba2c/_apis/wit/workItemTypeCategories/Microsoft.TaskCategory"
    },
    {
      "name": "Hidden Types Category",
      "referenceName": "Microsoft.HiddenCategory",
      "defaultWorkItemType": {
        "name": "Code Review Request",
        "url": "https://mytfsserver/DefaultCollection/6ce954b1-ce1f-45d1-b94d-e6bf2464ba2c/_apis/wit/workItemTypes/Code%20Review%20Request"
      },
      "workItemTypes": [
        {
          "name": "Code Review Request",
          "url": "https://mytfsserver/DefaultCollection/6ce954b1-ce1f-45d1-b94d-e6bf2464ba2c/_apis/wit/workItemTypes/Code%20Review%20Request"
        },
        {
          "name": "Code Review Response",
          "url": "https://mytfsserver/DefaultCollection/6ce954b1-ce1f-45d1-b94d-e6bf2464ba2c/_apis/wit/workItemTypes/Code%20Review%20Response"
        },
        {
          "name": "Feedback Request",
          "url": "https://mytfsserver/DefaultCollection/6ce954b1-ce1f-45d1-b94d-e6bf2464ba2c/_apis/wit/workItemTypes/Feedback%20Request"
        },
        {
          "name": "Feedback Response",
          "url": "https://mytfsserver/DefaultCollection/6ce954b1-ce1f-45d1-b94d-e6bf2464ba2c/_apis/wit/workItemTypes/Feedback%20Response"
        },
        {
          "name": "Shared Steps",
          "url": "https://mytfsserver/DefaultCollection/6ce954b1-ce1f-45d1-b94d-e6bf2464ba2c/_apis/wit/workItemTypes/Shared%20Steps"
        },
        {
          "name": "Shared Parameter",
          "url": "https://mytfsserver/DefaultCollection/6ce954b1-ce1f-45d1-b94d-e6bf2464ba2c/_apis/wit/workItemTypes/Shared%20Parameter"
        },
        {
          "name": "Test Plan",
          "url": "https://mytfsserver/DefaultCollection/6ce954b1-ce1f-45d1-b94d-e6bf2464ba2c/_apis/wit/workItemTypes/Test%20Plan"
        },
        {
          "name": "Test Suite",
          "url": "https://mytfsserver/DefaultCollection/6ce954b1-ce1f-45d1-b94d-e6bf2464ba2c/_apis/wit/workItemTypes/Test%20Suite"
        }
      ],
      "url": "https://mytfsserver/DefaultCollection/6ce954b1-ce1f-45d1-b94d-e6bf2464ba2c/_apis/wit/workItemTypeCategories/Microsoft.HiddenCategory"
    },
    {
      "name": "Shared Parameter Category",
      "referenceName": "Microsoft.SharedParameterCategory",
      "defaultWorkItemType": {
        "name": "Shared Parameter",
        "url": "https://mytfsserver/DefaultCollection/6ce954b1-ce1f-45d1-b94d-e6bf2464ba2c/_apis/wit/workItemTypes/Shared%20Parameter"
      },
      "workItemTypes": [
        {
          "name": "Shared Parameter",
          "url": "https://mytfsserver/DefaultCollection/6ce954b1-ce1f-45d1-b94d-e6bf2464ba2c/_apis/wit/workItemTypes/Shared%20Parameter"
        }
      ],
      "url": "https://mytfsserver/DefaultCollection/6ce954b1-ce1f-45d1-b94d-e6bf2464ba2c/_apis/wit/workItemTypeCategories/Microsoft.SharedParameterCategory"
    },
    {
      "name": "Test Plan Category",
      "referenceName": "Microsoft.TestPlanCategory",
      "defaultWorkItemType": {
        "name": "Test Plan",
        "url": "https://mytfsserver/DefaultCollection/6ce954b1-ce1f-45d1-b94d-e6bf2464ba2c/_apis/wit/workItemTypes/Test%20Plan"
      },
      "workItemTypes": [
        {
          "name": "Test Plan",
          "url": "https://mytfsserver/DefaultCollection/6ce954b1-ce1f-45d1-b94d-e6bf2464ba2c/_apis/wit/workItemTypes/Test%20Plan"
        }
      ],
      "url": "https://mytfsserver/DefaultCollection/6ce954b1-ce1f-45d1-b94d-e6bf2464ba2c/_apis/wit/workItemTypeCategories/Microsoft.TestPlanCategory"
    },
    {
      "name": "Test Suite Category",
      "referenceName": "Microsoft.TestSuiteCategory",
      "defaultWorkItemType": {
        "name": "Test Suite",
        "url": "https://mytfsserver/DefaultCollection/6ce954b1-ce1f-45d1-b94d-e6bf2464ba2c/_apis/wit/workItemTypes/Test%20Suite"
      },
      "workItemTypes": [
        {
          "name": "Test Suite",
          "url": "https://mytfsserver/DefaultCollection/6ce954b1-ce1f-45d1-b94d-e6bf2464ba2c/_apis/wit/workItemTypes/Test%20Suite"
        }
      ],
      "url": "https://mytfsserver/DefaultCollection/6ce954b1-ce1f-45d1-b94d-e6bf2464ba2c/_apis/wit/workItemTypeCategories/Microsoft.TestSuiteCategory"
    }
  ]
}

Sample code

Get a work item type category

GET https://{instance}/DefaultCollection/{project}/_apis/wit/workItemTypeCategories/{name}?api-version={version}
Property Type Description
instance string TFS server name ({server:port}).
project string Name or ID of a project that contains the categories
name string Name of the category
Query
api-version string Version of the API to use.

Sample request

GET https://mytfsserver/DefaultCollection/Fabrikam-Fiber-Git/_apis/wit/workItemTypeCategories/Microsoft.RequirementCategory?api-version=1.0

Sample response

{
  "name": "Requirement Category",
  "referenceName": "Microsoft.RequirementCategory",
  "defaultWorkItemType": {
    "name": "Product Backlog Item",
    "url": "https://mytfsserver/DefaultCollection/6ce954b1-ce1f-45d1-b94d-e6bf2464ba2c/_apis/wit/workItemTypes/Product%20Backlog%20Item"
  },
  "workItemTypes": [
    {
      "name": "Product Backlog Item",
      "url": "https://mytfsserver/DefaultCollection/6ce954b1-ce1f-45d1-b94d-e6bf2464ba2c/_apis/wit/workItemTypes/Product%20Backlog%20Item"
    }
  ],
  "url": "https://mytfsserver/DefaultCollection/6ce954b1-ce1f-45d1-b94d-e6bf2464ba2c/_apis/wit/workItemTypeCategories/Microsoft.RequirementCategory"
}

Sample code