Help Center/ CodeArts Req/ API Reference/ API/ IPD Attachment Management/ Uploading an Image to the Work Item Description
Updated on 2025-09-10 GMT+08:00

Uploading an Image to the Work Item Description

Function

This API is used to upload an image to the work item description.

Calling Method

For details, see Calling APIs.

URI

POST /v2/ipdprojectservice/projects/{project_id}/images

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:

Regular expression: ^[A-Za-z0-9]{32}$

Options:

N/A

Default value:

N/A

Table 2 Query Parameters

Parameter

Mandatory

Type

Description

issue_id

Yes

String

Description: unique ID of a work item. You can obtain the value from the Querying Work Items or Querying Tree-shaped Work Items API. The value is id in the response body.

Constraints: Regular expression: ^([0-9]{18,19})$

Default value: N/A

Request Parameters

Table 3 FormData parameters

Parameter

Mandatory

Type

Description

file

Yes

File

Image to be uploaded. Currently, JPG, JPEG, PNG, GIF, BMP, TIFF, and SVG images are supported.

Response Parameters

Status code: 200

Table 4 Response body parameters

Parameter

Type

Description

status

String

Request status. If the request is successful, the status is success. If the request fails, an exception is thrown.

message

String

Request information. Generally, this field is left blank.

result

IssueEntity object

Work item details.

Table 5 IssueEntity

Parameter

Type

Description

id

String

Definition:

ID of the work item to be updated. You can obtain the value from the Querying Tree-shaped Work Items API. The value is id in the response body.

Constraints:

Regular expression: ^([0-9]{18,19})$

Options:

N/A

Default value:

N/A

title

String

Definition:

Work item title. You can obtain the value from the Querying Tree-shaped Work Items API. The value is title in the response body.

Constraints:

Minimum length: 1 character. Maximum length: 256 characters.

Options:

N/A

Default value:

N/A

description

String

Definition:

Work item description. You can obtain the value from the Querying Tree-shaped Work Items API. The value is description in the response body.

Constraints:

Minimum length: 1 character. Maximum length: 50,000 characters.

Options:

N/A

Default value:

N/A

type

String

Definition:

Broad category of work item. This field is not available when you create or edit a work item. It is used only for display. You can obtain the value of this field from the type field in the response body of the Querying Tree-shaped Work Items API.

Constraints:

Minimum length: 0 characters. Maximum length: 128 characters.

Options:

requirement (R&D requirement), bug, task, feature, and raw_requirement.

Default value:

N/A

number

String

Definition:

Work item ID. You can obtain the value from the Querying Tree-shaped Work Items API. The value is number in the response body.

Constraints:

Minimum length: 0 characters. Maximum length: 128 characters.

Options:

N/A

Default value:

N/A

category

String

Definition:

Subcategory of work item. You can obtain the value from the Querying Tree-shaped Work Items API. The value is category in the response body.

Constraints:

N/A

Options:

For system device projects, options include RR, SF, IR, SR, AR, Task, and Bug.

For standalone software projects, options include RR, SF, IR, US, Task, and Bug.

For cloud service projects, options include RR, Epic, FE, US, Task, and Bug.

Default value:

N/A

parent_id

String

Definition:

Parent work item ID. You can obtain the value from the Querying Tree-shaped Work Items API. The value is parent_id in the response body.

Constraints:

Regular expression: ^([0-9]{18,19})$

Options:

N/A

Default value:

N/A

project_id

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:

Regular expression: [A-Za-z0-9]{32}

Options:

N/A

Default value:

N/A

status

String

Definition:

Work item status code. You can obtain the value from the Querying Tree-shaped Work Items API. The value is status in the response body.

Constraints:

Minimum length: 2 characters. Maximum length: 32 characters.

Options:

N/A

Default value:

N/A

state

String

Definition:

Work item lifecycle. The options are In use and Discarded. You can obtain the value from the Querying Tree-shaped Work Items API. The value is state in the response body.

Constraints:

Minimum length: 2 characters. Maximum length: 8 characters.

Options:

