Forum Discussion

SkyFlyinDancez's avatar
9 years ago

Request query with API v2 over HTTP

Hi Lithium Support,

I had try to make a call to staging with below query but we realize the data returned from the API and data from https://communitystg.digi.com.my/t5/Prepaid/bd-p/aPrepaid and https://communitystg.digi.com.my/t5/Postpaid/bd-p/aPostpaid are slightly different.

Sample query

https://api.stage.lithium.com/community/2.0/our-digi-tenant-id/search?q=SELECT+*+FROM+messages&api.pretty_print=true 
(with header)

 

Can we request the query needed for above 2 page on the data of Latest Post, Announcement and Top Tags ?

1. Latest Post - I had try to call it but getting similar but different data from above url. (Messages Table)
2. Top Tags - We able to call it but all query return 0 array. (Tags Table)
3. Announcement - I can't found related Table to query the data from Lithium. (Reference Doc : https://community.lithium.com/t5/Developer-Documentation/bd-p/dev-doc-portal?section=commv2&v2.main=collections )

 

3 Replies

  • Hi,

     

    Something like this? As i don't understand your question fully:

     

    1. .stage.lithium.com/api/2.0/search?q=select%20*%20from%20messages%20ORDER%20BY%20post_time%20DESC%20limit%201

    ( select * from messages ORDER BY post_time DESC limit 1 )

     

    2. not sure what you want here.  

    3. same here

  • Hi Willem,

    Actually I wanna create a page that getting exactly same API data with https://communitystg.digi.com.my/t5/Prepaid/bd-p/aPrepaid and https://communitystg.digi.com.my/t5/Postpaid/bd-p/aPostpaid. I am able to get it for Latest Post and Announcement, I still working on the data  retrieve for Top Tags that displayed on the right side of community pages.

    Do you know how to retrieve Top Tags that filtered with board.id (aPrepaid/aPostpaid) and the return of the API Call should exactly same like the above 2 link.

    Thanks.