Source
'sortfield' => ['type' => API_STRINGS_UTF8, 'flags' => API_NORMALIZE, 'in' => implode(',', $this->sortColumns), 'uniq' => true, 'default' => []],
<?php
/*
** Zabbix
** Copyright (C) 2001-2022 Zabbix SIA
**
** This program is free software; you can redistribute it and/or modify
** it under the terms of the GNU General Public License as published by
** the Free Software Foundation; either version 2 of the License, or
** (at your option) any later version.
**
** This program is distributed in the hope that it will be useful,
** but WITHOUT ANY WARRANTY; without even the implied warranty of
** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
** GNU General Public License for more details.
**
** You should have received a copy of the GNU General Public License
** along with this program; if not, write to the Free Software
** Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
**/
/**
* Class containing methods for operations with auditlog records.
*/
class CAuditLog extends CApiService {
public const ACCESS_RULES = [
'get' => ['min_user_type' => USER_TYPE_SUPER_ADMIN]
];
/**
* @var string Database table name.
*/
protected $tableName = 'auditlog';
/**
* @var string Database table name alias.
*/
protected $tableAlias = 'a';
/**
* @var array Database fields list allowed for sort operation.
*/
protected $sortColumns = ['auditid', 'userid', 'clock'];
/**
* Method auditlog.get, returns audit log records according filtering criteria.
*
* @param array $options Array of API request options.
* @param int|array $options['auditids'] Filter by auditids.
* @param int|array $options['userids'] Filter by userids.
* @param int $options['time_from'] Filter by timestamp, range start time, inclusive.
* @param int $options['time_till'] Filter by timestamp, range end time, inclusive.
* @param string $options['sortfield'] Sorting field: auditid, userid, clock.
* @param string $options['sortorder'] Sorting direction.
* @param array $options['filter'] Filter by fields value, exact match.
* @param array $options['search'] Filter by fields value, case insensitive search of substring.
* @param bool $options['countOutput']
* @param bool $options['excludeSearch']
* @param int $options['limit']
* @param string|array $options['output']
* @param bool $options['preservekeys']
* @param bool $options['searchByAny']