Forum Discussion

Bhargav1's avatar
10 years ago

Ambiguity in Lithium API V1 vs V2 Best Usage

Hi,

 

 

I have a requirement where i need to pull information about the user comments like boards, messages and threads everyday once. So which one is best API v1 or API v2 ?? Kindly provide suggestion.

 

Thanks in advance.

 

 

Thanks,

Bhargav

  • OlivierS's avatar
    OlivierS
    Lithium Alumni (Retired)

    Bhargav1 in case you haven't see it yet:

     

    When to use Community API v1

    Use Community API v1 for CREATE, UPDATE, and DELETE operations on the Message, User, and the supporting resources listed above. Use v1 for CREATE, READ, UPDATE, and DELETE operations on all other resources.

    Community REST API v2

    In our 14.10 release, we introduced version 2 of our Community REST API. In v2, we’ve simplified the Community API: fewer calls, increased consistency, increased functionality, and the ability to search and sort by a wide variety of fields of a resource. Documentatio for the Community REST API v2 is contained in a separate knowledge base on the Developers Network

    API v2 exposese more resource fields, accessible through LiQL, a SQL-like query language. Use a LiQL statement to define search criteria for any complex query.

    We recommend using API v2 for all new development, redesigns, or bug fixes to existing components where possible. Community API v2 is well-suited for personalization, faceted navigation, advanced search, and recommended content use cases. In addition, choose v2 for long-lived sessions via OAuth2. (This is particlularly useful for non-Lithium mobile apps.)

    More specifically, v2 is the best choice for READ operations on Message and User objects, as well as READ operations on the following supporting resources:

    • Album
    • Attachment
    • Custom Tag
    • Image
    • Kudo
    • Label
    • Me Too
    • Rating
    • Role
    • Video

     

    See Getting Started for more information about the Community REST API v2. Each resource type has an article defining the resource properties and how the properties are used in LiQL queries.

    • Bhargav1's avatar
      Bhargav1
      Guide

      Hi OlivierS,

       

      We are performing read operations daily once through REST. Currently I'm performing read operations using Lithium v1 API, is it a best idea to shift to v2 API.???  Please give me a suggestion.