Forum Discussion

dhiraj_gophane's avatar
11 years ago

Do we have any API to directly download attachment from a particular message?

Hi,

 

Currently we have an API call to get details regarding an attachment of a particular message.

 

Endpoint: [community base URL]/restapi/vc/messages /id /[id] /uploads/attachments

Method: GET

Content-type: application/x-www-form-urlencoded

 

Do we have a direct way using rest api call to download attachment of a particular message.

 

Thanks,

Dhiraj

  • Hi Dhiraj,

     

    Each <attachment> returned by the API call you mentioned has a <url> field, which you should be able to use to download the attachment, no?  You can also do this RESTfully like so:

     

    [community base URL]/restapi/vc/messages /id /[msgId] 

    /uploads/attachments/id/[attachmentId]/url

     

    (wrapped for forums display)

     

    Cheers,

    Tyson

    • Hi Tyson,

      I am doing this in a java app. So I think I should figure out the way hoe can I use java to download this attachment by using url.

      This might be a java questions rather than Lithium. :)

      Thanks for confirming on my understanding.

      Regards,
      Dhiraj