Skip to content

Latest commit

 

History

History
40 lines (31 loc) · 1.94 KB

api-concepts.md

File metadata and controls

40 lines (31 loc) · 1.94 KB
layout group subgroup title menu_title menu_order version github_link redirect_from
default
extension-dev-guide
99_Module Development
Public interfaces & APIs
Public interfaces & APIs
3
2.0
extension-dev-guide/api-concepts.md
/guides/v1.0/extension-dev-guide/api-concepts.html

##{{page.menu_title}}

What is a public interface?

A public interface is a set of code that third-party developers can call, implement, or build as a plug-in. Magento guarantees that this code will not change in subsequent releases without a major version change.

Public interfaces for a module reside in the Api folder for a module. For example, the public interfaces for the `Customer` module reside in the `vendor/magento/module-customer/Api directory.

Third-party developers should use only these interfaces, that is, interfaces with the `@api` annotation. You can use other interfaces but those may be modified or removed in subsequent Magento releases. For more information, see Backward compatibility.

What is an API?

An application programming interface (API) is a set of interfaces and their implementations that a module provides to other modules.

API types

The following items are considered types of APIs:

  • Directory structure
  • Configuration files structure
  • Events
  • Client API
  • Provider API (SPI)

Directory structure and configuration file structure are types of APIs because extension developers use them. Developers write configurations, and place their static files in specified folders; so if the configuration file structure or directory structure changes in subsequent releases, modules and extensions may break.