In use and Discarded

Default value:

N/A

assignee

UserEntity object

Definition:

Work item owner.

assigned_cc

Array of UserEntity objects

Definition:

CC recipient of a work item. Multiple CC recipients are supported. A work item can be copied to a maximum of 50 recipients.

created_by

UserEntity object

Definition:

Work item creator.

created_time

String

Definition:

Work item creation time, which is a Unix timestamp (unit: millisecond).

Constraints:

N/A

Options:

N/A

Default value:

N/A

modified_by

UserEntity object

Definition:

Late updater of a work item.

modified_time

String

Definition:

Last update time of the work item, which is a Unix timestamp (unit: millisecond).

Constraints:

N/A

Options:

N/A

Default value:

N/A

plan_end_date

String

Definition:

Planned end date of a work item, which is a Unix timestamp (unit: millisecond).

Constraints:

N/A

Options:

N/A

Default value:

N/A

close_time

String

Definition:

Work item closure time, which is a Unix timestamp (unit: millisecond).

Constraints:

N/A

Options:

N/A

Default value:

N/A

workload

String

Definition:

Planned workloads of a work item. One decimal place is reserved. The value ranges from 0 to 999,999,999.9.

Constraints:

N/A

Options:

0–999,999,999.9

Default value:

N/A

workload_sum

String

Definition:

Planned workloads of a work item. The value is a number with one decimal place. The value range is 0–999,999,999.9. The value cannot be edited.

Constraints:

Minimum length: 0 characters. Maximum length: 11 characters.

Options:

0–999,999,999.9

Default value:

N/A

tenant_id

String

Definition:

ID of the tenant to which the work item belongs. You can obtain the value from the Querying Tree-shaped Work Items API. The value is tenant_id in the response body.

Constraints:

32 characters.

Value range:

N/A

Default value:

N/A

link

String

Definition:

IDs of associated items of a work item. Separate multiple associated items by commas (,). A work item can have a maximum of 50 associated items. You can obtain the value from the Querying Tree-shaped Work Items API. The value is link in the response body.

Constraints:

Minimum length: 0 characters. Maximum length: 2,048 characters.

Options:

N/A

Default value:

N/A

suspended

Boolean

Definition:

Whether a work item is suspended.

Constraints:

N/A

Options:

true and false

Default value:

N/A

status_modified_time

String

Definition:

Time when the work item status changes, which can be used to calculate the number of days that the work item stays in the current status. The value is a Unix timestamp, in milliseconds.

Constraints:

N/A

Options:

N/A

Default value:

N/A

labels

Array of LabelEntity objects

Definition:

Work item tag.

custom_fields

Array of FieldCodeValuePair objects

Definition:

Custom field mapping of a work item. System fields added by users are also in this column.

{

"code":"field code",

"value":"field value"

}.

children

Array of IssueEntity objects

Definition:

Child work item set of a work item.

path

String

Definition:

Path of a sub-work item.

Constraints:

N/A

Options:

N/A

Default value:

N/A

ir2feature

String

Definition:

Associated field between IR and FE. This field is available when the work item type is IR.

Constraints:

N/A

Options:

N/A

Default value:

N/A

need_break

String

Definition:

Whether a work item needs to be broke down. This field is available only for work item types that can be broke down.

Constraints:

N/A

Options:

N/A

Default value:

N/A

break_status

String

Definition:

Breakdown status. The options are:

decomposed: broken down

undecomposed: not broken down

--: N/A

Constraints:

N/A

Options:

decomposed, undecomposed, and --.

Default value:

N/A

baseline

String

Definition:

Work item baseline status. The options are:

null: unbaselined

baselined: baselined

baseline-reviewing: being reviewed

Constraints:

N/A

Options:

null, baselined, and baseline-reviewing

Default value:

N/A

priority

String

Definition:

Work item priority. Some work items have this field.

Constraints:

N/A

Options:

N/A

Default value:

N/A

related_network_security

String

Definition:

Whether network security is involved. This field is available only for R&D requirements.

Constraints:

N/A

Options:

N/A

