How to create a custom rest API in magento 2

Опубликовано: 02 Апрель 2026
на канале: Know the Mage
710
17

REST stands for representational state transfer and is an application programming interface (API). In this tutorial we will talk about creating our rest apis using magento architecture and standards.

0:00 - Introduction
0:03 - Create a CustomApiInterface interface.
0:42 - Create a CustomApi model.
1:42 - Create di.xml to define preferences.
2:21 - Create a simple GET request.
3:44 - Run with postman
4:17 - Retrieve a post by id
6:44 - Create a post request.
7:25 - End