Forum Discussion

farrcycle's avatar
farrcycle
Expert
8 years ago

API call to download all attachments to posts in a specific forum

Hi

 

We are using one particular forum to post messages that each have an attached file

 

We would like to be able to give users an API call that will automatically download all the files currently in that forum to a specified location. 

 

Have looked at the documentation here but my technical knowledge is limited and wondered if anyone here had tried something similar.

 

Many thanks

 

Steve

  • Hi farrcycle,

    Using Community API v2, you could use a LiQL query like this to get attachments from messages appearing in a specific board:

     

    SELECT attachments FROM messages WHERE attachments.count(*) > 0 AND board.id = 'myForum'

     

     

     

  • SuzieH's avatar
    SuzieH
    Khoros Alumni (Retired)

    Hi farrcycle,

    Using Community API v2, you could use a LiQL query like this to get attachments from messages appearing in a specific board:

     

    SELECT attachments FROM messages WHERE attachments.count(*) > 0 AND board.id = 'myForum'

     

     

     

  • sam2 

    Unfortunately, there is no such V1 call. to get all the attachment for a specific board. There is a way to get it but it is a little bit complex.
    First to get all the messages for that specific board and then fetch the attachments for an individual message. 

    • SuzieH's avatar
      SuzieH
      Khoros Alumni (Retired)

      Hi sam2,

      For what it's worth, you can use V1 and V2 calls together. Is there a specific reason you needed v1?

       

       

      • sam2's avatar
        sam2
        Guide

        SuzieH Thank you for your time. Regarding the API I just wanted to confirm if its possible with V1.