logo Hostingbe

What is an api

What is an API?

An API (Application Programming Interface) is a “simple” connection between a server and a client. There is absolutely no formatting involved like client-side scripting javascript or formatting language like CSS. The client can request data from the server via commands. The server returns this data in a universal format. The format most commonly used with an API is JSON, but can also be CSV or TXT. Often the answer consists of a code, status and a message and any data that is returned.

API security

Security usually consists of an SSL connection with a token that is sent in the header of the request. The tokens have a validity of a short term think in hours. Often there is also a rate limiter on an API so that you can only make a number of requests per second.

API uses

For example, API clients can be websites that want to display data such as stock prices, visitor information or news items. APPS can also retrieve data via an API to display in the APP.

Below is the response of the ping request to HostingBE's API. The command is given via the URL and the response follows in JSON.

commando: 
https://api.hostingbe.com/api/ping

response:
{
"code": "200",
"status": "success",
"message": "Ping received, pong!"
}
0

0 comments

No comments on this article, or your comment is not yet approved!

Comment on article

Please enter your name.
Please provide a valid email address.
Vul een titel in voor je reactie
Please type your comment.

Support

Need more SEO help? Search for answers to your questions in our articles, or ask us your question

Categories

Latest contributions

Blog artikelen



2022 © HostingBe.com CMS versie 2.2.2 hostingbe.com owner of HostingBE

Powered by Bootstrap 5