Queries the Object Storage Service (OSS) URL that is used to upload attachments.
Operation description
附件上传
请参考 OSS 官方文档,使用预签名 URL 上传文件。
您可在拿到临时上传链接后通过如下方式上传:
Try it now
Test
RAM authorization
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| FileName |
string |
Yes |
Name of the uploaded file |
81A0D93D-54D7-4529-ABFA-633ED63223BA.jpg |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
|||
| Code |
integer |
The response code. |
0 |
| Message |
string |
The error message. If success is set to false, the message is returned. |
success |
| RequestId |
string |
The request ID. |
ED195C2C-787F-511C-8204-714456781861 |
| Success |
boolean |
Indicates whether the call is successful. A value of true indicates that the call is normal. |
true |
| Data |
object |
The data returned after the call succeeds. |
|
| ObjectKey |
string |
Uploaded file identifier |
cdb5d174-c282-4b2d-9048-e74ea2223127.jpg |
| PutSignedUrl |
string |
The signed URL used to upload the object to OSS. |
https://workorder.oss-cn-beijing.aliyuncs.com /20220314/cabb80c3-430b-4079-a9f2-d2a0d1c2a587.png?Expires=1647328689&OSSAccessKeyId=LTAI***************&Signature=AbSEh26G3oYrJ8ivr4B0xzF89zk%3D |
| GetSignedUrl |
string |
Query the signed URL of an OSS object |
https://workorder.oss-cn-beijing.aliyuncs.com /20220314/cabb80c3-430b-4079-a9f2-d2a0d1c2a587.png?Expires=1647328689&OSSAccessKeyId=LTAI**************&Signature=AbSEh26G3oYrJ8ivr4B0xzF89zk%3D |
Examples
Success response
JSON format
{
"Code": 0,
"Message": "success",
"RequestId": "ED195C2C-787F-511C-8204-714456781861",
"Success": true,
"Data": {
"ObjectKey": "cdb5d174-c282-4b2d-9048-e74ea2223127.jpg",
"PutSignedUrl": "https://workorder.oss-cn-beijing.aliyuncs.com\n/20220314/cabb80c3-430b-4079-a9f2-d2a0d1c2a587.png?Expires=1647328689&OSSAccessKeyId=LTAI***************&Signature=AbSEh26G3oYrJ8ivr4B0xzF89zk%3D",
"GetSignedUrl": "https://workorder.oss-cn-beijing.aliyuncs.com\n/20220314/cabb80c3-430b-4079-a9f2-d2a0d1c2a587.png?Expires=1647328689&OSSAccessKeyId=LTAI**************&Signature=AbSEh26G3oYrJ8ivr4B0xzF89zk%3D"
}
}
Error codes
|
HTTP status code |
Error code |
Error message |
Description |
|---|---|---|---|
| 400 | param.illegal | Params illegal. | |
| 401 | illegal.auth | You are not authorized to perform the operation. | You are not authorized to perform this operation. |
| 500 | System.error | An error occurred while processing your request. | An error occurred while processing your request. Please try again. |
| 403 | No permissions | No permissions to access. | RAM authentication does not have permission |
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.