Many more endpoints are available but not included in this document yet. Please refer to the OnPrem API page if you are looking for a specific endpoint. Bear in mind that not all endpoints described in the OnPrem API page are available on a cloud platform, in particular those related to the administration of the Centreon platform.
There are two modes of authentication:
Return all host configurations.
The available parameters to search / sort_by are:
| limit | integer >= 1 Default: 10 Example: limit=20 Number of items per page |
| page | integer >= 1 Default: 1 Example: page=4 Number of the requested page |
| search | string Retrieve only data matching the defined search value.
A simple search can be done like in the following example
Available search operators are:
Examples without nested aggregators:
Example with nested aggregators:
|
| sort_by | string Example: sort_by={"host.name":"ASC"} Sort the resulting data by its properties |
{- "result": [
- {
- "id": 1,
- "name": "Centreon-Server",
- "alias": "",
- "address": "127.0.0.1",
- "monitoring_server": {
- "id": 1,
- "name": "Central"
}, - "templates": [
- {
- "id": 2,
- "name": "generic-host"
}
], - "normal_check_interval": 5,
- "retry_check_interval": 1,
- "check_timeperiod": {
- "id": 1,
- "name": "24x7"
}, - "severity": {
- "id": 1,
- "name": "Priority 1"
}, - "categories": [
- {
- "id": 1,
- "name": "host-category-name"
}
], - "groups": [
- {
- "id": 1,
- "name": "host-group-name"
}
], - "is_activated": true
}
], - "meta": {
- "page": 1,
- "limit": 10,
- "search": { },
- "sort_by": { },
- "total": 1
}
}Create a host configuration
| monitoring_server_id required | integer ID of the host's monitoring server |
| name required | string Host name |
| address required | string IP or domain of the host |
| alias | string Host alias |
| snmp_community | string or null Community of the SNMP agent |
| snmp_version | string or null Enum: 1 "2c" 3 Version of the SNMP agent. The value can be |
| geo_coords | string or null Geographic coordinates of the host |
| timezone_id | integer or null Timezone ID |
| severity_id | integer or null Severity ID |
| check_timeperiod_id | integer or null Check command timeperiod ID |
| max_check_attempts | integer or null Define the number of times that the monitoring engine will retry the host check command if it returns any non-OK state |
| normal_check_interval | integer or null Define the number of 'time units' between regularly scheduled checks of the host. With the default time unit of 60s, this number will mean multiples of 1 minute. |
| retry_check_interval | integer or null Define the number of "time units" to wait before scheduling a re-check for this host after a non-UP state was detected. With the default time unit of 60s, this number will mean multiples of 1 minute. Once the host has been retried max_check_attempts times without a change in its status, it will revert to being scheduled at its "normal" check interval rate. |
| note_url | string or null <= 65535 characters Define an optional URL that can be used to provide more information about the host. |
| note | string or null <= 65535 characters Define an optional note. |
| action_url | string or null <= 65535 characters Define an optional URL that can be used to provide more actions to be performed on the host. |
| icon_id | integer or null Define the ID of the image that should be associated with this host |
| is_activated | boolean or null Indicates whether the host is activated or not |
| categories | Array of integers Define the host category IDs that should be associated with this host |
| groups | Array of integers Define the host group IDs that should be associated with this host |
| templates | Array of integers Define the parent host template IDs that should be associated with this host. The order of the IDs determines the inheritance priority order. |
Array of objects Host macros defined for the host (directly or through a template or command inheritance) If multiple macros are defined with the same name, only the last one will be saved. |
{- "monitoring_server_id": 0,
- "name": "generic-active-host",
- "address": "127.0.0.1",
- "alias": "generic-active-host",
- "snmp_community": "string",
- "snmp_version": "2c",
- "geo_coords": "48.10,12.5",
- "timezone_id": 1,
- "severity_id": 1,
- "check_timeperiod_id": 1,
- "max_check_attempts": 0,
- "normal_check_interval": 0,
- "retry_check_interval": 0,
- "note_url": "string",
- "note": "string",
- "action_url": "string",
- "icon_id": 1,
- "is_activated": true,
- "categories": [
- 1,
- 15,
- 8
], - "groups": [
- 1,
- 15,
- 8
], - "templates": [
- 3,
- 12
], - "macros": [
- {
- "name": "MacroName",
- "value": "macroValue",
- "is_password": false,
- "description": "Some text to describe the macro"
}
]
}{- "id": 1,
- "monitoring_server_id": 1,
- "name": "generic-active-host",
- "address": "127.0.0.1",
- "alias": "generic-active-host",
- "snmp_community": "string",
- "snmp_version": "2c",
- "geo_coords": "48.10,12.5",
- "timezone_id": 1,
- "severity_id": 1,
- "check_timeperiod_id": 1,
- "max_check_attempts": 0,
- "normal_check_interval": 0,
- "retry_check_interval": 0,
- "note_url": "string",
- "note": "string",
- "action_url": "string",
- "icon_id": 1,
- "is_activated": true,
- "categories": [
- {
- "id": 1,
- "name": "host-category-name"
}
], - "groups": [
- {
- "id": 1,
- "name": "host-group-name"
}
], - "templates": [
- {
- "id": 1,
- "name": "parent-template-name"
}
], - "macros": [
- {
- "name": "MacroName",
- "value": "macroValue",
- "is_password": false,
- "description": "Some text to describe the macro"
}
]
}Partially update a host configuration.
| host_id required | integer >= 1 Example: 1 Host ID |
| monitoring_server_id | integer ID of the host's monitoring server |
| name | string Host name |
| address | string IP or domain of the host |
| alias | string Host alias |
| snmp_community | string or null Community of the SNMP agent |
| snmp_version | string or null Enum: 1 "2c" 3 Version of the SNMP agent. The value can be |
| geo_coords | string or null Geographic coordinates of the host |
| timezone_id | integer or null Timezone ID |
| severity_id | integer or null Severity ID |
| check_timeperiod_id | integer or null Check command timeperiod ID |
| max_check_attempts | integer or null Define the number of times that the monitoring engine will retry the host check command if it returns any non-OK state |
| normal_check_interval | integer or null Define the number of 'time units' between regularly scheduled checks of the host. With the default time unit of 60s, this number will mean multiples of 1 minute. |
| retry_check_interval | integer or null Define the number of "time units" to wait before scheduling a re-check for this host after a non-UP state was detected. With the default time unit of 60s, this number will mean multiples of 1 minute. Once the host has been retried max_check_attempts times without a change in its status, it will revert to being scheduled at its "normal" check interval rate. |
| event_handler_enabled | integer Indicates whether the event handler is enabled or not
|
| event_handler_command_id | integer or null Event handler command ID |
| note_url | string or null <= 65535 characters Define an optional URL that can be used to provide more information about the host. |
| note | string or null <= 65535 characters Define an optional note. |
| action_url | string or null <= 65535 characters Define an optional URL that can be used to provide more actions to be performed on the host. |
| icon_id | integer or null Define the ID of the image that should be associated with this host |
| is_activated | boolean or null Indicates whether the host is activated or not |
| categories | Array of integers Define the host category IDs that should be associated with this host |
| groups | Array of integers Define the host group IDs that should be associated with this host |
| templates | Array of integers Define the parent host template IDs that should be associated with this host. The order of the IDs determines the inheritance priority order. |
Array of objects Host macros defined for the host (directly or through a template or command inheritance) If multiple macros are defined with the same name, only the last one will be saved. |
{- "monitoring_server_id": 0,
- "name": "generic-active-host",
- "address": "127.0.0.1",
- "alias": "generic-active-host",
- "snmp_community": "string",
- "snmp_version": "2c",
- "geo_coords": "48.10,12.5",
- "timezone_id": 1,
- "severity_id": 1,
- "check_timeperiod_id": 1,
- "max_check_attempts": 0,
- "normal_check_interval": 0,
- "retry_check_interval": 0,
- "event_handler_enabled": 0,
- "event_handler_command_id": 1,
- "note_url": "string",
- "note": "string",
- "action_url": "string",
- "icon_id": 1,
- "is_activated": true,
- "categories": [
- 1,
- 15,
- 8
], - "groups": [
- 1,
- 15,
- 8
], - "templates": [
- 3,
- 12
], - "macros": [
- {
- "name": "MacroName",
- "value": "macroValue",
- "is_password": false,
- "description": "Some text to describe the macro"
}
]
}{- "code": 400,
- "message": "Property 'name' not found"
}Return all host group configurations.
The available parameters to search / sort_by are:
| limit | integer >= 1 Default: 10 Example: limit=20 Number of items per page |
| page | integer >= 1 Default: 1 Example: page=4 Number of the requested page |
| search | string Retrieve only data matching the defined search value.
A simple search can be done like in the following example
Available search operators are:
Examples without nested aggregators:
Example with nested aggregators:
|
| sort_by | string Example: sort_by={"host.name":"ASC"} Sort the resulting data by its properties |
{- "result": [
- {
- "id": 1,
- "name": "MySQL-Servers",
- "alias": "All MySQL Servers",
- "icon_id": 1,
- "geo_coords": "48.51,2.20",
- "is_activated": true
}
], - "meta": {
- "page": 1,
- "limit": 10,
- "search": { },
- "sort_by": { },
- "total": 1
}
}Add a new host group configuration.
Mandatory body properties are:
| name | string <= 200 characters Host group name |
| alias | string or null <= 200 characters Host group alias |
| icon_id | integer or null Define the image ID that should be associated with this host group |
| geo_coords | string or null <= 32 characters Geographical coordinates use by Centreon Map module to position element on map |
| is_activated | boolean Indicates whether the host group is activated or not |
{- "name": "MySQL-Servers",
- "alias": "All MySQL Servers",
- "icon_id": 1,
- "geo_coords": "48.51,2.20",
- "is_activated": true
}{- "id": 1,
- "name": "MySQL-Servers",
- "alias": "All MySQL Servers",
- "icon_id": 1,
- "geo_coords": "48.51,2.20",
- "is_activated": true
}Find an existing host group.
| hostgroup_id required | integer <int64> Example: 5 ID of the host group |
{- "id": 1,
- "name": "MySQL-Servers",
- "alias": "All MySQL Servers",
- "icon_id": 1,
- "geo_coords": "48.51,2.20",
- "is_activated": true
}Update an existing host group.
| hostgroup_id required | integer <int64> Example: 5 ID of the host group |
| name | string <= 200 characters Host group name |
| alias | string or null <= 200 characters Host group alias |
| icon_id | integer or null Define the image ID that should be associated with this host group |
| geo_coords | string or null <= 32 characters Geographical coordinates use by Centreon Map module to position element on map |
| is_activated | boolean Indicates whether the host group is activated or not |
{- "name": "MySQL-Servers",
- "alias": "All MySQL Servers",
- "icon_id": 1,
- "geo_coords": "48.51,2.20",
- "is_activated": true
}{- "code": 400,
- "message": "Property 'name' not found"
}Return all host template configurations.
The available parameters to search / sort_by are:
| limit | integer >= 1 Default: 10 Example: limit=20 Number of items per page |
| page | integer >= 1 Default: 1 Example: page=4 Number of the requested page |
| search | string Retrieve only data matching the defined search value.
A simple search can be done like in the following example
Available search operators are:
Examples without nested aggregators:
Example with nested aggregators:
|
| sort_by | string Example: sort_by={"host.name":"ASC"} Sort the resulting data by its properties |
{- "result": [
- {
- "id": 1,
- "name": "generic-active-host",
- "alias": "generic-active-host",
- "snmp_community": "string",
- "snmp_version": "2c",
- "timezone_id": 1,
- "severity_id": 1,
- "check_timeperiod_id": 1,
- "max_check_attempts": 0,
- "normal_check_interval": 0,
- "retry_check_interval": 0,
- "note_url": "string",
- "note": "string",
- "action_url": "string",
- "icon_id": 1,
- "is_locked": true
}
], - "meta": {
- "page": 1,
- "limit": 10,
- "search": { },
- "sort_by": { },
- "total": 1
}
}Create a host template configuration
| name required | string Host template name |
| alias required | string Host template alias |
| snmp_community | string or null Community of the SNMP agent |
| snmp_version | string or null Enum: 1 "2c" 3 Version of the SNMP agent. The value can be |
| timezone_id | integer or null Timezone ID |
| severity_id | integer or null Severity ID |
| check_timeperiod_id | integer or null Check command timeperiod ID |
| max_check_attempts | integer or null Define the number of times that the monitoring engine will retry the host check command if it returns any non-OK state |
| nornal_check_interval | integer or null Define the number of 'time units' between regularly scheduled checks of the host. With the default time unit of 60s, this number will mean multiples of 1 minute. |
| retry_check_interval | integer or null Define the number of "time units" to wait before scheduling a re-check for this host after a non-UP state was detected. With the default time unit of 60s, this number will mean multiples of 1 minute. Once the host has been retried max_check_attempts times without a change in its status, it will revert to being scheduled at its "normal" check interval rate. |
| note_url | string or null <= 65535 characters Define an optional URL that can be used to provide more information about the host. |
| note | string or null <= 65535 characters Define an optional note. |
| action_url | string or null <= 65535 characters Define an optional URL that can be used to provide more actions to be performed on the host. |
| icon_id | integer or null Define the image ID that should be associated with this host template |
| categories | Array of integers Define the host category IDs that should be associated with this host template |
| templates | Array of integers Define the parent host templates IDs that should be associated with this host template. The order of the IDs determine the inheritance priority order. |
Array of objects Host macros defined for the host (directly or through a template or command inheritance) If multiple macros are defined with the same name, only the last one will be saved. |
{- "name": "generic-active-host",
- "alias": "generic-active-host",
- "snmp_community": "string",
- "snmp_version": "2c",
- "timezone_id": 1,
- "severity_id": 1,
- "check_timeperiod_id": 1,
- "max_check_attempts": 0,
- "nornal_check_interval": 0,
- "retry_check_interval": 0,
- "note_url": "string",
- "note": "string",
- "action_url": "string",
- "icon_id": 1,
- "categories": [
- 1,
- 15,
- 8
], - "templates": [
- 3,
- 12
], - "macros": [
- {
- "name": "MacroName",
- "value": "macroValue",
- "is_password": false,
- "description": "Some text to describe the macro"
}
]
}{- "id": 1,
- "name": "generic-active-host",
- "alias": "generic-active-host",
- "snmp_community": "string",
- "snmp_version": "2c",
- "timezone_id": 1,
- "severity_id": 1,
- "check_timeperiod_id": 1,
- "max_check_attempts": 0,
- "normal_check_interval": 0,
- "retry_check_interval": 0,
- "note_url": "string",
- "note": "string",
- "action_url": "string",
- "icon_id": 1,
- "is_locked": true,
- "categories": [
- {
- "id": 1,
- "name": "host-category-name"
}
], - "templates": [
- {
- "id": 1,
- "name": "parent-template-name"
}
], - "macros": [
- {
- "name": "MacroName",
- "value": "macroValue",
- "is_password": false,
- "description": "Some text to describe the macro"
}
]
}Partially update a host template configuration.
| host_template_id required | integer >= 1 Example: 1 Host template ID |
Array of objects Host macros defined for the host (directly or through a template or command inheritance) If multiple macros are defined with the same name, only the last one will be saved. | |
| categories | Array of integers Define the host category IDs that should be associated with this host template In the case of non-admin users, only categories the user has access to will be accepted and their association to the host template created or deleted. |
| templates | Array of integers Define the parent host templates IDs that should be associated with this host template. The order of the IDs determine the inheritance priority order. |
| name | string Host template name |
| alias | string Host template alias |
| snmp_community | string or null Community of the SNMP agent |
| snmp_version | string or null Enum: 1 "2c" 3 Version of the SNMP agent. The value can be |
| timezone_id | integer or null Timezone ID |
| severity_id | integer or null Severity ID |
| check_timeperiod_id | integer or null Check command timeperiod ID |
| max_check_attempts | integer or null Define the number of times that the monitoring engine will retry the host check command if it returns any non-OK state |
| normal_check_interval | integer or null Define the number of 'time units' between regularly scheduled checks of the host. With the default time unit of 60s, this number will mean multiples of 1 minute. |
| retry_check_interval | integer or null Define the number of "time units" to wait before scheduling a re-check for this host after a non-UP state was detected. With the default time unit of 60s, this number will mean multiples of 1 minute. Once the host has been retried max_check_attempts times without a change in its status, it will revert to being scheduled at its "normal" check interval rate. |
| event_handler_enabled | integer Indicates whether the event handler is enabled or not
|
| event_handler_command_id | integer or null Event handler command ID |
| note_url | string or null <= 65535 characters Define an optional URL that can be used to provide more information about the host. |
| note | string or null <= 65535 characters Define an optional note. |
| action_url | string or null <= 65535 characters Define an optional URL that can be used to provide more actions to be performed on the host. |
| icon_id | integer or null Define the image ID that should be associated with this host template |
{- "macros": [
- {
- "name": "MacroName",
- "value": "macroValue",
- "is_password": false,
- "description": "Some text to describe the macro"
}
], - "categories": [
- 1,
- 15,
- 8
], - "templates": [
- 3,
- 12
], - "name": "generic-active-host",
- "alias": "generic-active-host",
- "snmp_community": "string",
- "snmp_version": "2c",
- "timezone_id": 1,
- "severity_id": 1,
- "check_timeperiod_id": 1,
- "max_check_attempts": 0,
- "normal_check_interval": 0,
- "retry_check_interval": 0,
- "event_handler_enabled": 0,
- "event_handler_command_id": 1,
- "note_url": "string",
- "note": "string",
- "action_url": "string",
- "icon_id": 1
}{- "code": 400,
- "message": "Property 'name' not found"
}Create a notification
This endpoint is accessible for SaaS platforms only
| name | string Name of the notification |
| is_activated | boolean |
| timeperiod_id | integer Timeperiod during which the notification is sent |
| users | Array of integers Users to whom the notification is sent |
| contactgroups | Array of integers Contact Groups to whom the notification is sent |
Array of objects (Notification.Message) | |
Array of objects Resource configurations that trigger a notification |
{- "name": "Notification-A",
- "is_activated": true,
- "timeperiod_id": 0,
- "users": [
- 0
], - "contactgroups": [
- 0
], - "messages": [
- {
- "channel": "Slack",
- "subject": "string",
- "message": "string",
- "formatted_message": "string"
}
], - "resources": [
- {
- "type": "string",
- "events": 0,
- "ids": [
- 0
], - "extra": {
- "event_services": 0
}
}
]
}{- "code": 400,
- "message": "Property 'name' not found"
}Return all notifications.
The available parameters to search are:
| limit | integer >= 1 Default: 10 Example: limit=20 Number of items per page |
| page | integer >= 1 Default: 1 Example: page=4 Number of the requested page |
| search | string Retrieve only data matching the defined search value.
A simple search can be done like in the following example
Available search operators are:
Examples without nested aggregators:
Example with nested aggregators:
|
{- "result": [
- {
- "id": 0,
- "is_activated": true,
- "name": "string",
- "user_count": 0,
- "channels": [
- "string"
], - "resources": [
- {
- "type": "string",
- "count": 0
}
], - "timeperiod": {
- "id": 0,
- "name": "string"
}
}
], - "meta": {
- "page": 1,
- "limit": 10,
- "search": { },
- "sort_by": { },
- "total": 1
}
}Delete multiple notification configurations
This endpoint is accessible for SaaS platforms only
| ids | Array of integers List of notification IDs to delete |
{- "ids": [
- 0
]
}{- "results": [
- {
- "href": "/path/to/entity/1",
- "status": 404,
- "message": "Not found"
}
]
}Get the details of a notification
This endpoint is accessible for SaaS platforms only
| notification_id required | integer >= 1 Example: 1 Notification ID |
{- "code": 403,
- "message": "You are not authorized to access this resource"
}Update the details of a notification
This endpoint is accessible for SaaS platforms only
| notification_id required | integer >= 1 Example: 1 Notification ID |
| name | string Name of the notification |
| is_activated | boolean |
| timeperiod_id | integer Timeperiod during which the notification is sent |
| users | Array of integers Users to whom the notification is sent |
| contactgroups | Array of integers Contact Groups to whom the notification is sent |
Array of objects (Notification.Message) | |
Array of objects Resource configurations that trigger a notification |
{- "name": "Notification-A",
- "is_activated": true,
- "timeperiod_id": 0,
- "users": [
- 0
], - "contactgroups": [
- 0
], - "messages": [
- {
- "channel": "Slack",
- "subject": "string",
- "message": "string",
- "formatted_message": "string"
}
], - "resources": [
- {
- "type": "string",
- "events": 0,
- "ids": [
- 0
], - "extra": {
- "event_services": 0
}
}
]
}{- "code": 400,
- "message": "Property 'name' not found"
}Partial update of a notification definition
This endpoint does not handle all notification properties.
The following notification properties are supported in version 23.10 and above:
| notification_id required | integer >= 1 Example: 1 Notification ID |
| is_activated | boolean |
{- "is_activated": true
}{- "code": 400,
- "message": "Property 'name' not found"
}Delete a notification This endpoint is accessible for SaaS platforms only
| notification_id required | integer >= 1 Example: 1 Notification ID |
{- "code": 403,
- "message": "You are not authorized to access this resource"
}Return all resources: hosts, services, business activities and configured events triggering a notification rule.
{- "uid": "547a4e6270e51d63b23b982097aa8386",
- "result": [
- {
- "notification_id": 2,
- "hosts": [
- {
- "id": 13,
- "name": "Host 1",
- "alias": "Host 1",
- "event": 5,
- "services": [
- {
- "id": 15,
- "name": "Ping",
- "alias": "Ping",
- "event": 5
}
]
}
]
}
]
}Return a list of notification methods/channels and contacts by notification id.
{- "notification_id": 2,
- "channels": {
- "email": {
- "contacts": [
- {
- "full_name": "John Doe",
- "email_address": "john.doe@localhost"
}
], - "subject": "Email subject",
- "formatted_message": "This is a formatted message"
}, - "slack": {
- "slack_channel": "supervisors",
- "message": "This is a Slack message"
}, - "sms": {
- "phone_number": "+33123456789",
- "message": "This is an SMS message"
}
}
}Return all resource access rules configurations.
The available parameters to search / sort_by are:
| limit | integer >= 1 Default: 10 Example: limit=20 Number of items per page |
| page | integer >= 1 Default: 1 Example: page=4 Number of the requested page |
| search | string Retrieve only data matching the defined search value.
A simple search can be done like in the following example
Available search operators are:
Examples without nested aggregators:
Example with nested aggregators:
|
| sort_by | string Example: sort_by={"host.name":"ASC"} Sort the resulting data by its properties |
{- "result": [
- {
- "id": 1,
- "name": "Rule_for_viewers",
- "description": "Rule that will be applied to all viewers",
- "is_enabled": true
}
], - "meta": {
- "page": 1,
- "limit": 10,
- "search": { },
- "sort_by": { },
- "total": 1
}
}Create a resource access rule configuration
| name required | string Resource access rule name |
required | object |
required | object |
| description | string or null Short description of the rule |
| is_enabled | boolean Indicate the status of the rule enabled/disabled |
required | Array of objects or null (DatasetFilter) |
{- "name": "Rule for viewers",
- "contacts": {
- "ids": [
- 1,
- 2,
- 3
], - "all": true
}, - "contact_groups": {
- "ids": [
- 1,
- 2,
- 3
], - "all": true
}, - "description": "Rule dedicated for users with limited rights",
- "is_enabled": true,
- "dataset_filters": [
- {
- "type": "host",
- "resources": [
- 1,
- 2
], - "dataset_filter": { }
}
]
}{- "name": "Rule for viewers",
- "contacts": {
- "ids": [
- 1,
- 2,
- 3
], - "all": true
}, - "contact_groups": {
- "ids": [
- 1,
- 2,
- 3
], - "all": true
}, - "description": "Rule dedicated for users with limited rights",
- "is_enabled": true,
- "dataset_filters": [
- {
- "type": "host",
- "resources": [
- 1,
- 2
], - "dataset_filter": { }
}
]
}Return information about the resource access rule identified by the ID provided
| rule_id required | integer >= 1 Example: 1 Resource access rule ID |
{- "id": 1,
- "name": "Rule_for_viewers",
- "description": "Rule that will be applied to all viewers",
- "contacts": {
- "values": [
- {
- "id": 1,
- "name": "string"
}
], - "all": false
}, - "contact_groups": {
- "values": [
- {
- "id": 1,
- "name": "string"
}
], - "all": false
}, - "is_enabled": true,
- "dataset_filters": [
- {
- "type": "host",
- "resources": [
- {
- "id": 1,
- "name": "Server"
}
], - "dataset_filter": { }
}
]
}Update a resource access rule configuration
| rule_id required | integer >= 1 Example: 1 Resource access rule ID |
| name required | string Resource access rule name |
required | object |
required | object |
| description | string or null Short description of the rule |
| is_enabled | boolean Indicate the status of the rule enabled/disabled |
required | Array of objects or null (DatasetFilter) |
{- "name": "Rule for viewers",
- "contacts": {
- "ids": [
- 1,
- 2,
- 3
], - "all": true
}, - "contact_groups": {
- "ids": [
- 1,
- 2,
- 3
], - "all": true
}, - "description": "Rule dedicated for users with limited rights",
- "is_enabled": true,
- "dataset_filters": [
- {
- "type": "host",
- "resources": [
- 1,
- 2
], - "dataset_filter": { }
}
]
}{- "code": 400,
- "message": "Property 'name' not found"
}Delete a resource access rule configuration.
| rule_id required | integer >= 1 Example: 1 Resource access rule ID |
{- "code": 403,
- "message": "You are not authorized to access this resource"
}Partial update of resource access rule configuration. The available parameters to update are:
| rule_id required | integer >= 1 Example: 1 Resource access rule ID |
| name | string Resource access rule name |
| description | string or null Short description of the rule |
| is_enabled | boolean Indicate the status of the rule enabled/disabled |
{- "name": "Rule for viewers",
- "description": "Rule dedicated for users with limited rights",
- "is_enabled": true
}{- "code": 400,
- "message": "Property 'name' not found"
}Delete multiple resource access rule configurations
| ids | Array of integers List of resource access rule IDs to delete |
{- "ids": [
- 0
]
}{- "results": [
- {
- "href": "/path/to/entity/1",
- "status": 404,
- "message": "Not found"
}
]
}Add services to a host based on associated host templates
{- "services": [
- {
- "id": 1,
- "name": "generic-service",
- "host_id": 1,
- "geo_coords": "48.10,12.5",
- "service_template_id": null,
- "check_timeperiod_id": null,
- "max_check_attempts": 0,
- "normal_check_interval": 0,
- "retry_check_interval": 0,
- "note": "string",
- "note_url": "string",
- "action_url": "string",
- "icon_id": null,
- "severity_id": 1
}
]
}Add a service configuration
| name required | string Service name. |
| host_id required | integer ID of the host linked to this service. |
| geo_coords | string or null Geographic coordinates of the service |
| service_template_id | integer >= 1 Template ID of the service template. |
| check_timeperiod_id | integer or null >= 1 Time period ID of the check command. |
| max_check_attempts | integer or null Define the number of times that the monitoring engine will retry the service check command if it returns any non-OK state. |
| normal_check_interval | integer or null Define the number of 'time units' between regularly scheduled checks of the service. With the default time unit of 60s, this number will mean multiples of 1 minute. |
| retry_check_interval | integer or null Define the number of "time units" to wait before scheduling a re-check for this service after a non-OK state was detected. With the default time unit of 60s, this number will mean multiples of 1 minute. Once the service has been retried max_check_attempts times without a change in its status, it will revert to being scheduled at its "normal" check interval rate. |
| note | string or null <= 65535 characters Define an optional note. |
| note_url | string or null <= 65535 characters Define an optional URL that can be used to provide more information about the service. |
| action_url | string or null <= 65535 characters Define an optional URL that can be used to specify actions to be performed on the service. |
| icon_id | integer or null >= 1 Define the image ID that should be associated with this service. |
| severity_id | integer or null >= 1 Severity ID. |
| service_categories | Array of integers |
| service_groups | Array of integers |
Array of objects (macro) Macros defined for the service (directly or through a template or command inheritance) If multiple macros are defined with the same name, only the last one will be saved. |
{- "name": "generic-service",
- "host_id": 1,
- "geo_coords": "48.10,12.5",
- "service_template_id": null,
- "check_timeperiod_id": null,
- "max_check_attempts": 0,
- "normal_check_interval": 0,
- "retry_check_interval": 0,
- "note": "string",
- "note_url": "string",
- "action_url": "string",
- "icon_id": null,
- "severity_id": 1,
- "service_categories": [
- 1,
- 2
], - "service_groups": [
- 1,
- 2
], - "macros": [
- {
- "name": "MacroName",
- "value": "macroValue",
- "is_password": false,
- "description": "Some text to describe the macro"
}
]
}{- "id": 1,
- "name": "generic-service",
- "host_id": 1,
- "geo_coords": "48.10,12.5",
- "service_template_id": null,
- "check_timeperiod_id": null,
- "max_check_attempts": 0,
- "normal_check_interval": 0,
- "retry_check_interval": 0,
- "note": "string",
- "note_url": "string",
- "action_url": "string",
- "icon_id": null,
- "severity_id": 1,
- "categories": [
- {
- "id": 1,
- "name": "service-category-name"
}
], - "groups": [
- {
- "id": 1,
- "name": "service-group-name"
}
], - "macros": [
- {
- "name": "MacroName",
- "value": "macroValue",
- "is_password": false,
- "description": "Some text to describe the macro"
}
]
}Return all service configurations.
The available parameters to search by are:
| limit | integer >= 1 Default: 10 Example: limit=20 Number of items per page |
| page | integer >= 1 Default: 1 Example: page=4 Number of the requested page |
| search | string Retrieve only data matching the defined search value.
A simple search can be done like in the following example
Available search operators are:
Examples without nested aggregators:
Example with nested aggregators:
|
| sort_by | string Example: sort_by={"host.name":"ASC"} Sort the resulting data by its properties |
{- "result": [
- {
- "id": 1,
- "name": "generic-service",
- "host": {
- "id": 12,
- "name": "entity-name"
}, - "service_template": {
- "id": 12,
- "name": "entity-name"
}, - "check_timeperiod": {
- "id": 12,
- "name": "entity-name"
}, - "notification_timeperiod": {
- "id": 12,
- "name": "entity-name"
}, - "severity": {
- "id": 12,
- "name": "entity-name"
}, - "categories": [
- {
- "id": 12,
- "name": "entity-name"
}
], - "groups": [
- {
- "id": 12,
- "name": "sg-name",
- "host_id": 12,
- "host_name": "host-name"
}
], - "normal_check_interval": 0,
- "retry_check_interval": 0,
- "is_activated": true
}
], - "meta": {
- "page": 1,
- "limit": 10,
- "search": { },
- "sort_by": { },
- "total": 1
}
}Partial update of a service configuration
| service_id required | integer >= 1 Example: 1 Service ID |
| name | string Service name. |
| host_id | integer ID of the host linked to this service. |
| geo_coords | string or null Geographic coordinates of the service |
| service_template_id | integer or null >= 1 Template ID of the service template. |
| check_timeperiod_id | integer or null >= 1 Time period ID of the check command. |
| max_check_attempts | integer or null Define the number of times that the monitoring engine will retry the service check command if it returns any non-OK state. |
| normal_check_interval | integer or null Define the number of 'time units' between regularly scheduled checks of the service. With the default time unit of 60s, this number will mean multiples of 1 minute. |
| retry_check_interval | integer or null Define the number of "time units" to wait before scheduling a re-check for this service after a non-OK state was detected. With the default time unit of 60s, this number will mean multiples of 1 minute. Once the service has been retried max_check_attempts times without a change in its status, it will revert to being scheduled at its "normal" check interval rate. |
| note | string or null <= 65535 characters Define an optional note. |
| note_url | string or null <= 65535 characters Define an optional URL that can be used to provide more information about the service. |
| action_url | string or null <= 65535 characters Define an optional URL that can be used to specify actions to be performed on the service. |
| icon_id | integer or null >= 1 Define the image ID that should be associated with this service. |
| severity_id | integer or null >= 1 Severity ID. |
| is_activated | boolean Indicates whether the service is activated or not |
| service_categories | Array of integers |
| service_groups | Array of integers |
Array of objects (macro) Macros defined for the service (directly or through a template or command inheritance) If multiple macros are defined with the same name, only the last one will be saved. |
{- "name": "generic-service",
- "host_id": 1,
- "geo_coords": "48.10,12.5",
- "service_template_id": null,
- "check_timeperiod_id": null,
- "max_check_attempts": 0,
- "normal_check_interval": 0,
- "retry_check_interval": 0,
- "note": "string",
- "note_url": "string",
- "action_url": "string",
- "icon_id": null,
- "severity_id": 1,
- "is_activated": true,
- "service_categories": [
- 1,
- 2
], - "service_groups": [
- 1,
- 2
], - "macros": [
- {
- "name": "MacroName",
- "value": "macroValue",
- "is_password": false,
- "description": "Some text to describe the macro"
}
]
}{- "code": 403,
- "message": "You are not authorized to access this resource"
}Return all service template configurations.
The available parameters to search / sort_by are:
| limit | integer >= 1 Default: 10 Example: limit=20 Number of items per page |
| page | integer >= 1 Default: 1 Example: page=4 Number of the requested page |
| search | string Retrieve only data matching the defined search value.
A simple search can be done like in the following example
Available search operators are:
Examples without nested aggregators:
Example with nested aggregators:
|
| sort_by | string Example: sort_by={"host.name":"ASC"} Sort the resulting data by its properties |
{- "result": [
- {
- "id": 1,
- "is_locked": true,
- "name": "generic-service",
- "alias": "generic-service",
- "service_template_id": null,
- "check_command_id": null,
- "check_command_args": [
- "80",
- "90"
], - "event_handler_enabled": 2,
- "event_handler_command_id": 1,
- "check_timeperiod_id": null,
- "max_check_attempts": 0,
- "normal_check_interval": 0,
- "retry_check_interval": 0,
- "note": "string",
- "note_url": "string",
- "action_url": "string",
- "icon_id": null,
- "severity_id": 1,
- "host_templates": [
- 1,
- 2
], - "service_categories": [
- 1,
- 2
], - "service_groups": [
- {
- "service_group_id": 1,
- "host_template_id": 2
}
], - "macros": [
- {
- "name": "MacroName",
- "value": "macroValue",
- "is_password": false,
- "description": "Some text to describe the macro"
}
]
}
], - "meta": {
- "page": 1,
- "limit": 10,
- "search": { },
- "sort_by": { },
- "total": 1
}
}Add a service template configuration
| name required | string Service template name. |
| alias required | string Service template alias. |
| service_template_id | integer or null >= 1 Template ID of the service template. |
| check_command_id | integer or null >= 1 Check command ID. |
| check_command_args | Array of strings |
| event_handler_enabled | integer Indicates whether the event handler is enabled or not
|
| event_handler_command_id | integer or null >= 1 Event handler command ID. |
| check_timeperiod_id | integer or null >= 1 Time period ID of the check command. |
| max_check_attempts | integer or null Define the number of times that the monitoring engine will retry the service check command if it returns any non-OK state. |
| normal_check_interval | integer or null Define the number of 'time units' between regularly scheduled checks of the service. With the default time unit of 60s, this number will mean multiples of 1 minute. |
| retry_check_interval | integer or null Define the number of "time units" to wait before scheduling a re-check for this service after a non-OK state was detected. With the default time unit of 60s, this number will mean multiples of 1 minute. Once the service has been retried max_check_attempts times without a change in its status, it will revert to being scheduled at its "normal" check interval rate. |
| note | string or null <= 65535 characters Define an optional note. |
| note_url | string or null <= 65535 characters Define an optional URL that can be used to provide more information about the service. |
| action_url | string or null <= 65535 characters Define an optional URL that can be used to specify actions to be performed on the service. |
| icon_id | integer or null >= 1 Define the image ID that should be associated with this service template. |
| severity_id | integer or null >= 1 Severity ID. |
| host_templates | Array of integers |
| service_categories | Array of integers |
Array of objects | |
Array of objects (macro) Macros defined for the service (directly or through a template or command inheritance) If multiple macros are defined with the same name, only the last one will be saved. |
{- "name": "generic-service",
- "alias": "generic-service",
- "service_template_id": null,
- "check_command_id": null,
- "check_command_args": [
- "80",
- "90"
], - "event_handler_enabled": 2,
- "event_handler_command_id": 1,
- "check_timeperiod_id": null,
- "max_check_attempts": 0,
- "normal_check_interval": 0,
- "retry_check_interval": 0,
- "note": "string",
- "note_url": "string",
- "action_url": "string",
- "icon_id": null,
- "severity_id": 1,
- "host_templates": [
- 1,
- 2
], - "service_categories": [
- 1,
- 2
], - "service_groups": [
- {
- "service_group_id": 1,
- "host_template_id": 2
}
], - "macros": [
- {
- "name": "MacroName",
- "value": "macroValue",
- "is_password": false,
- "description": "Some text to describe the macro"
}
]
}{- "code": 400,
- "message": "Property 'name' not found"
}Partial update of a service template configuration
| service_template_id required | integer >= 1 Example: 1 Service template ID |
| name | string Service template name. |
| alias | string Service template alias. |
| service_template_id | integer or null >= 1 Template ID of the service template. |
| check_timeperiod_id | integer >= 1 Time period ID of the check command. |
| max_check_attempts | integer Define the number of times that the monitoring engine will retry the service check command if it returns any non-OK state. |
| normal_check_interval | integer Define the number of 'time units' between regularly scheduled checks of the service. With the default time unit of 60s, this number will mean multiples of 1 minute. |
| retry_check_interval | integer Define the number of "time units" to wait before scheduling a re-check for this service after a non-OK state was detected. With the default time unit of 60s, this number will mean multiples of 1 minute. Once the service has been retried max_check_attempts times without a change in its status, it will revert to being scheduled at its "normal" check interval rate. |
| note | string or null <= 65535 characters Define an optional note. |
| note_url | string or null <= 65535 characters Define an optional URL that can be used to provide more information about the service. |
| action_url | string or null <= 65535 characters Define an optional URL that can be used to specify actions to be performed on the service. |
| icon_id | integer or null >= 1 Define the image ID that should be associated with this service template. |
| severity_id | integer or null >= 1 Severity ID. |
| host_templates | Array of integers |
| service_categories | Array of integers |
Array of objects (macro) Macros defined for the service (directly or through a template or command inheritance) If multiple macros are defined with the same name, only the last one will be saved. | |
Array of objects |
{- "name": "generic-service",
- "alias": "generic-service",
- "service_template_id": null,
- "check_timeperiod_id": 1,
- "max_check_attempts": 0,
- "normal_check_interval": 0,
- "retry_check_interval": 0,
- "note": "string",
- "note_url": "string",
- "action_url": "string",
- "icon_id": null,
- "severity_id": 1,
- "host_templates": [
- 1,
- 2
], - "service_categories": [
- 1,
- 2
], - "macros": [
- {
- "name": "MacroName",
- "value": "macroValue",
- "is_password": false,
- "description": "Some text to describe the macro"
}
], - "service_groups": [
- {
- "service_group_id": 1,
- "host_template_id": 2
}
]
}{- "code": 403,
- "message": "You are not authorized to access this resource"
}