Documentation

lists.section.get

Scope: catalog Permissions to execute: for all

lists.section.get(
   params
)

The method returns single section or list of sections. Returns data on section (-s) on success, otherwise returns empty array.

Parameter Description Available from version
IBLOCK_TYPE_ID ID of the information block type (required). Possible values:
  • lists - type of list information block
  • bitrix_processes - type of process information block
  • lists_socnet - type of group list information block
IBLOCK_CODE/IBLOCK_ID Code or ID of information block (required).
FILTER Array of fields and values for filtration. The filter fields are available at CIBlockSection::GetList
SELECT Array with fields for selection. Available fields are described in the documentation for CIBlockSection::GetList
FIELDS Array of fields and values: Available fields are described in the Structure for Iblock Module Tables. Required fields: NAME.)
SOCNET_GROUP_IDgroup ID (required, for created group list);

Example

/* lists.section.get */
var params = {
   'IBLOCK_TYPE_ID': 'lists',
   'IBLOCK_CODE': 'rest_1',
'FILTER': {
'NAME': 'section_%'
},
'SELECT': ['ID', 'NAME']
};
BX.rest.callMethod(
   'lists.section.get',
   params,
   function(result)
   {
       if(result.error())
           alert("Error: " + result.error());
       else
           console.log(result.data());
   }
);


© «Bitrix24», 2001-2024