Does a Pre-hook consume an extra API call?
-
For example if I set up a pre hook as outlined here: https://getbraincloud.com/apidocs/cloud-code-central/handy-cloud-code-scripts/restrictclientcalls-script/
Will it consume an extra API call for each API call made from the client? From my testing in the API Explorer, I don't see it registering the pre hook as an extra API call, but there was a discussion on discord that suggested that a whitelist prehook would create an extra api call per invocation.
Thanks!
-
OK. I don't see the extra api call being flagged in the api explorer though.
For Example:

you get 2 more apis calls free so this one shouldnt cost extra.
If I need to make 3 or more api calls in my custom Cloud Code then I will, in effect, be paying for this call
-
Hi Travis,
I can confirm that indeed there is an API call count for calling a pre/post hook script - we'll look to see if we can make that clearer in the docs.
That said, Ali is very correct, like all scripts, the next 3 API calls are free, and scripts after that are 1/2 count each.
Hope that clarifies things!
Paul.
-
Hi Travis,
I can confirm that indeed there is an API call count for calling a pre/post hook script - we'll look to see if we can make that clearer in the docs.
That said, Ali is very correct, like all scripts, the next 3 API calls are free, and scripts after that are 1/2 count each.
Hope that clarifies things!
Paul.
@Paul-Winterhalder @Ali-Raza Thanks for the help!
-
Hi Travis,
I can confirm that indeed there is an API call count for calling a pre/post hook script - we'll look to see if we can make that clearer in the docs.
That said, Ali is very correct, like all scripts, the next 3 API calls are free, and scripts after that are 1/2 count each.
Hope that clarifies things!
Paul.
Apologies for reviving this thread, but does this mean that an operation with a pre hook and a post hook that don't make any API calls of their own count as one API call (pre-hook counts as API call, then operation and post-hook are free). Or does an operation with a pre-hook and a post-hook cost 3 API calls?
-
Apologies for reviving this thread, but does this mean that an operation with a pre hook and a post hook that don't make any API calls of their own count as one API call (pre-hook counts as API call, then operation and post-hook are free). Or does an operation with a pre-hook and a post-hook cost 3 API calls?
@Ben-Morris unfortunately yes
they promised to solve it in BC 5.0 though
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login