Open API, API means application programming interface, open API means open application programming interface. If we say that a program opens an API, it means opening an interface so that other people's programs can call your program data. Just like your computer, mobile phone, etc. have some USB interfaces, it can also be said to be open interfaces. With these interfaces, others can use them to do functions such as inserting U disks, charging, etc.
Development Method
If you publish an open API, but it is difficult to integrate and does not come with Relevant standards, or standards attached but not suitable, then no developers will use the system. The best way to ensure that your API can be used by others is to use it in your own application, which is the saying "build it and use it".
Deciding which API standard to use is very important because the target group of each API standard is very special. If you want to support a large number of users, then use a simple API that does not require much overhead, such as a RESTful API. The REST standard is very broad. The best practice is to make sure your API is consistent. For example, I don't use SOAP because it's too complex.
SOAP is the primary protocol for building web-based APIs, but it is too old compared to REST and JSON. I've found that having JSON as the response instead of SOAP and XML makes life much simpler. JSON lets me return a simple object format that can be parsed in almost any language.
Attaching standards to common APIs for authentication (such as OpenID, OAuth, and SAML) can make your API easy to use for developers and non-developers alike. If you don't handle authentication for users, use simple HTTP-based or token-based authentication instead of OpenID, OAuth, or SAML, which are designed primarily for authenticating users.
In addition, it is beneficial for developers to provide an open API that has itself been archived. I've recently started adding Swagger API documentation to my API. Swagger allows developers to automatically generate code for APIs in multiple languages. If you don't follow this approach, you should at least make sure that you provide API client libraries using the most popular languages such as Java, Node.js, Python, Ruby, and Object-oriented C (which is used for developing mobile applications).
The key is to follow simple software creeds and standards. Don't reinvent the API, don't complicate authentication.
The above is the detailed content of What does open api interface mean?. For more information, please follow other related articles on the PHP Chinese website!