Help Center/ CodeArts Req/ API Reference/ APIs/ Work Items of the Scrum Project/ Creating a Customized Field for a Work Item Type
Updated on 2023-06-12 GMT+08:00

Creating a Customized Field for a Work Item Type

Function

Creating a Customized Field for a Work Item Type

URI

POST /v3/{project_id}/custom-fields

Table 1 Path Parameters

Parameter

Mandatory

Type

Description

project_id

Yes

String

Specifies the 32-bit ID of the devcloud project.

Request Parameters

Table 2 Request header parameters

Parameter

Mandatory

Type

Description

X-Auth-Token

Yes

String

Specifies the user token. It can be obtained by calling an IAM API. The value of X-Subject-Token in the response header is the user token.

Table 3 Request body parameters

Parameter

Mandatory

Type

Description

name

Yes

String

Parameter

type

Yes

String

Customized Field Type Optional Type textArea|select|radio|text|checkbox|date|time_date|number

options

Yes

String

Options

memo

Yes

String

Description

scrum_type

Yes

String

Type

Response Parameters

Status code: 200

Table 4 Response body parameters

Parameter

Type

Description

options

String

Options

region

String

System fields

id

Integer

Field ID.

identifier

String

Field ID.

project_id

Integer

Project ID

tracker_id

Integer

Work item type ID. The options are as follows: 2: task; 3: defect /Bug,5Epic,6Feature,7Story

custom_field

String

System Field Name

type

String

Field Type

name

String

Parameter

sort

Integer

System fields

memo

String

Description

created

String

Created

modified

String

Time when the gateway response was last modified

is_delete

Boolean

Deleted or Not

Status code: 400

Table 5 Response body parameters

Parameter

Type

Description

error_msg

String

Description

error_code

String

Error Codes

Status code: 401

Table 6 Response body parameters

Parameter

Type

Description

error_msg

String

Description

error_code

String

Error Codes

Example Requests

Post https://{endpoint}/v3/0792b7d26cb74bd799cbae80063dc74a/custom-fields

{
  "name" : "test",
  "type" : "text",
  "memo" : "Description",
  "options" : "0792b7d26cb74bd799cbae80063dc74a",
  "scrum_type" : "Story"
}

Example Responses

Status code: 200

OK

{
  "options" : "select1,select2",
  "region" : "southchina",
  "id" : 1,
  "identifier" : "81abca040032407bb62d52536d69ce2d",
  "project_id" : 2282492,
  "tracker_id" : 3,
  "custom_field" : "custom_field34",
  "type" : "select",
  "name" : "test",
  "sort" : 1,
  "memo" : "description",
  "created" : "2020-06-02T10:45:09Z",
  "modified" : 1,
  "is_delete" : false
}

Status Codes

Status Code

Description

200

OK

400

Bad Request

401

Unauthorized

Error Codes

See Error Codes.