Los siguientes objetos están directamente relacionados con la API role
.
El objeto de rol tiene las siguientes propiedades:
Propiedad | Tipo | Descripción |
---|---|---|
roleid | cadena | (readonly) ID del rol. |
name (obligatorio) |
cadena | Nombre del rol. |
type (obligatorio) |
entero | Tipo de usuario. Valores posibles: 1 - (predeterminado) Usuario; 2 - Administrador; 3 - Súper administrador. |
readonly | entero | (readonly) Si el rol es de solo lectura. Valores posibles: 0 - (predeterminado) No; 1 - Sí. |
Tenga en cuenta que para algunos métodos (actualizar, eliminar) la combinación de parámetros requeridos/opcionales es diferente.
The role rules object has the following properties:
Property | Type | Description |
---|---|---|
ui | array | Array of the UI element objects. |
ui.default_access | integer | Whether access to new UI elements is enabled. Possible values: 0 - Disabled; 1 - (default) Enabled. |
services.read.mode | integer | Read-only access to services. Possible values: 0 - Read-only access to the services, specified by the services.read.list or matched by the services.read.tag properties.1 - (default) Read-only access to all services. |
services.read.list | array | Array of Service objects. The specified services, including child services, will be granted a read-only access to the user role. Read-only access will not override read-write access to the services. Only used if services.read.mode is set to 0. |
services.read.tag | object | Array of Service tag object. The tag matched services, including child services, will be granted a read-only access to the user role. Read-only access will not override read-write access to the services. Only used if services.read.mode is set to 0. |
services.write.mode | integer | Read-write access to services. Possible values: 0 - (default) Read-write access to the services, specified by the services.write.list or matched by the services.write.tag properties.1 - Read-write access to all services. |
services.write.list | array | Array of Service objects. The specified services, including child services, will be granted a read-write access to the user role. Read-write access will override read-only access to the services. Only used if services.write.mode is set to 0. |
services.write.tag | object | Array of Service tag object. The tag matched services, including child services, will be granted a read-write access to the user role. Read-write access will override read-only access to the services. Only used if services.write.mode is set to 0. |
modules | array | Array of the module objects. |
modules.default_access | integer | Whether access to new modules is enabled. Possible values: 0 - Disabled; 1 - (default) Enabled. |
api.access | integer | Whether access to API is enabled. Possible values: 0 - Disabled; 1 - (default) Enabled. |
api.mode | integer | Mode for treating API methods listed in the api property.Possible values: 0 - (default) Deny list; 1 - Allow list. |
api | array | Array of API methods. |
actions | array | Array of the action objects. |
actions.default_access | integer | Whether access to new actions is enabled. Possible values: 0 - Disabled; 1 - (default) Enabled. |
The UI element object has the following properties:
Property | Type | Description |
---|---|---|
name (required) |
string | Name of the UI element. Possible values for users of any type: monitoring.dashboard - Monitoring → Dashboard;monitoring.problems - Monitoring → Problems;monitoring.hosts - Monitoring → Hosts;monitoring.overview - Monitoring → Overview;monitoring.latest_data - Monitoring → Latest data;monitoring.maps - Monitoring → Maps;monitoring.services - Monitoring → Services;inventory.overview - Inventory → Overview;inventory.hosts - Inventory → Hosts;reports.availability_report - Reports → Availability report;reports.top_triggers - Reports → Triggers top 100.Possible values only for users of Admin and Super admin user types: monitoring.discovery - Monitoring → Discovery;reports.scheduled_reports - Reports → Scheduled reports;reports.notifications - Reports → Notifications;configuration.host_groups - Configuration → Host groups;configuration.templates - Configuration → Templates;configuration.hosts - Configuration → Hosts;configuration.maintenance - Configuration → Maintenance;configuration.actions - Configuration → Actions;configuration.discovery - Configuration → Discovery.Possible values only for users of Super admin user type: reports.system_info - Reports → System information;reports.audit - Reports → Audit;reports.action_log - Reports → Action log;configuration.event_correlation - Configuration → Event correlation;administration.general - Administration → General;administration.proxies - Administration → Proxies;administration.authentication - Administration → Authentication;administration.user_groups - Administration → User groups;administration.user_roles - Administration → User roles;administration.users - Administration → Users;administration.media_types - Administration → Media types;administration.scripts - Administration → Scripts;administration.queue - Administration → Queue. |
status | integer | Whether access to the UI element is enabled. Possible values: 0 - Disabled; 1 - (default) Enabled. |
Propiedad | Tipo | Descripción |
---|---|---|
serviceid (obligatorio) |
cadena | ID del Servicio. |
Propiedad | Tipo | Descripción |
---|---|---|
tag (obligatorio) |
cadena | Nombre de etiqueta. Si se especifica una cadena vacía, la etiqueta de servicio no se utilizará para la coincidencia de servicios. |
value | cadena | Valor de etiqueta. Si no se especifica ningún valor o una cadena vacía, solo se utilizará el nombre de la etiqueta para la coincidencia del servicio. |
El objeto module tiene las siguientes propiedades:
Propiedad | Tipo | Descripción |
---|---|---|
moduleid (obligatorio) |
cadena | ID del módulo. |
status | entero | Si el acceso al módulo está habilitado. Valores posibles: 0 - Deshabilitado; 1 - (predeterminado) Habilitado. |
El objeto action tiene las siguientes propiedades:
Propiedad | Tipo | Descripción |
---|---|---|
name (obligatorio) |
cadena | Nombre de la acción. Valores posibles para usuarios de cualquier tipo: edit_dashboards - Crear y editar tableros;edit_maps - Crear y editar mapas;add_problem_comments - Agregar comentarios de problemas;change_severity - Cambiar la gravedad del problema;acknowledge_problems - Reconocer problemas;close_problems - Cerrar problemas; execute_scripts - Ejecutar scripts;manage_api_tokens - Administrar tokens API.Valores posibles solo para usuarios de los tipos de usuario Admin y Super admin: edit_maintenance - Crear y editar mantenimientos;manage_scheduled_reports - Administrar informes programados;manage_sla - Administrar SLA. |
status | entero | Si el acceso para realizar la acción está habilitado. Valores posibles: 0 - Deshabilitado; 1 - (predeterminado) Habilitado. |