API limitations: How to Protect BCMS APIs from excessive traffic

How to protect BCMS APIs thumbnails.jpeg
By Ukpai Bishop
Read time 7 min
Posted on 30 Apr 2025

This post is an explanatory guide that will teach you about the different API limitations you might encounter while using the BCMS API to fetch dynamic data for your web applications. These limitations were put in place to ensure that the BCMS API is not abused and resources are not fairly distributed.

In this post, you will learn about the BCMS API limitations and how you can utilize them for a proper user experience and optimize your applications with them.

Having too much traffic can be good and bad at the same time, especially if you are having too much unplanned traffic. To ensure that the BCMS API is secure and equally distributed among all users, some limitations are in place will help avoid abuse and overloading the API endpoint.

This post will explain these limitations and give you tips on how to optimize your application to prevent hitting these limits.

Why are BCMS APIs limited?

To help you understand the motive behind BCMS API limiting, let me explain what API limiting is.

API limitations are restrictions placed to reduce the number of requests a user or a client-application can make to an API endpoint. These restrictions prevent API overload and abuse. It ensures that all users trying to access the API data can have equal and uninterrupted access.

Without API limitations, an API-first CMS like BCMS can easily get overloaded. This can lead to unexpected behaviors and potential downtimes. Unlimited APIs can be vulnerable to security threats and attacks.

To prevent these scenarios, the BCMS API is limited to ensure that users are restricted to a certain number of requests. To ensure fair distribution of data access and prevent downtimes that can lead to bad user experiences.

Types of BCMS API limitations

BCMS employs a few mechanisms and techniques that restrict API access and ensure that users do not exceed a level of access. Here are some of the API limitation techniques used by BCMS to prevent excessive requests:

- API Rate Limiting: Rate-limiting is a common API limitation technique that regulates the number of requests a user can make to an API endpoint within a specific timeframe. This API limitation technique ensures that users will not bombard the API with too many requests, causing uncontrolled traffic. With API rate limit best practices, the BCMS API can have stable availability and will not slow down.

Rate-limiting will ensure that there is smooth and responsive access for all users. Rate-limiting works by setting a request limit (in the case of BCMS, it is 1000req/10s ) for each user. So when a user exceeds the provided request, further requests will be paused, and the user will have to wait for some time before they can request the API again. It is important to implement rate-limiting on your client application. This will help prevent users of your application from making too many requests and causing rate limits to be exceeded.

- API Access Control: Another limitation mechanism used by the BCMS API to avoid abuse and ensure proper usage of resources is access control. This mechanism involves restricting access to privileged activities and data from unauthorized persons. For example, to retrieve data from the BCMS API, you need to have an API key with access to the entry that contains the data you are trying to retrieve. Only users with the correct API key can use the data from that entry. BCMS also has role-based access control that restricts users from performing certain tasks. For instance, an admin in an organization can remove and add new users to the organization. But an ordinary user can only perform tasks that were assigned to them by the admin.

- Content fetching limits: This refers to the restriction placed on the amount of data a single user can fetch with a single request. Fetching all available data at once can cause overworking of the API and lead to slow response speed. It is important to break fetched data into smaller chunks. This will load less content on the first request, then load more data on further requests. Content fetching limits help reduce the request workload of the BCMS API. This ensures that your application runs smoothly and there is a faster response to requests.

- Socket connection limits: To ensure a fair distribution of API resources, BCMS enforces a 20 socket connection limit per account and a 10 socket connection limit for each API key. This means your web application can only open 20 socket connections at a time for real-time updates.

How to optimize your application for the proper use of the BCMS API

When building your application and fetching data with the BCMS API, you should implement good practices that will enable you to optimize the use of BCMS API resources. This will help you prevent getting API limit errors and warnings. In this section, I will give you a list of some of the features you can implement in your client-side application to optimize BCMS in your web applications.

Tips and tricks for API limitations:

- Implement web page pagination:

Pagination is a data fetching control technique that helps break down a large set of data into smaller and more manageable sizes. With pagination, your web page does not have to display all the available data through the BCMS API at once. Instead, it will break them down into distinct pages and display smaller amounts on each page. This approach will help you reduce the load on the BCMS API when data requests are made. This is essential in ensuring proper load time and effective data fetching behavior. It will also prevent you from hitting data fetching limits.

To effectively implement pagination, you have to choose the type of pagination approach you will take. This depends on the type of application you are building. You can use the batching approach, which allows you to fetch 100 data per request, or you can implement the real-time data update approach, which allows you to fetch 10 data per requests.

- Implement API rate-limiting on your own application:

To get optimal usage of the BCMS API, you have to implement a limit on the number of requests users of your application can make through the BCMS API to load content on your application.

This will help you stay within the BCMS API rate limit and guarantee the smooth running of your application. If you fail to implement rate-limiting in your application, users can make uncontrolled requests. This can cause errors that they cannot explain.

This is because when a user exceeds the number of requests provided by BCMS, the rate limit will be reached, and a resulting error will occur. With API rate-limits on the client side, you can control the number of requests a single user can make, ensuring that they stay within the provided rate limit. To effectively set API rate-limits on the client side you have to put some things in place. First you have to set a proper error message that will inform the user whenthey exceed their limits. This message should have a retry-after information. This will inform the user the time they have to wait before they can try to send a request again. You should also set a lesser limit than the BCMS provided limit.

- Cache frequently requested data:

Another approach that will help you optimize the use of the BCMS API is by implementing API data caching for frequently requested data. For example, if a user makes a request for a particular data for a specific number of times, you can store the response to that request in the localStorage of the user’s device. This will allow you to get this data from the localStorage whenever they make a request again, instead of querying the BCMS API. This approach will minimize API calls and reduce workloads.

- Assign proper roles and define privileges:

Roles and privileges are important features that help control access to API data. Roles and privileges keep unauthorized individuals from accessing certain actions. When there are no properly defined roles, unauthorized users can gain access to private data and privileges. This can cause security breaches. BCMS already has support for Role-Based access control, you only need to implement it on users when you add them to your organization.

- Implement Load More Feature:

The load more feature is another effective data fetching limit approach that prevents exceeding BCMS API limits. This feature will load a smaller amount of data from the BCMS API and display a load more button. When the user clicks on this button, more content will be loaded. This method will help you stay within the content fetching limit by dividing the data content into smaller chunks. Load more feature also improves page load time and request response speed.

- Use API keys properly:

Another approach BCMS employs is the use of API keys to protect access to API data. This approach requires passing an API key programmatically to gain access to API data. You must grant your API key proper and well-defined access to your data to avoid performance issues. For example, when you create an API key, you have to scroll down to the bottom of the configuration settings and grant it access to perform desired actions on API entries. This will allow you to control what the API can and cannot do.

Conclusion: Protecting your BCMS API usage for optimal performance

BCMS is an API-based platform that enables faster display of dynamic content for applications like blogs. It enhances faster and easier development. But to ensure the stability and proper usage of API resources, BCMS APIs are limited with certain restrictions.

In this post, I introduced you to limitations you might face while using BCMS and why they were implemented. I also explained how you can optimize your application to use BCMS without hitting the API limits.

It takes a minute to start using BCMS

Gradient

Join our Newsletter

Get all the latest BCMS updates, news and events.

You’re in!

The first mail will be in your inbox next Monday!
Until then, let’s connect on Discord as well:

Join BCMS community on Discord

By submitting this form you consent to us emailing you occasionally about our products and services. You can unsubscribe from emails at any time, and we will never pass your email to third parties.

Gradient