Forum Discussion

dmilne_uts's avatar
dmilne_uts
Contributor
6 years ago

Retrieving message revisions via Lithium API v2

Is it possible to retrieve previous revisions of messages via the lithium API? If so, how?

The documentation for the v2 API mentions a revisions object, but it also says that these objects are “not collections” and “cannot be queried as collections in the SELECT statement of a LiQL query”. 

  • dmilne_uts - As mentioned "This collection has no functions"  we can not query the data from this collection. 

    You only can get current_revision from messages collection. 

    SELECT current_revision from messages. 
  • dmilne_uts - As mentioned "This collection has no functions"  we can not query the data from this collection. 

    You only can get current_revision from messages collection. 

    SELECT current_revision from messages. 
    • dmilne_uts's avatar
      dmilne_uts
      Contributor
      Thanks TariqHussain

      That seems really weird though. Why bother mentioning them in the documentation at all if it is not possible to retrieve them?

      Unfortunately fetching the current revision isn’t much help. I really need to get the content of the previous revisions for my particular usecase.
  • Is it still not supported? I have a use-case, where I want to fetch a message, but if it's in review, I want to retrieve the last accepted version.