Insites Docs Developers guide APIUnderstanding API Usage

Understanding API Usage

Last updated on August 14, 2024.

Understanding how API calls work and are charged is crucial to web application development. It's also important for selecting the right hosting plan and implementation for your project.

How an API works

An API, or Application Programming Interface, is a set of rules and protocols that allows different software applications to communicate with each other. It serves as an intermediary that enables different pieces of software to interact and share data. APIs work by defining a set of rules and protocols that specify how different software components should interact. This includes the data formats that should be used, the methods or functions that can be called, and the rules for authenticating and authorizing access to the API.

When a developer wants their application to interact with another piece of software, they can use the API provided by that software to do so. This typically involves making HTTP requests to the API, including the necessary parameters and data in the request, and then receiving a response from the API with the requested information. APIs are commonly used to integrate different systems and allow them to work together.

For example, a social media application might use APIs to integrate with third-party services for features like location data, image recognition, or payment processing. Overall, APIs play a crucial role in modern software development by enabling interoperability and integration between different applications and services. They provide a standardized way for software to communicate and share data, ultimately enabling the creation of more powerful and customizable software solutions.

Inbound API Calls

Inbound API calls are requests from external servers or clients to retrieve data from your instance. They work similarly to the way a user views a website page; however, they are only requesting the raw data.

Therefore, these types of requests do not count toward your API usage. They are attributed to your bandwidth allocation, which has very generous amounts across all plan types and can handle multiple requests per second.

You can view your bandwidth usage within the Insites Console and Insites Instance Admin (IIA). If your application has high usage, you can also utilize plan overages before upgrading to the next plan.

Outbound API Calls

When your server instance communicates with an external server to perform operations on data, it is categorized as an outbound API call. These operations can include creating, retrieving, updating, or deleting data, which are commonly referred to as CRUD operations. Each outbound API call, along with any accompanying responses, contributes to the usage count within your hosting plan.

What about Webhooks?

When using webhooks, it's important to note that they operate over the HTTP Protocol. Unlike API calls, webhooks do not count towards your monthly API call quota. However, it's essential to be aware that they are included in your monthly bandwidth usage.

Instance Plan Usage

There are three distinct hosting options available for Insites. It's crucial to have a clear understanding of the specific inclusions in your chosen plan and to proactively monitor them to prevent any unforeseen expenses.

Additionally, if you depend on regular updates from external services, it's advisable to thoroughly assess the integration of your applications with third-party systems.

How to check my usage

Understanding and effectively monitoring your application's external API calls is paramount for optimizing performance and managing costs efficiently.

To track your API usage, you can access a detailed breakdown of your total usage through the Insites Console and the Insites Instance Admin (IIA). This information is updated daily and presented monthly, enabling you to monitor your usage patterns closely. By keeping an eye on your usage, you can make informed decisions about when it's time to upgrade to a higher plan.

In addition to the diverse plans offered for multi-tenant instance hosting, you have the option to purchase overages. Overage purchases allow you to pay for small increments of specific feature usage, which is particularly useful for fine-tuning cost management. This means that if you find yourself slightly exceeding a certain metric, you won't necessarily have to upgrade to the next plan with all its inclusions. Feel free to refer to our pricing page for more details on overage costs.

Best Practices for high usage applications

If your application requires frequent updates from third-party servers, it's recommended that you utilize an external server such as AWS Serverless functions or an automation platform like Make or Zapier. By doing so, you can perform the lookup and push the data into your instance rather than pulling it. This approach won't count toward your external API usage.

In addition to alleviating the load on the application server and minimizing usage toward your plan, you'll benefit from the features offered by these systems. They include detailed logging and retry mechanisms out of the box, eliminating the need for you to develop them yourself.

If you need guidance on the optimal setup for your application, feel free to contact our support team. We can also connect you with an implementation partner in your area to assist you further.

Have a suggestion for this page?

Didn't quite find what you are looking for or have feedback on how we can make the content better then we would love to hear from you. Please provide us feedback and we will get back to you shortly.