goomento / module-page-builder-api
Rest API and GraphQL for Goomento - Magento Page Builder Extension.
Installs: 6 020
Dependents: 1
Suggesters: 0
Security: 0
Stars: 1
Watchers: 0
Forks: 2
Open Issues: 0
Type:magento2-module
Requires
- goomento/module-page-builder: >=0.4.3
This package is auto-updated.
Last update: 2024-10-21 17:24:10 UTC
README
1. Install
Run the following command in Magento 2 root folder to install this repository
composer require goomento/module-page-builder-api php bin/magento module:enable Goomento_PageBuilderApi php bin/magento setup:upgrade php bin/magento setup:static-content:deploy
2. REST API request
Get JSON data of particular Goomento page builder base on identifier
via REST API
Request:
GET <domain>/rest/V1/<store_code>/pagebuilder/identifier/<identifier>
Example response:
{ "settings": {}, "elements": [], "title": "Goomento page builder response", "type": "page", "status": "publish", "update_time": "2022-09-02 08:50:59", "creation_time": "2022-09-02 08:50:59", "html": "<div>Page Builder HTML.</div>", "styles": [ { "href": "https://example.com/pub/style.css", "content": "body {background: red};" } ] }
3. GraphQL request
Get JSON data of particular Goomento page builder base on identifier
via GraphQL
Request:
query { pagebuilder(identifier: "<identifier>") { title status type html elements_content settings_content creation_time update_time styles { content href } } }
Example response:
{ "data": { "pagebuilder": { "title": "Goomento page builder response", "status": "publish", "type": "page", "html": "<div>Page Builder HTML.</div>", "elements_content": "[]", "settings_content": "{}", "creation_time": "2022-09-02 08:50:59", "update_time": "2022-09-02 08:50:59", "styles": [ { "href": "https://example.com/pub/style.css", "content": "body {background: red};" } ] } } }
Note:
Publish
status must beYes
Enable
config must beYes
elements_content
andsettings_content
were encoded JSON data of page builder