Documentation

entity.section.get

Scope: entity Permissions: for all

Gets list of storage sections (information block sections). List method.

User must have at least storage Read permission (R).

Parameters

Parameter Description
ENTITY Required. Storage string ID.
SORT Array for sorting with by1=>order1[, by2=>order2 [, ..]], where by1, ... - sorting field that can have the following values:
  • ID - section ID;
  • SECTION - parent section ID;
  • NAME - section name;
  • CODE - section symbolic code;
  • ACTIVE - section active status
  • LEFT_MARGIN - left side margin;
  • DEPTH_LEVEL - nesting depth (starts from 1);
  • SORT - sort index;
  • CREATED - по времени создания раздела;
  • CREATED_BY - по идентификатору создателя раздела;
  • MODIFIED_BY - по идентификатору пользователя изменившего раздела;
  • TIMESTAMP_X - по времени последнего изменения.
order1, ... - sort order with the following values:
  • ASC - by ascension;
  • DESC - by descension.

Default value - Array("SORT"=>"ASC") - indicates that retrieved result will be sorted by ascension. In case of empty Array(), result won't be sorted.

FILTERArray array("filtered field"=>"value" [, ...]). Filtered field can have the following values:
  • ACTIVE - filter by activity (Y|N);
  • NAME - by name (can be searched by template [%_]);
  • CODE - by symbolic code (by template [%_]);
  • SECTION_ID - by parent section ID (in case of false, returns root sections);
  • DEPTH_LEVEL - by nesting level (starting from 1);
  • LEFT_MARGIN, RIGHT_MARGIN - by a position in a structural tree (used when retrieving of subsection tree is required);
  • ID - by section ID;
  • TIMESTAMP_X - by time of last update;
  • DATE_CREATE - by time of creation;
  • MODIFIED_BY - by user ID who updated the section;
  • CREATED_BY - by creator;

All filtered fields can contain type of filter check in front of title.

Optional. Records aren't filtered by default.

Example

Call

BX24.callMethod('entity.section.get', {ENTITY: 'menu_new', SORT: {'NAME': 'ASC'}}, function(r){
 sections = r.data();

Request

https://my.bitrix24.com/rest/entity.section.get.json?ENTITY=menu_new&SORT%5BNAME%5D=ASC&auth=9affe382af74d9c5caa588e28096e872

Response

{"result":[{"ID":"219","CODE":null,"TIMESTAMP_X":"2013-06-23T10:11:59+03:00","DATE_CREATE":"2013-06-23T10:11:59+03:00","CREATED_BY":"1","MODIFIED_BY":"1","ACTIVE":"Y","SORT":"500","NAME":"\u0412\u0442\u043e\u0440\u0430\u044f \u0442\u0435\u0441\u0442\u043e\u0432\u0430\u044f \u0441\u0435\u043a\u0446\u0438\u044f","PICTURE":null,"DETAIL_PICTURE":null,"DESCRIPTION":null,"LEFT_MARGIN":"1","RIGHT_MARGIN":"2","DEPTH_LEVEL":"1","ENTITY":"menu_new","SECTION":null},{"ID":"218","CODE":null,"TIMESTAMP_X":"2013-06-23T10:24:46+03:00","DATE_CREATE":"2013-06-23T10:08:54+03:00","CREATED_BY":"1","MODIFIED_BY":"1","ACTIVE":"Y","SORT":"500","NAME":"\u041f\u0435\u0440\u0432\u0430\u044f \u0442\u0435\u0441\u0442\u043e\u0432\u0430\u044f \u0441\u0435\u043a\u0446\u0438\u044f","PICTURE":null,"DETAIL_PICTURE":null,"DESCRIPTION":null,"LEFT_MARGIN":"3","RIGHT_MARGIN":"4","DEPTH_LEVEL":"1","ENTITY":"menu_new","SECTION":null}],"total":2}



© «Bitrix24», 2001-2024
Up