Forum Discussion

Nav's avatar
Nav
Ace
8 years ago
Solved

How to get the article type from CURL API along with limit?

Hi

We are using fromDate=20180210&toDate=20180213 parameter in CURL request. I would like to get article alone with limit. Please suggest.

Thanks.

  • Nav - Unfortunately,  bulk API doesn't provide any filter params for this. The only workaround is, filtering from the response. 

7 Replies

  • Nav- If you are accessing articles using REST API V2, below is the query which will be helpful.

     

     

    SELECT * FROM messages WHERE post_time > 2013-10-07T10:04:30-08:00 AND post_time < 2013-11-07T10:04:30-08:00 LIMIT 5

    For the date format, you can use timestamp or the format I have used on above query. You can also pass the limit at the end of the query.

     

     

    Below link might be helpful.

    https://community.lithium.com/t5/Developer-Documentation/bd-p/dev-doc-portal?section=commv2&collection=messages#constraints-post_time

  • Nav's avatar
    Nav
    Ace
    8 years ago

    TariqHussain,

    Thanks for your quick response. 

    I am importing the articles from Lithium to another application. 

    I successfully imported all by using below CURL request

    curl_setopt($ch, CURLOPT_URL, "https://eu.api.lithium.com/lsi-data/v1/data/export/community/********?fromDate=20180210&toDate=20180213

    Right now I am looking to filter only the Community articles. Please suggest.

    Thanks

  • Nav's avatar
    Nav
    Ace
    8 years ago

    Hi TariqHussain,

    Thanks. 

    I believe you are advised to apply filter in the CURL response right?

    I would like to get the article message type in the CURL request itself to avoid delay to bring other details.

    Thanks. 

  • Nav - Unfortunately,  bulk API doesn't provide any filter params for this. The only workaround is, filtering from the response.