App Reports File Upload Result

2022-06-23
No Rating

Report Media Upload Result

POST /media/api/v1/workspaces/{workspace_id}/upload-callback

Parameters

NameInTypeRequiredDescription
workspace_idpathstringtrueworkspace id
x-auth-tokenheaderstringtrueaccess token
bodybodymedia.UploadCallbackInputtrue

Responses

StatusMeaningDescriptionSchema
200OKopen in new windowOKmedia.UploadCallbackOutput

Example responses

{
    "code":0,
    "message":"success",
   	"data":{
      "object_key":"5asjwu24-2a18-4b4b-86f9-3a678da0bf4d/example.jpg"
    }
}

Schemas

media.UploadCallbackInput

{
  "ext": {
    "drone_model_key": "string",
    "is_original": true,
    "payload_model_key": "string",
    "tinny_fingerprint": "string",
    "sn": "string"
  },
  "fingerprint": "string",
  "metadata": {
    "absolute_altitude": 0,
    "created_time": "string",
    "gimbal_yaw_degree": 0,
    "photoed_position": {
      "lat": 0,
      "lng": 0
    },
    "relative_altitude": 0,
    "shoot_position": {
      "lat": 0,
      "lng": 0
    }
  },
  "name": "string",
  "object_key": "string",
  "path": "string",
  "sub_file_type": 0
}

Properties

NameTypeRequiredRestrictionsDescription
extmedia.MediaFilefalsenoneextended attributes for file associations
fingerprintstringfalsenonefile fingerprint
metadatamedia.MetaDatafalsenonemedia metadata
namestringtruenonefilename
object_keystringtruenonethe key of the file in the object storage bucket
pathstringfalsenonethe business path of the file
sub_file_typeintegerfalsenonevalid when the file is a picture
* 0 - normal picture
* 1 - panorama

media.MediaFile

{
  "drone_model_key": "string",
  "is_original": true,
  "payload_model_key": "string",
  "tinny_fingerprint": "string",
  "sn": "string"
}

Properties

NameTypeRequiredRestrictionsDescription
drone_model_keystringfalsenonedevice product enum
is_originalbooleanfalsenonewhether is the original image
payload_model_keystringfalsenonepayload product enum
tinny_fingerprintstringfalsenonetiny fingerprint
snstringfalsenoneserial number

media.MetaData

{
  "absolute_altitude": 0,
  "created_time": "string",
  "gimbal_yaw_degree": 0,
  "photoed_position": {
    "lat": 0,
    "lng": 0
  },
  "relative_altitude": 0,
  "shoot_position": {
    "lat": 0,
    "lng": 0
  }
}

Properties

NameTypeRequiredRestrictionsDescription
absolute_altitudenumberfalsenoneabsolute height
created_timestringfalsenonemedia created time
gimbal_yaw_degreenumberfalsenonegimbal yaw degree
photoed_positionobjectfalsenonephotoed position
» latintegerfalsenonethe latitude of the photographed object
» lngintegerfalsenonethe longitude of the photographed object
relative_altitudeintegerfalsenonerelative height
shoot_positionobjectfalsenoneshoot position
» latintegerfalsenonelatitude of shooting location
» lngintegerfalsenonelongitude of shooting location

media.UploadCallbackOutput

{
  "code": 0,
  "data": {
    "object_key": "string"
  },
  "message": "string"
}

Properties

NameTypeRequiredRestrictionsDescription
codeintegerfalsenoneerror code
datamedia.UploadCallbackOutputDatafalsenonenone
messagestringfalsenonedescription

media.UploadCallbackOutputData

{
  "object_key": "string"
}

Properties

NameTypeRequiredRestrictionsDescription
object_keystringfalsenonethe key of the file in the object storage bucket