Documentation

iblock.element.list

iblock.element.list(iblockId, select, filter, order, pageNavigation)

Method gets iblock elements by specified filter.

Parameters

ParameterDescription
iblockIdIblock ID. Required parameter.
selectSet of fields and properties available for selection. Fields listed in the controller method getElementEntityAllowedList are selected by default. Specifying select, chooses fields/properties and ID in the method.
filterArray with filter parameters, received by the method \Bitrix\Main\ORM\Query\Filter\ConditionTree::createFromArray.
orderArray with sorting format ['FIELD1' => 'ASC', 'FIELD2' => 'DESC'].
pageNavigationStandard REST page navigation \Bitrix\Main\UI\PageNavigation.

Result format:

{
    "result":
    {
        "elements":
        [
            {
                "ID":123,
                "NAME":"...",
                "SOME_PROPERTY":
                [
                    {
                        "ID":456,
                        "VALUE":"...",
                        "DESCRIPTION":""
                    },
                ]
            }
        ]
    },
    "total":1
}


© «Bitrix24», 2001-2024