Default value:

N/A

collaboratives

String

Definition:

R&D requirement collaboration task ID. You can obtain the value from the Querying Tree-shaped Work Items API. The value is collaboratives in the response body.

Constraints:

Minimum length: 0 characters. Maximum length: 256 characters.

Options:

N/A

Default value:

N/A

business_domain

String

Definition:

Domain field.

Constraints:

N/A

Options:

N/A

Default value:

N/A

plan_pi

String

Definition:

Work item release plan ID. You can obtain the value from the Querying Tree-shaped Work Items API. The value is plan_pi in the response body.

Constraints:

Regular expression: ^([0-9]{18,19})$

Options:

N/A

Default value:

N/A

plan_iteration

String

Definition:

ID of the sprint plan in which the work item is completed. For bugs, the value is the ID of the fix sprint plan. You can obtain the value from the Querying Tree-shaped Work Items API. The value is plan_iteration in the response body.

Constraints:

Regular expression: ^([0-9]{18,19})$

Options:

N/A

Default value:

N/A

change_status

String

Definition:

Work item change status. The options are:

change-reviewing: being reviewed

changed: changed

unchange or null: unchanged

Constraints:

Minimum length: 0 characters. Maximum length: 32 characters.

Options:

change-reviewing, changed, unchange, and null

Default value:

N/A

no_break_reason

String

Definition:

Reason for breakdown nonnecessity. This field is available when need_break is set to no.

Constraints:

Minimum length: 0 characters. Maximum length: 512 characters.

Options:

N/A

Default value:

N/A

submitted_by

Array of UserEntity objects

Definition:

Work item proposer.

ir2rr

String

Definition:

ID of the RR associated with the IR. Use commas (,) to separate multiple IDs.

Constraints:

N/A

Options:

N/A

Default value:

N/A

feature_set

String

Definition:

Feature set ID. You can obtain the value from the Querying Tree-shaped Work Items API. The value is feature_set in the response body.

Constraints:

Regular expression: ^([0-9]{18,19})$

Options:

N/A

Default value:

N/A

expected_repair_date

String

Definition:

Expected fixing time. This field is available only for bugs. The value is a Unix timestamp, in milliseconds.

Constraints:

N/A

Options:

N/A

Default value:

N/A

found_pi

String

Definition:

ID of the release plan where the bug is found. This field is available only for bugs. You can obtain the value from the Querying Tree-shaped Work Items API. The value is found_pi in the response body.

Constraints:

Regular expression: ^([0-9]{18,19})$

Options:

N/A

Default value:

N/A

found_iteration

String

Definition:

ID of the sprint plan where the bug is found. This field is available only for bugs. You can obtain the value from the Querying Tree-shaped Work Items API. The value is found_iteration in the response body.

Constraints:

Regular expression: ^([0-9]{18,19})$

Options:

N/A

Default value:

N/A

reason_analysis

String

Definition:

Cause analysis. This field is available only for bugs.

Constraints:

N/A

Options:

N/A

Default value:

N/A

repair_solution

String

Definition:

Rectification solution. This field is available only for bugs.

Constraints:

Minimum length: 0 characters. Maximum length: 50,000 characters.

Options:

N/A

Default value:

N/A

test_report

String

Definition:

Test report. This field is available only for bugs.

Constraints:

N/A

Options:

N/A

Default value:

N/A

sys_no_repair_reason

String

Definition:

Reason why rectification is not required. This field is available only for bugs.

Constraints:

N/A

Options:

N/A

Default value:

N/A

sys_activation_reason

String

Definition:

Activation reason. This field is available only for bugs.

Constraints:

N/A

Options:

N/A

Default value:

N/A

sys_return_reason

String

Definition:

Reason for return. This field is available only for bugs.

Constraints:

N/A

Options:

N/A

Default value:

N/A

test_failures_times

Integer

Definition:

Number of times that regression failed. This field is available only for bugs.

Constraints:

N/A

Options:

N/A

Default value:

N/A

close_type

String

Definition:

