I'm trying to get a list of all the posts that were marked as solved in the past year. Right now I'm using API v1:
But I noticed it always returns the first 100 threads. Even if I use this
I only get 100 solutions. Even if the solution count for the community is higher.
It sounds like the 'recent solution' list is only 100 thread long by desing, but the documentation doesn't mention a limit: https://community.lithium.com/t5/Developer-Documentation/bd-p/dev-doc-portal?section=commv1&leaf-id=...
Is there a way to override that limit?
You should be able to do this using API v2, you may need do a little more work but I've been able to specify how many solutions to return using LIQL by appending LIMIT 200 for example to the end of the query.
SELECT * FROM messages WHERE is_solution=true LIMIT 200
returns 200 results in JSON format.
Documentation on API v2 and the query in question can be found below:
One of the advantages of API v2 is its flexibility so you can specify only the fields you need to reduce overheads.
Thanks for the suggestion! The only problem with v2 is that we only have a few allowed constraints and sorting fields.
In this particular case I'm interesed on recent solutions (not necessarily recent replies that were marked as a solution) that are older than 3 days within the past year. This means I need to use the solution time as a constraint and a sorting field, and I can't do that with API v2.
Thinking about API v1, while you will only get 100 responses back on the initial call, it should paginate the results so you might be able to offset the results using for example by incrementing the page number you should see results offset from that position.
Will give results 1-100, however
Will give results 101-200.
Unfortunately it means multiple API calls.
Following up on this. The 100 thread cap is a setting that the Support team can change, all I had to do was contact them and ask them to change it.
Thanks for all the sugestions anyways!