HERE API: Add cap on the number of request to control billing - billing

I am using here.com location API, but I am afraid it may create a spike in billing, then how can I put a cap on the number of requests to control my billing/spending in the HERE.com API

Related

Here Maps - What HTTP status code does it return when API Quota was exceeded?

I am developing an app which uses the distance calculation of HERE maps API...
I am preparing for the case when the API doesn't return what my app expects (correct response including distance infos). So I want to be prepared for the case the API Request Quota was exceeded...
What HTTP status code does it return when API Quota was exceeded?
Does it return a 200 with some JSON which explains that and error occurred because of quota?
You should also get a 429 error from the API, with a message "Limit Exceeded".
If you exceed the Location Services 250,000 Transactions or Data Hub 2.5GB Data transfer or 5GB Database storage included for free in the Freemium plan, you'll receive an email telling you to add payment details to your account.
You'll have some "wiggle room" above your limits to help ensure your access is not unintentionally shut down. However, it's possible to exceed the threshold, including "wiggle room", which would result in account deactivation, even before we can notify you.
for detail please check the FAQ section with question
"12. What happens if I exceed limits on my Freemium plan?"
https://developer.here.com/faqs#payment-and-subscription

rate limit in twitter api

I'm using twitter developer API for my project. I have created an account with my phone number and email address. As you know there are some rate limits in twitter API!
For using API I should create app and user tokens of that app.
My question is that if I create multiple apps for that single account and use them in my project, my rate limit is multiplied by number of apps or requests are aggregated so my rate limit doesn't change?
Yes. It is limited by account.
Rate limiting of the standard API is primarily on a per-user basis —
or more accurately described, per user access token. If a method
allows for 15 requests per rate limit window, then it allows 15
requests per window per access token.
See: https://developer.twitter.com/en/docs/basics/rate-limiting.html

Gmail API quota usage check

We are developing a project working with Gmail API, it might exceed the API limit on this page https://developers.google.com/gmail/api/v1/reference/quota
API Limit
Daily Usage 1,000,000,000 quota units per day
Per User Rate Limit 250 quota units per user per second
"Exceeding a rate limit will cause an HTTP 403 or HTTP 429 Too Many Requests response and your app should respond by retrying with exponential backoff."
So we can we make a call from script, to check the number of API call left before we run the project? Or it can only be seen in google API console in a web page?
Does the HTTP 403 error bonded to Daily Usage limit and HTTP 429 bonded to User Rate Limit?
Does the API limit Daily Usage means calendar day?
The link that you've provided gives a lot of information about Gmail Quota Usage and limits.
1.So we can we make a call from script, to check the number of API call left before we run the project? Or it can only be seen in google API console in a web page?
To view the quota usage, access your developer console. And you are correct, it is viewable using the console. You can also see traffic ( number of request per seconds), and error ratio of the enabled API of your project.
2.Does the HTTP 403 error bonded to Daily Usage limit and HTTP 429 bonded to User Rate Limit?
According to the documentation Usage Limits:
Exceeding a rate limit will cause an HTTP 403 or HTTP 429 Too Many Requests response and your app should respond by retrying with exponential backoff.
An error 4xx is more likely be related to user rate limit. And the documentation discussed what to do when experiencing an error 4xx (exponential backoff).
3.Does the API limit Daily Usage means calendar day?
Daily usage means the maximum API requests per day
Hope this info helps.

What are the limitations of OneDrive for Business APIs

As per the documention of the OneDrive API https://dev.onedrive.com/README.htm, under the Throttling option, "OneDrive has limits in place to make sure that individuals and apps do not adversely affect the experience of other users. When an activity exceeds OneDrive's limits, API requests will be rejected for a period of time. OneDrive may also return a Retry-After header with the number of seconds your app should wait before sending more requests."
So i would like to know what are the limitations that causes the OneDriveApi to reject request
Based on how use the API many requests to it or if you are trying to do something that the user is not info need abt

YouTube API Quota - Multiple accounts

Version 3 of the YouTube Data API has concrete quota numbers listed in the Google API Console where you register for your API Key. You can use 30,000 units/second/user and 1,000,000 per day. Projects that had enabled the YouTube Data API before April 20, 2016, have a default quota of 50M/day.
This means that once we breach this numbers, we'll receive in the header that the rate limits have been exceeded.
My question is, can you create multiple accounts, which will in theory DOUBLE the quota?
Or is it also IP restricted too meaning /user1/ & /user2/ requests won't actually change the quota?
It is my understanding that the quota is PER PROJECT, not per account. You could create 3 projects and each project would have the default quota. Then in your application you could attempt to use all 3 combined in order to post to the API with a higher throughput.