Forum Discussion
Hi VikasB
Yeah I saw that post. I'm more out to understand how/if different functions contain one or several API calls.
If I'm to leverage the case portal for our client base, I need to ensure the contract reflect the expected API calls. But I can't really do that until I understand how they are calculated.
Thanks for the suggestion though!
API call will be counted when you will try to hit on an external network. Coming to your last comment, even if you are hitting the same API 10 times, it will be counted as 10 API hits. Or you can say different functions have the same API call but it will increase the billed call whenever any of the function will run and hit that API.
- Mmalre7 years agoAce
Thanks again VikasB. It does not really answer my question unfortunately.
What I need to know is:
Is every new case 1 API and only 1 API call?
Is every new comment 1 API call and only 1 API call?
Is a response on a comment 1 API call or more?
Is every case update 1 API call and only 1 API call?
In what other areas will API calls be sent, and is their ratio the same? Aka one insert/update/delete = 1 callThanks again
-Matt
- BeckyS7 years agoLithium Alumni (Retired)
Mmalre I checked internally and here's some additional information.
The answer to your question is: yes and no. We have LiQL, which is Lithium's query language, which can consolidate an entire thread, or you can get each one as an individual API call.
For example, fetch recently posted threads retrieves the five most recently posted to threads across the community.
<#assign apiVersion = “2.0”/> <#assign query = “SELECT id, body, subject, view_href, post_time, post_time_friendly, replies.count(*), kudos.sum(weight), author, board FROM messages WHERE depth=0 ORDER BY conversation.last_post_time DESC LIMIT 5" /> <#assign topics = rest(apiVersion, “/search?q=” + query?url).data.items![] /> <ul> <#list topics as message> <li><a href=“message.view_href”>message.subject</a> </#list> <ul>
So, all of that’s basically a single API call.
The LiQL documentation should help some more:
https://lithosphere.lithium.com/t5/Developer-Documentation/bd-p/dev-doc-portal?section=commv2&v2.main=liqlexamples#recentThreads