Documentation

catalog.document.list

Scope: catalog Permissions to execute: for all

catalog.document.list(order, filter, select, offset, limit, start)

Method for getting list of items.

Returns list of items on in response body on success.

Parameters

ParameterТип Description
orderarray Sorting.
filterarray Filter.
selectarray List of retrieved fields.
offsetinteger Selection page, operates the same as start.
limitinteger Page size from 1 to 500 (when set as 0 or number higher than maximum, uses the default value 50).
startstring Printed page number. Works for https queries.

Example

For JS

BX24.callMethod(
	'catalog.document.list',
	{
		'order': {
			'id': 'asc',
		},
		'filter': {
			'>id': 0,
		},
		'offset': 0,
		'limit': 50,
	},
	function(result)
	{
		if(result.error())
			console.error(result.error());
		else
			console.log(result.data());
		result.next();
	}
);
$result = CRest::call(
	'catalog.document.list',
	[
		'order' => [
			'id' => 'asc',
		],
		'filter' => [
			'>id' => 0,
		],
		'offset' => 0,
		'limit' => 5,
	]
);

echo '<pre>';
print_r($result);
echo '</pre>';

For HTTPS

https://your_account/rest/catalog.document.list?auth=_auth_key_&start=50

© «Bitrix24», 2001-2024