> Role object

The following objects are directly related to the role API.

Role

The role object has the following properties:

PropertyTypeDescription
roleidstring(readonly) ID of the role.
name
(required)
stringName of the role.
type
(required)
integerUser type.

Possible values:
1 - (default) User;
2 - Admin;
3 - Super admin.
readonlyinteger(readonly) Whether the role is readonly.

Possible values:
0 - (default) No;
1 - Yes.

Role rules

The role rules object has the following properties:

PropertyTypeDescription
uiarrayArray of the UI element objects.
ui.default_accessintegerWhether access to new UI elements is enabled.

Possible values:
0 - Disabled;
1 - (default) Enabled.
services.read.modeintegerRead-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.listarrayArray 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.tagobjectArray 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.modeintegerRead-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.listarrayArray 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.tagobjectArray 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.
modulesarrayArray of the module objects.
modules.default_accessintegerWhether access to new modules is enabled.

Possible values:
0 - Disabled;
1 - (default) Enabled.
api.accessintegerWhether access to API is enabled.

Possible values:
0 - Disabled;
1 - (default) Enabled.
api.modeintegerMode for treating API methods listed in the api property.

Possible values:
0 - (default) Deny list;
1 - Allow list.
apiarrayArray of API methods.
actionsarrayArray of the action objects.
actions.default_accessintegerWhether access to new actions is enabled.

Possible values:
0 - Disabled;
1 - (default) Enabled.

UI element

The UI element object has the following properties:

PropertyTypeDescription
name
(required)
stringName 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.
statusintegerWhether access to the UI element is enabled.

Possible values:
0 - Disabled;
1 - (default) Enabled.

Service

PropertyTypeDescription
serviceid
(required)
stringID of the Service.

Service tag

PropertyTypeDescription
tag
(required)
stringTag name.

If empty string is specified, the service tag will not be used for service matching.
valuestringTag value.

If no value or empty string is specified, only the tag name will be used for service matching.

Module

The module object has the following properties:

PropertyTypeDescription
moduleid
(required)
stringID of the module.
statusintegerWhether access to the module is enabled.

Possible values:
0 - Disabled;
1 - (default) Enabled.

Action

The action object has the following properties:

PropertyTypeDescription
name
(required)
stringName of the action.

Possible values for users of any type:
edit_dashboards - Create and edit dashboards;
edit_maps - Create and edit maps;
add_problem_comments - Add problem comments;
change_severity - Change problem severity;
acknowledge_problems - Acknowledge problems;
close_problems - Close problems;
execute_scripts - Execute scripts;
manage_api_tokens - Manage API tokens.

Possible values only for users of Admin and Super admin user types:
edit_maintenance - Create and edit maintenances;
manage_scheduled_reports - Manage scheduled reports.
statusintegerWhether access to perform the action is enabled.

Possible values:
0 - Disabled;
1 - (default) Enabled.