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
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
project_id |
Yes |
String |
Specifies the 32-bit ID of the devcloud project. |
Request 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. |
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
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
Parameter |
Type |
Description |
---|---|---|
error_msg |
String |
Description |
error_code |
String |
Error Codes |
Status code: 401
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.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot