REST API for iblocks is available starting from the Information blocks module version 20.5.0.
Access to these iblocks data using REST is based on
Starting from iblocks module version 19.0.0 supports ORM when handling iblock elements.
Learn more at Bitrix Framework. . According to this concept, a single iblock is an individual ORM entity and iblock element - is a record (object) of entity.
REST query is always performed within the context of a single iblock with indicated iblockId.
Note: supports both iblock versions: 1.0 and 2.0.
By default, REST is disabled for all iblocks. You can enable it inside individual iblock edit forms in the admin UI (Content > Information blocks > Information block types > [type_name] > [iblock_name] ), checkmark the option for Access via REST is enabled:
Make sure, that API symbolic code (API_CODE) is available: its required for handling ORM mechanism.
Records handling logic is implemented in the mechanism of AJAX-controllers. By default, all iblocks trigger the controller \Bitrix\Iblock\Controller\DefaultElement.
You can add methods implementation using the
Service locator is a design template, convenient for app services.
Learn more at Bitrix Framework. .
Presently, Read-only mode is available only for handling iblock elements. The following methods are available for getting and filtering records:
|iblock.element.get||Gets iblock element by its ID.|
|iblock.element.list||Gets iblock elements by specified filter.|