GetWorkitemTypeFieldConfig - Get workitem type field configuration

Updated at:

Applicable editions

Central edition, Region edition

Service endpoint and authorization

  • Get service endpoint: Replace {domain} in the API request URI.

  • Get a personal access token and use it in the x-yunxiao-token request header.

  • Get the organization ID from the Basic Information page in the organization management console. Required for the Central edition only.

Product

Resource

Permissions

Project Collaboration

workitem type field configuration

Read-only

Request syntax

Central edition

GET https://{domain}/oapi/v1/projex/organizations/{organizationId}/projects/{projectId}/workitemTypes/{id}/fields

Region edition

GET https://{domain}/oapi/v1/projex/projects/{projectId}/workitemTypes/{id}/fields

Request headers

Parameter

Type

Required

Description

Example

x-yunxiao-token

string

Yes

Your personal access token for Alibaba Cloud DevOps.

pt-0fh3****0fbG_35af****0484

Request parameters

Parameter

Type

In

Required

Description

Example

organizationId

string

path

  • Yes (for Central edition)

  • No (for Region edition)

The organization ID.

projectId

string

path

Yes

The unique identifier of the project.

id

string

path

Yes

The ID of the workitem type.

Request examples

Central edition

curl -X 'GET' \
  'https://{domain}/oapi/v1/projex/organizations/{organizationId}/projects/{projectId}/workitemTypes/{id}/fields' \
  -H 'Content-Type: application/json' \
  -H 'x-yunxiao-token: pt-0fh3****0fbG_35af****0484'

Region edition

curl -X 'GET' \
  'https://{domain}/oapi/v1/projex/projects/{projectId}/workitemTypes/{id}/fields' \
  -H 'Content-Type: application/json' \
  -H 'x-yunxiao-token: pt-0fh3****0fbG_35af****0484'

Response parameters

Parameter

Type

Description

Example

-

array

An array of field configuration objects.

-

object

cascadingOptions

object

The options for a cascading field.

mustSelectLeaf

boolean

Specifies whether a leaf node must be selected.

true

optionsList

array

The list of options.

[]

-

object

children

array[string]

The child options.

defaultValue

string

The default value.

12233

description

string

The description of the field.

Description

format

string

The format of the field. This corresponds to the following field types: list (Single-select), multiList (Multi-select), date (Date), dateTime (Date Time), int (Integer), float (Float), string (Single-line Text), text (Multi-line Text), user (User), multiUser (Multi-select User), cascading (Cascading), file (File), tag (Tag), sprint (Sprint), and version (Version).

list

id

string

The field ID.

126553d622cc8521793e08****

name

string

The name of the field.

Name

options

array

The available options.

-

object

displayValue

string

The display value of the option.

111

id

string

The ID of the option.

126553d622cc8521793e08****

value

string

The value of the option.

111

valueEn

string

The English value of the option.

111

required

boolean

Specifies whether the field is required.

true

showWhenCreate

boolean

Specifies whether the field is displayed during workitem creation.

true

type

string

The type of the field. For example, NativeField indicates a system field, and CustomField indicates a custom field.

NativeField

Response example

[
    {
        "cascadingOptions": {
            "mustSelectLeaf": true,
            "optionsList": []
        },
        "defaultValue": "12233",
        "description": "Description",
        "format": "list",
        "id": "126553d622cc8521793e08****",
        "name": "Name",
        "options": [
            {
                "displayValue": "111",
                "id": "126553d622cc8521793e08****",
                "value": "111",
                "valueEn": "111"
            }
        ],
        "required": true,
        "showWhenCreate": true,
        "type": "NativeField"
    }
]

Error codes

For API error codes, see the Error Code Center.