Closure type. This field is available only for bugs. The options are problem_solved, problem_to_requirement, duplicate_problem, and not_a_problem, which mean that the bug was fixed and closed, the bug was converted into a requirement and closed, the bug was closed as a duplicate, the bug was closed because it was not a valid issue, respectively.

Constraints:

N/A

Options:

problem_solved, problem_to_requirement, duplicate_problem, and not_a_problem

Default value:

N/A

plan_owner

UserEntity object

Definition:

Work item planning owner.

doing_owner

UserEntity object

Definition:

Work item implementation owner.

delivered_owner

UserEntity object

Definition:

Work item delivery owner.

checking_owner

UserEntity object

Definition:

Work item acceptance owner.

test_owner

UserEntity object

Definition:

Work item testing owner.

develop_owner

UserEntity object

Definition:

Work item development owner.

processing_owner

UserEntity object

Definition:

Work item processing owner.

fixed_owner

UserEntity object

Definition:

Work item fixing owner.

researchanddevelop_owner

UserEntity object

Definition:

Work item R&D owner.

analyse_owner

UserEntity object

Definition:

Work item analysis owner.

Table 6 LabelEntity

Parameter

Type

Description

id

String

Definition:

Tag ID, which is the value of id in the response body returned by calling the Querying the Tag List API.

Constraints:

Regular expression: ^([0-9]{18,19})$

Options:

N/A

Default value:

N/A

label_type

String

Definition:

Type of the work item to which the label belongs, corresponding to the type field of the work item.

Constraints:

Minimum length: 0 characters. Maximum length: 32 characters.

Options:

N/A

Default value:

N/A

color

String

Definition:

Tag RGB color.

Constraints:

Minimum length: 0 characters. Maximum length: 16 characters.

Options:

N/A

Default value:

N/A

title

String

Definition:

Tag title.

Constraints:

Minimum length: 2 characters. Maximum length: 256 characters.

Options:

N/A

Default value:

N/A

Table 7 FieldCodeValuePair

Parameter

Type

Description

code

String

Definition:

Work item field code.

Constraints:

Minimum length: 0 characters. Maximum length: 32 characters.

Options:

N/A

Default value:

N/A

value

String

Definition:

Custom field value of a work item. Use commas (,) to separate multiple values.

Constraints:

Minimum length: 0 characters. Maximum length: 10,000 characters.

Options:

N/A

Default value:

N/A

Table 8 UserEntity

Parameter

Type

Description

id

String

Definition:

User ID. You can obtain the value using the Obtaining the Current User Information API. The value of id in the response message body is the user ID.

Constraints:

N/A

Options:

N/A

Default value:

N/A

name

String

Definition:

Username.

Constraints:

Minimum length: 2 characters. Maximum length: 64 characters.

Options:

N/A

Default value:

N/A

nick_name

String

Definition:

User alias.

Constraints:

Minimum length: 2 characters. Maximum length: 30 characters.

Options:

N/A

Default value:

N/A

Example Requests

/v2/ipdprojectservice/projects/e2569a971657464f810949e839ec5640/images?issue_id=1071125987320569856

file=xxxx.png

Example Responses

Status code: 200

Uploaded successfully

{
  "status" : "success",
  "message" : null,
  "result" : {
    "id" : "1061975230944026625",
    "title" : "Task-01",
    "description" : "<p>[Background] </p><p><br></p><p>[Value]</p><p><br></p><p>[Details]</p>",
    "number" : "TASK20241109690657",
    "category" : "Task",
    "status" : "Start",
    "assignee" : {
      "id" : "a360371833bf4c558f796fd707b44daf"
    },
    "created_by" : {
      "id" : "a360371833bf4c558f796fd707b44daf"
    },
    "created_time" : "2024-11-09T11:50:25Z",
    "modified_by" : {
      "id" : "a360371833bf4c558f796fd707b44daf"
    },
    "modified_time" : "2024-11-09T11:50:25Z",
    "custom_fields" : [ ]
  }
}

Status Codes

Status Code

Description

200

Uploaded successfully

Error Codes

See Error Codes.