Creating a Work Item (During Attachment Upload)
Function
This API is used to create a work item.
Calling Method
For details, see Calling APIs.
Authorization Information
No identity policy-based permission required for calling this API.
URI
POST /v3/file/issue-create
Request 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 |
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| issue_call_back_param | No | issue_call_back_param object | Definition: Request parameter of a work item. Constraints: N/A Value range: N/A Default value: N/A |
| type | No | String | Definition: Work item type. Constraints: N/A Value range: Scrum Default value: N/A |
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| status_id | No | Integer | Definition Status ID. Constraints N/A Range 1: new 2: developing 3: resolved 4: testing 5: closed 6: rejected Default Value N/A |
| subject | No | String | Definition: Title of a work item. Constraints: N/A Value range: N/A Default value: N/A |
| description | No | String | Definition: Work item description. Constraints: N/A Value range: N/A Default value: N/A Value range: N/A |
| start_date | No | String | Definition: Start date of the work item, in timestamp format, for example, 1839340800000. Constraints: N/A Value range: N/A Default value: N/A |
| order | No | Integer | Definition: Sorting of work items. Constraints: N/A Value range: N/A Default value: N/A |
| priority_id | No | Integer | Definition: Priority ID. Constraints: N/A Value range: 1: low 2: medium 3: high Default value: N/A |
| severity_id | No | Integer | Definition: Severity ID. Constraints: N/A Value range: 10: critical 11: major 12: minor 13: trivial Default value: N/A |
| release_dev | No | String | Definition: Release version of a work item. Constraints: N/A Value range: N/A Default value: N/A |
| expected_work_hours | No | String | Definition: Estimated workloads of a work item (unit: person-hour). Constraints: N/A Value range: N/A Default value: N/A |
| story_point_id | No | Integer | Definition: Story point ID of a work item. Constraints: N/A Value range: 1: 0 2: 1/2 3: 1 4: 2 5: 3 6: 5 7: 8 8: 13 9: 21 10: 40 11: 80 12: 100 Default value: N/A |
| due_date | No | String | Definition: End time of a work item, in timestamp format, for example, 1839340800000. Constraints: N/A Value range: N/A Default value: N/A |
| assigned_cc | No | String | Definition: Cc recipient. Constraints: N/A Value range: N/A Default value: N/A |
| assigned_to_id | No | Integer | Definition: Digital ID of the module owner, which is obtained by calling the Obtaining the Member List of a Specified Project API. The value of user_num_id in the response message body is the ID of the module owner. Constraints: N/A Value range: N/A Default value: N/A |
| project_uuid | No | 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 |
| project_id | No | 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 |
| tracker_id | No | Integer | Definition: Work item type. Constraints: N/A Value range: 2 (task) 3 (bug) 5 (epic) 6 (feature) 7 (story) Default value: N/A |
Response Parameters
Status code: 200
| Parameter | Type | Description |
|---|---|---|
| result | result object | Definition: Returned result. Value range: N/A |
| status | String | Definition: Returned status. Value range: success: The API is successfully called. error: The API call failed. |
| Parameter | Type | Description |
|---|---|---|
| updated_on | String | Definition: Date when a work item is updated. The value is in timestamp format, for example, 1839340800000. Value range: N/A |
| story_point | StoryPoint object | Definition: Story point of a work item. Value range: N/A |
| subject | String | Definition: Owner of a work item. Value range: N/A |
| project | Project object | Definition: Project. Value range: N/A |
| is_parent | Boolean | Definition: Whether there are child work items. Value range: true (with child work items) false (no child work items) |
| done_ratio | Integer | Definition: Work item completion rate. Value range: N/A |
| findReleaseDev | String | Definition: Releaser. Value range: N/A |
| tracker | Tracker object | Definition: Work item type. Value range: N/A |
| id | Integer | Definition: Work item list ID. Value range: N/A |
| start_date | String | Definition: Start date of a work item. The value is in timestamp format, for example, 1839340800000. Value range: N/A |
| assigned_to | IssueAssignedVO object | Definition: Work item owner. Value range: N/A |
| status_attribute | Object | Definition: Work item status. Value range: N/A |
| severity | Severity object | Definition: Severity. Value range: N/A |
| releaseDev | String | Definition: Release version of a work item. Value range: N/A |
| author | IssueAuthorVO object | Definition: Work item owner. Value range: N/A |
| module | Object | Definition: Module of a work item. Value range: N/A |
| due_date | String | Definition: End date of a work item, in timestamp format, for example, 1839340800000. Value range: N/A |
| expected_work_hours | Integer | Definition: Estimated workloads of a work item (unit: person-hour). Value range: N/A |
| priority | Priority object | Definition: Priority. Value range: N/A |
| actual_work_hours | Integer | Definition: Actual workloads of a work item (unit: person-hour). Value range: N/A |
| is_watcher | Boolean | Definition: Favorited or not. Value range: true: favorited. false: not favorited. |
| deleted | Boolean | Definition: Whether to delete. Value range: true: delete false: not delete |
| fixed_version | Object | Definition: Version where the issue is resolved. Value range: N/A |
| is_archived | Boolean | Definition: Archived or not. Value range: true: yes false: no. |
| created_on | String | Definition: Work item creation time, in timestamp format, for example, 1839340800000. Value range: N/A |
| domain | Object | Definition: Domain of a work item. Value range: N/A |
| developer | Object | Definition: Developer of a work item. Value range: N/A |
| closeder | Object | Definition: Closing personnel. Value range: N/A |
| position | String | Definition: Position of a work item in the list. Value range: N/A |
| closed_flag | Integer | Definition: Closing flag. Value range: 0 (enabled) 1 (disabled) |
| assigned_cc_user | String | Definition: Cc recipient of a work item. Value range: N/A |
| custom_value_new | Object | Definition: Custom field. Value range: N/A |
| status | Status object | Definition: Work item status. Value range: N/A |
| Parameter | Type | Description |
|---|---|---|
| id | Integer | Definition: Story point ID. Value range: N/A |
| name | String | Definition: Story point name. Value range: N/A |
| Parameter | Type | Description |
|---|---|---|
| identifier | String | Definition: Project UUID. Value range: N/A |
| name | String | Definition: Project name. Value range: N/A |
| id | Integer | Definition: Digital ID of a project. Value range: N/A |
| type | String | Definition: Project type. Value range: Scrum |
| Parameter | Type | Description |
|---|---|---|
| name | String | Definition Type name. Range |
| id | Integer | Definition: Type ID. Value range: 2 (task) 3 (bug) 5 (epic) 6 (feature) 7 (story) |
| Parameter | Type | Description |
|---|---|---|
| first_name | String | Definition: Username. Value range: N/A |
| last_name | String | Definition: Last name of the user. Value range: N/A |
| identifier | String | Definition: 32–character UUID of a user. Value range: N/A |
| image_id | String | Definition: User avatar ID. Value range: N/A |
| assigned_nick_name | String | Definition: User alias. Value range: N/A |
| name | String | Definition: Username. Value range: N/A |
| id | Integer | Definition: Digital ID of a user. Value range: N/A |
| Parameter | Type | Description |
|---|---|---|
| name | String | Definition Work item severity. Range |
| id | Integer | Definition: Severity ID. Value range: 10: critical 11: major 12: minor 13: information |
| Parameter | Type | Description |
|---|---|---|
| first_name | String | Definition: Username. Value range: N/A |
| last_name | String | Definition: Last name of the user. Value range: N/A |
| identifier | String | Definition: Unique ID of the author. Value range: N/A |
| image_id | String | Definition: User avatar ID. Value range: N/A |
| assigned_nick_name | String | Definition: User alias. Value range: N/A |
| name | String | Definition: Username with tenant information, in the format of Tenant name_Username. Value range: N/A |
| id | Integer | Definition: User ID. Value range: N/A |
Example Requests
POST https://{endpoint}/v3/file/issue-create?_=1753359298572
{
"issue_call_back_param" : {
"status_id" : 1,
"subject" : "123",
"description" : "<p style=\"padding-top: 5.0px;\"><span style=\"font-weight: bold;\"> As </span><User role></p><p><br /></p><p style=\"padding-top: 5.0px;\"><span style=\"font-weight: bold;\"> I want </span><to do something></p><p><br /></p><p style=\"padding-top: 5.0px;\"><span style=\"font-weight: bold;\"> so as to </span><do something> </p>",
"start_date" : null,
"order" : 1,
"priority_id" : 2,
"severity_id" : 12,
"release_dev" : "",
"expected_work_hours" : "0",
"story_point_id" : 3,
"due_date" : null,
"assigned_cc" : "",
"assigned_to_id" : 4091,
"project_uuid" : "5192de5eb435430c8cd41c6ae6028848",
"project_id" : "5192de5eb435430c8cd41c6ae6028848",
"tracker_id" : 7
},
"type" : "create"
} Example Responses
Status code: 200
{
"result" : {
"issue" : {
"id" : 9190894,
"subject" : "123",
"author" : {
"identifier" : "a360371833bf4c558f796fd707b44daf",
"name" : "devcloud_devcloud_s00404480_01",
"last_name" : 4091,
"id" : 4091,
"image_id" : 4091,
"first_name" : 4091
},
"done_ratio" : 0,
"expected_work_hours" : 0,
"actual_work_hours" : 0,
"position" : "9190894",
"closed_flag" : 0,
"deleted" : false,
"custom_value_new" : { },
"project" : {
"identifier" : "5192de5eb435430c8cd41c6ae6028848",
"name" : "DevOps Full-Process Sample Project XXXX",
"id" : 35138974,
"type" : "scrum"
},
"tracker" : {
"name" : "Story",
"id" : 7
},
"status" : {
"name" : "New",
"id" : 1
},
"assigned_to" : {
"identifier" : "a360371833bf4c558f796fd707b44daf",
"assigned_nick_name" : "Sam 1",
"name" : "devcloud_devcloud_s00404480_01",
"last_name" : "devcloud_devcloud_s00404480_01",
"id" : 4091,
"image_id" : "photo01.png",
"first_name" : "devcloud_devcloud_s00404480_01"
},
"developer" : { },
"priority" : {
"name" : "Medium",
"id" : 2
},
"severity" : {
"name" : "Minor",
"id" : 12
},
"module" : { },
"fixed_version" : { },
"story_point" : {
"id" : 3,
"name" : "1"
},
"assigned_cc_user" : [ null ]
}
},
"status" : "success"
} Status Codes
| Status Code | Description |
|---|---|
| 200 | Response to a successful request for creating a work item API. |
Error Codes
See Error Codes.
What is your overall rating for this page?
Thank 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