Help Center/ CodeArts Req/ API Reference/ API/ Scrum Project Settings/ Querying Template Field Configurations
Updated on 2026-10-13 GMT+08:00

Querying Template Field Configurations

Function

This API is used to query the template field configuration list of a project. You can specify tracker_id to filter templates of a specific work item type.

Calling Method

For details, see Calling APIs.

Authorization Information

No identity policy-based permission required for calling this API.

URI

GET /v2/projects/{project_id}/field-templates

Table 1 Path Parameters

Parameter

Mandatory

Type

Description

project_id

Yes

String

Definition:

32-character UUID of a project, which uniquely identifies a project. Obtain the value of this parameter from the project_id field in the response body of the Querying the Project List API.

Constraints:

The value must contain 32 characters. Digits and letters are allowed.

Value range:

N/A

Default value:

N/A

Table 2 Query Parameters

Parameter

Mandatory

Type

Description

tracker_id

No

Integer

Definition

Work item type ID, which is used to filter templates of a specific work item type.

Constraints

N/A

Range

  • 2: task

  • 3: bug

  • 5: epic

  • 6: feature

  • 7: story

Default Value

N/A (All types of templates are returned.)

Request Parameters

Table 3 Request header parameters

Parameter

Mandatory

Type

Description

X-Auth-Token

Yes

String

Definition

User token. Obtain a token by calling the IAM API for obtaining a user token. The value of X-Subject-Token in the response header is the user token.

Constraints

N/A

Range

The value contains 10 to 32,768 characters.

Default Value

N/A

Response Parameters

Status code: 200

Table 4 Response body parameters

Parameter

Type

Description

result

result object

Definition

Returned result, including the template field configuration information.

Range

N/A

status

String

Definition

Request result.

Range

  • success: The template field configuration is queried successfully.

  • failed: Failed to query the template field configuration.

Table 5 result

Parameter

Type

Description

templates

Array of templates objects

Definition

Template list, including the configuration information of multiple templates.

Range

N/A

Table 6 templates

Parameter

Type

Description

template_id

String

Definition

Template ID, which uniquely identifies a template.

Range

N/A

tracker_id

Integer

Definition

Work item type ID, which identifies the work item type to which the template belongs.

Range

  • 2: task

  • 3: bug

  • 5: epic

  • 6: feature

  • 7: story

tracker_name

String

Definition

Work item type name, corresponding to the name of tracker_id.

Range

N/A

description

String

Definition

Template description, which describes the usage or function of the template.

Range

N/A

fields

Array of fields objects

Definition

Field configuration list, including the configuration information of all fields in the template.

Range

N/A

Table 7 fields

Parameter

Type

Description

custom

Boolean

Definition

Whether the field is a custom field.

true or false.

Range

  • true: custom field

  • false: built-in field

field

String

Definition

Field ID, which uniquely identifies a field.

Range

N/A

field_type

String

Definition

Field type, which describes the data type or display mode of a field.

Range

  • select: drop-down list

  • text

  • date

  • number

  • radio: single-choice list

  • checkbox: multi-choice list

  • user: single-choice user

  • multiChoiceUsers: multi-choice user

type_options

String

Definition

Field type options, which describe the optional configurations of the field type.

Range

N/A

default_value

String

Definition

Default value of a field, which is the initial value when a work item is created.

field_type.

Range

N/A

default_option

default_option object

Definition

Default option, which is the default option when the field type is drop-down list.

Range

N/A

is_visible

Boolean

Definition

Whether the field is displayed.

Range

  • true: displayed

  • false: hidden

position

Integer

Definition

Field display sequence. Fields with smaller values appear before fields with larger values.

Range

A positive integer.

is_required

Integer

Definition

Whether the field is mandatory.

0 or 1.

Range

  • 0: optional

  • 1: mandatory

last

Boolean

Definition

Whether the field is the last one in the group.

true or false.

Range

  • true: The field is the last one.

  • false: The field is not the last one.

option

Array of option objects

Definition

List of options for a field. This parameter is valid only when the field type is drop-down list.

Range

N/A

field_name

String

Definition

Field name displayed to users.

Range

N/A

Table 8 default_option

Parameter

Type

Description

id

String

Definition

Option ID.

Range

N/A

name

String

Definition

Option name.

Range

N/A

Table 9 option

Parameter

Type

Description

id

String

Definition

Option ID.

Range

N/A

name

String

Definition

Option name.

Range

N/A

Status code: 400

Table 10 Response body parameters

Parameter

Type

Description

error_code

String

Error code.

error_msg

String

Error message.

Example Requests

Querying all templates and their field configurations in a project

GET https://{endpoint}/v2/projects/a6a33eca679b435b85574bd2fde46ce7/field-templates?tracker_id=7

Example Responses

Status code: 200

{
  "result" : {
    "templates" : [ {
      "id" : 384006,
      "name" : "12345",
      "description" : "",
      "tracker_id" : 7,
      "field_configs" : [ {
        "field" : "module_id",
        "name" : "Module",
        "field_type" : "select",
        "is_required" : 0,
        "is_visible" : true,
        "position" : 3
      }, {
        "field" : "fixed_version_id",
        "name" : "Iteration",
        "field_type" : "select",
        "is_required" : 0,
        "is_visible" : true,
        "position" : 4
      } ]
    } ]
  },
  "status" : "success"
}

Status Codes

Status Code

Description

200

Response to a successful request for querying the template field configuration list in a project.

400

Response to an interface request failure.

Error Codes

See Error Codes.