# Function Description

To get the accessKeyId secretAccessKey securityToken and so on of uploading to cloud-service.

# Request

# request example

GET upload/sts/info HTTPS
Host: <host>
Content-Type: application/json
Authorization: <AuthString>

# Request Headers

Name Description Type Mandatory
Authorization User token information string true

# Request Parameters

none

# Request Body

{
  "type": 3,
  "extension": "json",
  "isNeedCallback": 1,
  "uploadModule": "bs_project",
  "projectId": 8357,
  "isDir": 1,
  "uuid": "",
  "platform": "web"
}

Fields Specification

Field explain type Mandatory
type Cloud-service types
- 0: Qiniu-Cloud
- 1: Tencent-Cloud
- 2:AWS
- 3:Aliyun-Cloud
- 4:Baidu-Cloud
- 6:Huawei-Cloud
- 7:KSyun-Cloud
we can support Aliyun-Cloud,QINIU-Cloud,Huawei-Cloud, AWS,KSyun-Cloud until now.
int true
extension the file's extension name of uploading String true
isNeedCallback Video Multipart need to callback or not
0-false,1-true
relevant resource of current project not need to callback
int true
uploadModule module of uploading
bs project -bs_project
app project-app_project
videos- resource_video
images-  resource_image
audios-resource_audio
template -material_template
temporary- directorytemp
String true
platform device of uploading
web device: web
app device:app
default configuration is app
String false
projectId the module of uploading is a BS project,and project id is required. Long false
isDir sequence or not
0-false
1-true
int false
uuid uuid of template String this parameter is required when upload template

# Response

# Response Header

No special response header

# Response Body

Successful Response Body:

{
  "code": 0,
  "message": "",
  "data": {
    "accessKeyId": ".....",
    "secretAccessKey": ".....",
    "securityToken": "....",
    "bucket": "bseditor",
    "endpoint": "http://oss-cn-beijing.aliyuncs.com",
    "relativePath": "test/resource/video/2020/12/25/10503/0df00d20-5e55-4914-95f0-e02ff0abbfb8.mp4",
    "expiration": "2020-12-26T01:05:02Z",
    "region": "oss-cn-beijing",
    "objectId": 10503,
    "callbackInfo": {
      "callbackBodyType": "application/x-www-form-urlencoded",
      "callbackUrl": "http://localhost:8088/upload/callback",
      "customInfo": {
        "objectId": 10503,
        "resourceType": 1
      },
      "callbackBody": "objectId=${x:objectId}&resourceType=${x:resourceType}"
    },
    "signature": "......",
    "policy": "......"
  }
}
Field Explain Type Mandatory
accessKeyId accessKey of Cloud-Storage string true
secretAccessKey secretAccessKey of Cloud-Storage string true
securityToken securityToken of Cloud-Storage string true
bucket bucket name of Cloud-Storage string true
endpoint geographical node host of Cloud-Storage string true
relativePath key of uploading to Cloud storage string true
expiration expired-time of key string true
region geographical-name of storage string true
objectId resource id of returning,interface of resource/create should attach this parameter. long true
callbackInfo attached information of callbacking Object false
callbackBodyType content-type of callbacking String false
callbackUrl url of callbacking. String false
customInfo custom parameter of callbacking Object false
callbackBody request body of callbacking String false
signature the signature of Cloud-Service uploading voucher. string false
policy thr policy of Cloud-Service uploading voucher. string false

Failed Response Body:

{
  "code": <errorCode>,
  "enMsg": <errorMessage>,
  "msg": <errorMessage>,
  "data": null
}

Example: example for Qiniu-Cloud:

image.png