https://www.thecoachsmb.com/display-data-from-database-on-frontend-in-magento2
with changes ...
app\code\Thecoachsmb\Mymodule\Api\Data\ItemInterface.php
app\code\Thecoachsmb\Mymodule\Api\ItemRepositoryInterface.php
app\code\Thecoachsmb\Mymodule\Model\ResourceModel\Item\Collection.php
app\code\Thecoachsmb\Mymodule\Model\ResourceModel\Item.php
app\code\Thecoachsmb\Mymodule\Model\Item.php
app\code\Thecoachsmb\Mymodule\Model\ItemRepository.php
app\code\Thecoachsmb\Mymodule\etc\di.xml
app\code\Thecoachsmb\Mymodule\etc\webapi.xml
POST {domain_url}/rest/V1/article
Raw json data
{
"article": {
"title": "test",
"content": "test"
}
}
app\code\Thecoachsmb\Mymodule\view\frontend\templates\view.phtml