All Products
Search
Document Center

Ticket System API:GetAttachmentUploadUrl

Last Updated:Jul 22, 2024

Queries the Object Storage Service (OSS) URL that is used to upload attachments.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer.

Authorization information

There is currently no authorization information disclosed in the API.

Request parameters

ParameterTypeRequiredDescriptionExample
FileNamestringYes

Name of the uploaded file

81A0D93D-54D7-4529-ABFA-633ED63223BA.jpg

Response parameters

ParameterTypeDescriptionExample
object
Codeinteger

The response code.

0
Messagestring

The error message. If success is set to false, the message is returned.

success
RequestIdstring

The request ID.

ED195C2C-787F-511C-8204-714456781861
Successboolean

Indicates whether the call is successful. A value of true indicates that the call is normal.

true
Dataobject

The data returned after the call succeeds.

ObjectKeystring

Uploaded file identifier

cdb5d174-c282-4b2d-9048-e74ea2223127.jpg
PutSignedUrlstring

The signed URL used to upload the object to OSS.

https://gts-workorder-pre.oss-cn-beijing.aliyuncs.com /20220314/cabb80c3-430b-4079-a9f2-d2a0d1c2a587.png?Expires=1647328689&OSSAccessKeyId=LTAI4FrZPa9N1nGWs6Ny****&Signature=AbSEh26G3oYrJ8ivr4B0xzF89zk%3D
GetSignedUrlstring

Query the signed URL of an OSS object

https://gts-workorder-pre.oss-cn-beijing.aliyuncs.com /20220314/cabb80c3-430b-4079-a9f2-d2a0d1c2a587.png?Expires=1647328689&OSSAccessKeyId=LTAI4FrZPa9N1nGWs6Ny****&Signature=AbSEh26G3oYrJ8ivr4B0xzF89zk%3D

Examples

Sample success responses

JSONformat

{
  "Code": 0,
  "Message": "success",
  "RequestId": "ED195C2C-787F-511C-8204-714456781861",
  "Success": true,
  "Data": {
    "ObjectKey": "cdb5d174-c282-4b2d-9048-e74ea2223127.jpg",
    "PutSignedUrl": "https://gts-workorder-pre.oss-cn-beijing.aliyuncs.com\n/20220314/cabb80c3-430b-4079-a9f2-d2a0d1c2a587.png?Expires=1647328689&OSSAccessKeyId=LTAI4FrZPa9N1nGWs6Ny****&Signature=AbSEh26G3oYrJ8ivr4B0xzF89zk%3D",
    "GetSignedUrl": "https://gts-workorder-pre.oss-cn-beijing.aliyuncs.com\n/20220314/cabb80c3-430b-4079-a9f2-d2a0d1c2a587.png?Expires=1647328689&OSSAccessKeyId=LTAI4FrZPa9N1nGWs6Ny****&Signature=AbSEh26G3oYrJ8ivr4B0xzF89zk%3D"
  }
}

Error codes

HTTP status codeError codeError messageDescription
400param.illegalParams illegal.-
401illegal.authYou are not authorized to perform the operation.You are not authorized to perform this operation.
500System.errorAn error occurred while processing your request.An error occurred while processing your request. Please try again.

For a list of error codes, visit the Service error codes.

Change history

Change timeSummary of changesOperation
No change history