Forum Discussion

Jk07's avatar
Jk07
Adept
11 months ago

Community API

Main Difference b/w Community API v1 and API v2, and why both the API's are used why can't only one.
  • AmanMalhotra's avatar
    11 months ago

    Hi Jk07 ,

    As per my understanding and experience with Khoros, below are my observations and understanding:

    Khoros started with API v1 and has all GET and POST calls for it, like getting new messages/posts, boards, categories, users, etc., and then we have POST calls for creating new posts, replies, Kudo, etc.

    In APIv1, we get messages/boards/categories data in a preset format in XML with all the fields mentioned in that format and we cannot get any specific fields from it.

    In APIv2, it majorly introduced LIQL GET calls where we can hit API for specific fields for example getting only user emails for all the users, or getting only message subjects from all the messages.

    In APIv2, we get POST calls for a user object, message object, etc. where we can consume POST calls with APIv2 which is more effective and efficient, for example moderating messages with APIv2 works better than APIv1.

    So as a recommendation, we should always use APIv2 for whichever things are available and if any API is not available in APIv2 then we can go ahead with APIv1, in my opinion, APIv2 is always better than APIv1 in terms of speed and versatility.

    For more details, documentation link below:
    https://developer.khoros.com/khoroscommunitydevdocs/reference/khoros-communities-platform-apis

    Do like my comment if you think it helped you in any way.