Set up and use the version system – API system

What is the API system?

API stands for Application Programming Interface, pure Vietnamese translation is "Application programming interface". Understand more deeply, it is the connection and communication standards to get information or services provided by one party to another or some other parties, can be abstracted with the following figure:

API schema

The effect of API?

  • Application of micro-service architecture implementation capabilities in software development (break down functions into small modules)
  • Provides side back-end for webapp, mobile apps
  • Use 3rd party service utilities (3rd party service) as authentication and get user information via Facebook, Google, Stripe, etc. This is the most common and conspicuous effect. In addition to authentication and social networking services, API also provides online payment services, image editing, SMS messaging, electronic signatures, upload / download files, etc.
  • Providing services outside (acting as 3rd party service)
  • Vietnam web summit

    Join the largest Web programming community in Vietnam:

API operation model

As an interface itself, information on how to use the API should be made public to the user, at least with the partner's programmers. All receiving methods, servers and returned data are provided by a specific organization (API provider).

The API provider will be responsible for operating their servers and opening appropriate communication ports for users to use. Any problem with error data, overload, wrong meaning of the communication port compared to the data returned is due to the API provider side is responsible.

Therefore, when using API, we almost have to give quality to suppliers because we ourselves can not decide anything. We only see and only be able to do what they allow and provide (although what they provide is false, slow, unclear data: D)


Next we will come to the important experiences of the writer's own API and from information gathering.

Notes in using API

  • Sometimes what API provider provides is not feasible for customer / project management requirements, software developers need to use specific information and examples to prove it and propose solutions. best possible. Do not head too deep into the problem beyond your scope of resolution.
  • Some big providers still have extremely bad documentation systems that make the developer's API integration a long trial, and you need to accept this problem ^ _ ^. However, they should make the most of their support utility (if any) by asking questions directly.
  • If a product developer uses an open source library to speed up the integration of APIs, it is normal to have errors or unpleasant warning because no one is responsible for making sure that doesn't happen to you. So, "back and forth", if you can solve a problem, contribute your source code to overcome for others (aren't you also using the kindness of others? star?!).

Notes in the development of API

  • API versioning is the version split for the API system you provide. Why must the API version be divided? Because you want to keep everything related to the old API system and provide a completely new API system, it does not affect the old API integration. For example, google / v1 / user / lehoang1417 will return handsome but google / v2 / user / lehoang1417 will return awesome ?
  • Depending on the independence in the system design, the risk of new changes will affect the old version more or less. But in any case, you need to be aware of and prevent this problem.
  • For mobile apps, once released, we cannot change the API version that it calls if we only decide the API version returned according to what it requests. So be very careful during release times.
  • However, there is a way to actively change the mobile apps' requests API version by having the app_type and app_version in the request. We will rely on the desired version decision.

Wish you used and researched API successfully?


ITZone via hoangle

Share the news now