Uploading and downloading attachments

Authorization and access

Autho­riza­tion process is described here. Each API request must also con­sist of unique Api-key obtained dur­ing appli­ca­tion reg­is­tra­tion togeth­er with client_id and client_secret.

Headers

  • Accept: mul­ti­part/­form-data
  • Con­tent-type: mul­ti­part/­form-data
  • Autho­riza­tion: Bear­er {access_token}
  • Api-key: {unique_ap­p_api-key}

Available file types

  • JPG, GIF, PNG, BMP, PDF, ODT, DOC, TXT, DOCX, TIFF, ODS, XLS, XLSX, PPT, RTF

Uploading file url parameters

  • URL: https://api.platform.trans.eu
  • End­point: /ex­t/­me­dia-stor­age-api/v1/as­sets
  • Http Method: PUT

File should be send in request body (request body should be send as form data).

Json response example

{
  "id": "eb6bd829-0794-4553-8d8f-7f000ea76d15",
  "path": "https://service.media-storage.query/v1/assets/eb6bd829-0794-4553-8d8f-7f000ea76d15",
  "ttl": {},
  "file": {},
  "image": {}
}

Downloading file from an order url parameters

  • URL: https://api.platform.trans.eu
  • End­point: /ext/media-storage-api/v1/assets/{mediaId}
  • Http Method: GET

You will get file in response.