GetWorkitemAttachmentCreatemeta
Obtains the upload information for work item attachments. This is the first step in uploading an attachment to a work item. The entire process consists of three steps: First, call this operation to obtain the upload information for the work item. Second, upload the file to Object Storage Service (OSS) based on the response of this operation. Third, attach the file to the work item by calling the WorkitemAttachmentCreate operation. When you upload the file in the second step, refer to the OSS documentation at https://help.aliyun.com/document_detail/31926.html. Note that the request must use the POST method and submit data as a form.
Operation description
Example of calling the second step:

Try it now
Test
RAM authorization
Request syntax
GET /organization/{organizationId}/workitem/{workitemIdentifier}/attachment/createmeta HTTP/1.1
Path Parameters
|
Parameter |
Type |
Required |
Description |
Example |
| organizationId |
string |
Yes |
The enterprise ID in string format. You can obtain the ID from the Yunxiao URL, such as https://devops.aliyun.com/organization/[OrganizationId]. |
60de7a6852743a5162b5f957 |
| workitemIdentifier |
string |
Yes |
The unique identifier of the work item. This parameter is equivalent to workItemId. |
11234455454355 |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| fileName |
string |
Yes |
The full name of the file to be uploaded. |
application.jar |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
Schema of Response |
||
| requestId |
string |
The request ID. Each request has a unique ID for troubleshooting. |
ASSDS-ASSASX-XSAXSA-XSAXSAXS |
| errorCode |
string |
The business error code.
|
Invalid.IdNotFound |
| errorMessage |
string |
The business error message.
|
Forbidden.UserNotInCurrentOrganization |
| success |
string |
Indicates whether the request was successful. Valid values:
|
true |
| uploadInfo |
object |
The upload information. For more information, refer to the OSS documentation at https://help.aliyun.com/document_detail/31926.html. |
|
| accessid |
string |
The authentication information for the upload. Set this value to OSSAccessKeyId when you upload the file. |
xxxxxxx |
| policy |
string |
The authentication information for the upload. |
xxxxxxx |
| signature |
string |
The authentication information for the upload. |
xdWcrl/yTmIUA0kE7a3B0Ox4Vu8= |
| dir |
string |
The authentication information for the upload. This value corresponds to the key parameter when you upload the file. |
ddd/dddd |
| host |
string |
The URL used to upload the file. |
xxxxx |
Examples
Success response
JSON format
{
"requestId": "ASSDS-ASSASX-XSAXSA-XSAXSAXS",
"errorCode": "Invalid.IdNotFound",
"errorMessage": "Forbidden.UserNotInCurrentOrganization",
"success": "true",
"uploadInfo": {
"accessid": "xxxxxxx",
"policy": "xxxxxxx",
"signature": "xdWcrl/yTmIUA0kE7a3B0Ox4Vu8=",
"dir": "ddd/dddd",
"host": "xxxxx"
}
}
Error codes
|
HTTP status code |
Error code |
Error message |
Description |
|---|---|---|---|
| 400 | Openapi.RequestError | request error | |
| 403 | Operate.NoPermission | NoPermission | You are not authorized to perform this operation. |
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.