Forum Discussion

Dromanchik's avatar
13 years ago

REST API returns incorrect solutions count

Hi guys,

 

There is a problem with REST API. There are two REST API calls.

First:

/restapi/vc/boards/id/{BoardId}/solutions/count

returns value = 5


And second:

/restapi/vc/boards/id/{BoardId}/solutions/recent

returns a list of 8 Threads

 

Can anyone explain or assume why this happens? Is there any Lithium CMS bug or any Settings which affect these calls?

There is a problem to make Paging work because of the invalid solutions count.

I can provide full links (with domain name and real board id) if it will help.

6 Replies

  • VenkS's avatar
    VenkS
    Lithium Alumni (Retired)
    13 years ago

    Could I get the domain name and board ID? I can try replicating the issue to see what the cause is, thanks!

  • VenkS's avatar
    VenkS
    Lithium Alumni (Retired)
    13 years ago

    I can't seem to replicate this on other sites. Could you file a support ticket to have the site re-indexed to see if that solves the issue?

  • DavidE's avatar
    DavidE
    Lithium Alumni (Retired)
    13 years ago

    Hello Dromanchik,

     

    I was able to reproduce this on my dev site. It appears that this is due to caching of REST API responses. Please open a support ticket requesting information about maxTimeToLive (maxiumumTime) for the recentSolvedThreadCountCache

     

    Note that -1 means that cahced values never expire. If Lithium support changing this config does not solve your problem, please open a support ticket and we will find a work around for your caching issue.

  • HaidongG's avatar
    HaidongG
    Lithium Alumni (Retired)
    13 years ago

    Just FYI, we had the same issue with another customers, index rebuild (as suggested by VenkS ) fixed the problem.

  • Inactive User's avatar
    Inactive User
    Not applicable
    11 years ago

    Can you direct me to more information for the index solution? I ran into the same problem.

     

    Thanks in advance,

     

    Jan.