Source
'filter' => ['type' => API_FILTER, 'flags' => API_ALLOW_NULL, 'default' => null, 'fields' => ['auditid', 'userid', 'clock', 'action', 'resourcetype', 'ip', 'resourceid', 'resourcename', 'username', 'recordsetid']],
<?php
/*
** Copyright (C) 2001-2025 Zabbix SIA
**
** This program is free software: you can redistribute it and/or modify it under the terms of
** the GNU Affero General Public License as published by the Free Software Foundation, version 3.
**
** 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 Affero General Public License for more details.
**
** You should have received a copy of the GNU Affero General Public License along with this program.
** If not, see <https://www.gnu.org/licenses/>.
**/
/**
* 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']
* @param bool $options['searchWildcardsEnabled']
* @param bool $options['startSearch']
*
* @throws APIException
*