API is the packaging of the app, which is commonly said interface, app and app calls each other, including reading data, modifying data, and so on by invoking the API to achieve, API benefits are obvious, standardized, service, external users can not see the complex things inside. A mature product must have an API to provide interfaces to other applications.
Learning to call the API is a prerequisite for dev ops, and we are most familiar with the rest API call, yes, it is now very popular is a common kind of API call method, there are some other ways to call, here are introduced to you.
REST API
The rest API is one of the Web service APIs, and the rest is Soap,xml-rpc, Json-rpc. SOAP uses the WSDL language, which is occasionally seen in some PHP code, and is not used much now because it is not very secure.
You can learn more about this API call case in my other blog post
http://haohaozhang.blog.51cto.com/9176600/1668761
Library-based API
Calling the API by calling the library is also very common, such as the Kafka you use to monitor the system, a Kafka client library on the client side, a script you write to crawl the metrics of the clients, and then call Kafka Client Library come on, metrics spit to Kafka. Detailed case you can read my other blog post
http://haohaozhang.blog.51cto.com/9176600/1792973
OS Api/hardware API
When you operate on the operating system, such as various system commands, but also in the call OS API, just ignored, and hardware-level operation, is also called API.
The above is the main way to invoke the API, here to do a summary, I hope all of you help.
This article from "Linux operation and Maintenance" blog, declined reprint!
Several types of API calls