Forum Discussion

TeenaFrancis's avatar
8 years ago

REST API extract image from article body

Hi,

Is there a way to extract images from an article body using REST API. My aim is to give a summary of recent article in my community dashboard page by putting the images of recent articles along with article title. The rest api(http://xxxxxxxxxxxxxxxxx.lithium.com/restapi/vc/blogs/id/Blog1/threads/recent?page_size=1&restapi.format_detail=full_list_element) gives me the entire body with images as an html. How can I take the images from that to give it in my page?

 

Thanks,

Teena

    • rahulsrao24's avatar
      rahulsrao24
      Guide

      how can we extract an image from the article body using LIQL query ?

      • Payal's avatar
        Payal
        Director
        Hi rahulsrao24,

        You can extract images from the article by using following LIQL query:

        SELECT * FROM images WHERE messages.id = '[ID]'

        LMK if this works for you.

        Thanks!!
    • TeenaFrancis's avatar
      TeenaFrancis
      Ace

      Hi Varun,

       

      Thanks for the reply. My call returns like the below screen shot. How should I give images to the article so as to come in the API response?

       

      Thanks,

      Teena