Behaviors - Get

返回进程的一个行为。

GET https://dev.azure.com/{organization}/_apis/work/processes/{processId}/behaviors/{behaviorRefName}?api-version=7.1
GET https://dev.azure.com/{organization}/_apis/work/processes/{processId}/behaviors/{behaviorRefName}?$expand={$expand}&api-version=7.1

URI 参数

名称 必需 类型 说明
behaviorRefName
path True

string

行为的引用名称

organization
path True

string

Azure DevOps 组织的名称。

processId
path True

string (uuid)

进程的 ID

api-version
query True

string

要使用的 API 版本。 这应设置为“7.1”才能使用此版本的 API。

$expand
query

GetBehaviorsExpand

响应

名称 类型 说明
200 OK

ProcessBehavior

成功作

安全性

oauth2

类型: oauth2
流向: 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

作用域

名称 说明
vso.work 授予读取工作项、查询、版块、区域和迭代路径以及其他工作项跟踪相关元数据的能力。 此外,还授予执行查询、搜索工作项以及通过服务挂钩接收有关工作项事件的通知的能力。

示例

Get the process behavior
Get the process behavior with CombinedFields option
Get the process behavior with Fields option

Get the process behavior

示例请求

GET https://dev.azure.com/fabrikam/_apis/work/processes/906c7065-2a04-4f61-aac1-b5da9cef040b/behaviors/System.RequirementBacklogBehavior?api-version=7.1

示例响应

{
  "name": "Stories",
  "referenceName": "System.RequirementBacklogBehavior",
  "color": "009CCC",
  "rank": 20,
  "description": "Requirement level backlog and board",
  "customization": "inherited",
  "inherits": {
    "behaviorRefName": "System.OrderedBehavior",
    "url": "https://dev.azure.com/fabrikam/_apis/work/processes/906c7065-2a04-4f61-aac1-b5da9cef040b/behaviors/System.OrderedBehavior"
  },
  "url": "https://dev.azure.com/fabrikam/_apis/work/processes/906c7065-2a04-4f61-aac1-b5da9cef040b/behaviors/System.RequirementBacklogBehavior"
}

Get the process behavior with CombinedFields option

示例请求

GET https://dev.azure.com/fabrikam/_apis/work/processes/906c7065-2a04-4f61-aac1-b5da9cef040b/behaviors/System.RequirementBacklogBehavior?$expand=CombinedFields&api-version=7.1

示例响应

{
  "name": "Stories",
  "referenceName": "System.RequirementBacklogBehavior",
  "color": "009CCC",
  "rank": 20,
  "description": "Requirement level backlog and board",
  "customization": "inherited",
  "fields": [
    {
      "name": "Stack Rank",
      "referenceName": "Microsoft.VSTS.Common.StackRank",
      "url": "https://dev.azure.com/fabrikam/_apis/wit/fields/Microsoft.VSTS.Common.StackRank"
    },
    {
      "name": "Story Points",
      "referenceName": "Microsoft.VSTS.Scheduling.StoryPoints",
      "url": "https://dev.azure.com/fabrikam/_apis/wit/fields/Microsoft.VSTS.Scheduling.StoryPoints"
    }
  ],
  "inherits": {
    "behaviorRefName": "System.OrderedBehavior",
    "url": "https://dev.azure.com/fabrikam/_apis/work/processes/906c7065-2a04-4f61-aac1-b5da9cef040b/behaviors/System.OrderedBehavior"
  },
  "url": "https://dev.azure.com/fabrikam/_apis/work/processes/906c7065-2a04-4f61-aac1-b5da9cef040b/behaviors/System.RequirementBacklogBehavior"
}

Get the process behavior with Fields option

示例请求

GET https://dev.azure.com/fabrikam/_apis/work/processes/906c7065-2a04-4f61-aac1-b5da9cef040b/behaviors/System.RequirementBacklogBehavior?$expand=Fields&api-version=7.1

示例响应

{
  "name": "Stories",
  "referenceName": "System.RequirementBacklogBehavior",
  "color": "009CCC",
  "rank": 20,
  "description": "Requirement level backlog and board",
  "customization": "inherited",
  "fields": [
    {
      "name": "Story Points",
      "referenceName": "Microsoft.VSTS.Scheduling.StoryPoints",
      "url": "https://dev.azure.com/fabrikam/_apis/wit/fields/Microsoft.VSTS.Scheduling.StoryPoints"
    }
  ],
  "inherits": {
    "behaviorRefName": "System.OrderedBehavior",
    "url": "https://dev.azure.com/fabrikam/_apis/work/processes/906c7065-2a04-4f61-aac1-b5da9cef040b/behaviors/System.OrderedBehavior"
  },
  "url": "https://dev.azure.com/fabrikam/_apis/work/processes/906c7065-2a04-4f61-aac1-b5da9cef040b/behaviors/System.RequirementBacklogBehavior"
}

定义

名称 说明
CustomizationType

指示此工作项的自定义类型。 系统行为继承自父进程,但未修改。 继承的行为是从父进程继承的修改行为。 自定义行为是由用户在当前进程中创建的行为。

GetBehaviorsExpand
ProcessBehavior

进程行为模型。

ProcessBehaviorField

处理行为字段。

ProcessBehaviorReference

进程行为参考。

CustomizationType

指示此工作项的自定义类型。 系统行为继承自父进程,但未修改。 继承的行为是从父进程继承的修改行为。 自定义行为是由用户在当前进程中创建的行为。

说明
custom

如果新创建的工作项类型已自定义,则自定义类型为 Custom。

inherited

如果自定义了继承进程的现有工作项类型,则自定义自定义类型。

system

自定义类型为 System(如果系统生成的 workitemtype)。

GetBehaviorsExpand

说明
combinedFields

此选项返回与此行为关联的字段及其继承的所有行为。

fields

此选项返回与行为关联的字段。

none

默认无选项。

ProcessBehavior

进程行为模型。

名称 类型 说明
color

string

颜色。

customization

CustomizationType

指示此工作项的自定义类型。 系统行为继承自父进程,但未修改。 继承的行为是从父进程继承的修改行为。 自定义行为是由用户在当前进程中创建的行为。

description

string

. 描述

fields

ProcessBehaviorField[]

处理行为字段。

inherits

ProcessBehaviorReference

父行为引用。

name

string

行为名称。

rank

integer (int32)

行为排名

referenceName

string

行为 ID

url

string

行为的 URL。

ProcessBehaviorField

处理行为字段。

名称 类型 说明
name

string

字段的名称。

referenceName

string

字段的引用名称。

url

string

指向字段的 URL。

ProcessBehaviorReference

进程行为参考。

名称 类型 说明
behaviorRefName

string

行为 ID。

url

string

行为 URL。