There are two modes of authentication:
search | string Retrieve only data matching the defined search value.
Simple search can be done like the following example:
Available search operators are:
Examples without nested aggregators:
Example with nested aggregators:
|
limit | integer >= 1 Default: 10 Example: limit=20 Number of items per pages |
page | integer >= 1 Default: 1 Example: page=4 Number of the requested page |
sort_by | object Example: sort_by={"host.name":"ASC"} Sort the resulted data by its properties |
{- "result": [
- {
- "id": 34,
- "author_id": 3,
- "author_name": "admin",
- "comment": "Acknowledged by admin",
- "deletion_time": "2019-08-24T14:15:22Z",
- "entry_time": "2019-08-24T14:15:22Z",
- "host_id": 12,
- "poller_id": 1,
- "is_notify_contacts": false,
- "is_persistent_comment": true,
- "is_sticky": true,
- "state": 1,
- "service_id": 5
}
], - "meta": {
- "page": 1,
- "limit": 10,
- "search": { },
- "sort_by": { },
- "total": 1
}
}
object (Disacknowledgement.Resource) | |
Array of objects (Monitoring.Resource.Action) |
{- "disacknowledgement": {
- "with_services": true
}, - "resources": [
- {
- "type": "service|host",
- "id": 12,
- "parent": {
- "id": 12
}
}
]
}
{- "code": 400,
- "message": "Property 'name' not found"
}
Display one acknowledgement.
acknowledgement_id required | integer <int64> Example: 227 ID of the acknowledgement |
{- "id": 34,
- "author_id": 3,
- "author_name": "admin",
- "comment": "Acknowledged by admin",
- "deletion_time": "2019-08-24T14:15:22Z",
- "entry_time": "2019-08-24T14:15:22Z",
- "host_id": 12,
- "poller_id": 1,
- "is_notify_contacts": false,
- "is_persistent_comment": true,
- "is_sticky": true,
- "state": 1,
- "service_id": 5
}
search | string Retrieve only data matching the defined search value.
Simple search can be done like the following example:
Available search operators are:
Examples without nested aggregators:
Example with nested aggregators:
|
limit | integer >= 1 Default: 10 Example: limit=20 Number of items per pages |
page | integer >= 1 Default: 1 Example: page=4 Number of the requested page |
sort_by | object Example: sort_by={"host.name":"ASC"} Sort the resulted data by its properties |
{- "result": [
- {
- "id": 34,
- "author_id": 3,
- "author_name": "admin",
- "comment": "Acknowledged by admin",
- "deletion_time": "2019-08-24T14:15:22Z",
- "entry_time": "2019-08-24T14:15:22Z",
- "host_id": 12,
- "poller_id": 1,
- "is_notify_contacts": false,
- "is_persistent_comment": true,
- "is_sticky": true,
- "state": 1
}
], - "meta": {
- "page": 1,
- "limit": 10,
- "search": { },
- "sort_by": { },
- "total": 1
}
}
comment | string Short description of the acknowledgement |
is_notify_contacts | boolean Indicates whether notification is sent to the contacts linked to the host or service |
is_persistent_comment | boolean Indicates whether acknowledgement is maintained in the case of a restart of the scheduler |
is_sticky | boolean Indicates whether acknowledgement is maintained in the case of a change of status |
with_services | boolean Indicates whether we should add the downtime on the host-related services |
resource_id | integer <int64> ID of the resource |
parent_resource_id | integer or null <int64> ID of the parent resource (eg: host id) |
[- {
- "comment": "Acknowledged by admin",
- "is_notify_contacts": false,
- "is_persistent_comment": true,
- "is_sticky": true,
- "with_services": true,
- "resource_id": 12,
- "parent_resource_id": 5
}
]
{- "code": 400,
- "message": "Property 'name' not found"
}
search | string Retrieve only data matching the defined search value.
Simple search can be done like the following example:
Available search operators are:
Examples without nested aggregators:
Example with nested aggregators:
|
limit | integer >= 1 Default: 10 Example: limit=20 Number of items per pages |
page | integer >= 1 Default: 1 Example: page=4 Number of the requested page |
sort_by | object Example: sort_by={"host.name":"ASC"} Sort the resulted data by its properties |
{- "result": [
- {
- "id": 34,
- "author_id": 3,
- "author_name": "admin",
- "comment": "Acknowledged by admin",
- "deletion_time": "2019-08-24T14:15:22Z",
- "entry_time": "2019-08-24T14:15:22Z",
- "host_id": 12,
- "poller_id": 1,
- "is_notify_contacts": false,
- "is_persistent_comment": true,
- "is_sticky": true,
- "state": 1,
- "service_id": 5
}
], - "meta": {
- "page": 1,
- "limit": 10,
- "search": { },
- "sort_by": { },
- "total": 1
}
}
comment | string Short description of the acknowledgement |
is_notify_contacts | boolean Indicates whether notification is sent to the contacts linked to the host or service |
is_persistent_comment | boolean Indicates whether acknowledgement is maintained in the case of a restart of the scheduler |
is_sticky | boolean Indicates whether acknowledgement is maintained in the case of a change of status |
resource_id | integer <int64> ID of the resource |
parent_resource_id | integer or null <int64> ID of the parent resource (eg: host id) |
[- {
- "comment": "Acknowledged by admin",
- "is_notify_contacts": false,
- "is_persistent_comment": true,
- "is_sticky": true,
- "resource_id": 12,
- "parent_resource_id": 5
}
]
{- "code": 400,
- "message": "Property 'name' not found"
}
host_id required | integer <int64> Example: 12 ID of the host |
search | string Retrieve only data matching the defined search value.
Simple search can be done like the following example:
Available search operators are:
Examples without nested aggregators:
Example with nested aggregators:
|
limit | integer >= 1 Default: 10 Example: limit=20 Number of items per pages |
page | integer >= 1 Default: 1 Example: page=4 Number of the requested page |
sort_by | object Example: sort_by={"host.name":"ASC"} Sort the resulted data by its properties |
{- "result": [
- {
- "id": 34,
- "author_id": 3,
- "author_name": "admin",
- "comment": "Acknowledged by admin",
- "deletion_time": "2019-08-24T14:15:22Z",
- "entry_time": "2019-08-24T14:15:22Z",
- "host_id": 12,
- "poller_id": 1,
- "is_notify_contacts": false,
- "is_persistent_comment": true,
- "is_sticky": true,
- "state": 1
}
], - "meta": {
- "page": 1,
- "limit": 10,
- "search": { },
- "sort_by": { },
- "total": 1
}
}
host_id required | integer <int64> Example: 12 ID of the host |
comment | string Short description of the acknowledgement |
is_notify_contacts | boolean Indicates whether notification is sent to the contacts linked to the host or service |
is_persistent_comment | boolean Indicates whether acknowledgement is maintained in the case of a restart of the scheduler |
is_sticky | boolean Indicates whether acknowledgement is maintained in the case of a change of status |
with_services | boolean Indicates whether we should add the downtime on the host-related services |
{- "comment": "Acknowledged by admin",
- "is_notify_contacts": false,
- "is_persistent_comment": true,
- "is_sticky": true,
- "with_services": true
}
{- "code": 400,
- "message": "Property 'name' not found"
}
host_id required | integer <int64> Example: 12 ID of the host |
service_id required | integer <int64> Example: 5 ID of the service |
search | string Retrieve only data matching the defined search value.
Simple search can be done like the following example:
Available search operators are:
Examples without nested aggregators:
Example with nested aggregators:
|
limit | integer >= 1 Default: 10 Example: limit=20 Number of items per pages |
page | integer >= 1 Default: 1 Example: page=4 Number of the requested page |
sort_by | object Example: sort_by={"host.name":"ASC"} Sort the resulted data by its properties |
{- "result": [
- {
- "id": 34,
- "author_id": 3,
- "author_name": "admin",
- "comment": "Acknowledged by admin",
- "deletion_time": "2019-08-24T14:15:22Z",
- "entry_time": "2019-08-24T14:15:22Z",
- "host_id": 12,
- "poller_id": 1,
- "is_notify_contacts": false,
- "is_persistent_comment": true,
- "is_sticky": true,
- "state": 1,
- "service_id": 5
}
], - "meta": {
- "page": 1,
- "limit": 10,
- "search": { },
- "sort_by": { },
- "total": 1
}
}
host_id required | integer <int64> Example: 12 ID of the host |
service_id required | integer <int64> Example: 5 ID of the service |
comment | string Short description of the acknowledgement |
is_notify_contacts | boolean Indicates whether notification is sent to the contacts linked to the host or service |
is_persistent_comment | boolean Indicates whether acknowledgement is maintained in the case of a restart of the scheduler |
is_sticky | boolean Indicates whether acknowledgement is maintained in the case of a change of status |
{- "comment": "Acknowledged by admin",
- "is_notify_contacts": false,
- "is_persistent_comment": true,
- "is_sticky": true
}
{- "code": 400,
- "message": "Property 'name' not found"
}
host_id required | integer <int64> Example: 12 ID of the host |
service_id required | integer <int64> Example: 5 ID of the service |
{- "code": 400,
- "message": "Property 'name' not found"
}
meta_id required | integer <int64> Example: 1 ID of the meta service |
search | string Retrieve only data matching the defined search value.
Simple search can be done like the following example:
Available search operators are:
Examples without nested aggregators:
Example with nested aggregators:
|
limit | integer >= 1 Default: 10 Example: limit=20 Number of items per pages |
page | integer >= 1 Default: 1 Example: page=4 Number of the requested page |
sort_by | object Example: sort_by={"host.name":"ASC"} Sort the resulted data by its properties |
{- "result": [
- {
- "id": 34,
- "author_id": 3,
- "author_name": "admin",
- "comment": "Acknowledged by admin",
- "deletion_time": "2019-08-24T14:15:22Z",
- "entry_time": "2019-08-24T14:15:22Z",
- "host_id": 12,
- "poller_id": 1,
- "is_notify_contacts": false,
- "is_persistent_comment": true,
- "is_sticky": true,
- "state": 1,
- "service_id": 5
}
], - "meta": {
- "page": 1,
- "limit": 10,
- "search": { },
- "sort_by": { },
- "total": 1
}
}
meta_id required | integer <int64> Example: 1 ID of the meta service |
comment | string Short description of the acknowledgement |
is_notify_contacts | boolean Indicates whether notification is sent to the contacts linked to the host or service |
is_persistent_comment | boolean Indicates whether acknowledgement is maintained in the case of a restart of the scheduler |
is_sticky | boolean Indicates whether acknowledgement is maintained in the case of a change of status |
{- "comment": "Acknowledged by admin",
- "is_notify_contacts": false,
- "is_persistent_comment": true,
- "is_sticky": true
}
{- "code": 400,
- "message": "Property 'name' not found"
}
object (Acknowledgement.Resource) | |
Array of objects (Monitoring.Resource.Action) |
{- "acknowledgement": {
- "comment": "Acknowledged by admin",
- "with_services": true,
- "is_notify_contacts": false,
- "is_persistent_comment": false,
- "is_sticky": false,
- "force_active_checks": false
}, - "resources": [
- {
- "type": "service|host",
- "id": 12,
- "parent": {
- "id": 12
}
}
]
}
{- "code": 400,
- "message": "Property 'name' not found"
}
{- "password_security_policy": {
- "password_min_length": 12,
- "has_uppercase": true,
- "has_lowercase": true,
- "has_number": true,
- "has_special_character": true,
- "attempts": 5,
- "blocking_duration": 900,
- "password_expiration": {
- "expiration_delay": 15552000,
- "excluded_users": [
- "admin"
]
}, - "can_reuse_passwords": false,
- "delay_before_new_password": 3600
}
}
required | object |
{- "password_security_policy": {
- "password_min_length": 12,
- "has_uppercase": true,
- "has_lowercase": true,
- "has_number": true,
- "has_special_character": true,
- "attempts": 5,
- "blocking_duration": 900,
- "password_expiration": {
- "expiration_delay": 15552000,
- "excluded_users": [
- "admin"
]
}, - "can_reuse_passwords": false,
- "delay_before_new_password": 3600
}
}
{- "code": 403,
- "message": "You are not authorized to access this resource"
}
{- "is_active": true,
- "is_forced": false,
- "authorization_endpoint": "/authorize",
- "token_endpoint": "/token",
- "introspection_token_endpoint": "/introspect",
- "userinfo_endpoint": "/userinfo",
- "endsession_endpoint": "/logout",
- "connection_scopes": [
- "openid"
], - "login_claim": "sub",
- "client_id": "client_id",
- "client_secret": "client_secret",
- "authentication_type": "client_secret_post",
- "verify_peer": true,
- "auto_import": true,
- "contact_template": {
- "id": 1,
- "name": "Default"
}, - "email_bind_attribute": "email",
- "fullname_bind_attribute": "name",
- "authentication_conditions": {
- "trusted_client_addresses": [
- "127.0.0.1"
], - "blacklist_client_addresses": [
- "127.0.0.1"
], - "is_enabled": true,
- "attribute_path": "info.items.prop1",
- "endpoint": {
- "type": "introspection_endpoint",
- "custom_endpoint": "string"
}, - "authorized_values": [
- "string"
]
}, - "groups_mapping": {
- "is_enabled": true,
- "attribute_path": "info.items.groups",
- "endpoint": {
- "type": "introspection_endpoint",
- "custom_endpoint": "string"
}, - "relations": [
- {
- "group_value": "group1",
- "contact_group": {
- "id": 1,
- "name": "cg1"
}
}
]
}, - "roles_mapping": {
- "is_enabled": true,
- "apply_only_first_role": true,
- "attribute_path": "info.items.role",
- "endpoint": {
- "type": "introspection_endpoint",
- "custom_endpoint": "string"
}, - "relations": [
- {
- "claim_value": "scope",
- "priority": 1,
- "access_group": {
- "id": 1,
- "name": "Default"
}
}
]
},
}
is_active required | boolean Indicates whether the provider is active or not |
is_forced required | boolean Indicates whether the provider is forced or not |
base_url required | string or null Base URL of the provider |
authorization_endpoint required | string or null Authorization endpoint of the provider |
token_endpoint required | string or null Token endpoint of the provider |
introspection_token_endpoint required | string or null Introspection token endpoint of the provider |
userinfo_endpoint required | string or null Userinfo endpoint of the provider |
endsession_endpoint required | string or null Endsession endpoint of the provider |
connection_scopes required | Array of strings List of scopes to request |
login_claim required | string or null Claim used to login |
client_id required | string or null Client ID |
client_secret required | string or null Client secret |
authentication_type required | string or null Enum: "client_secret_post" "client_secret_basic" Authentication type |
verify_peer required | boolean Verify peer |
auto_import required | boolean Auto import user from external provider |
required | object or null |
email_bind_attribute required | string or null Email bind attribute |
fullname_bind_attribute required | string or null Fullname bind attribute |
object | |
object | |
object | |
redirect_url required | string or null custom redirect url |
{- "is_active": true,
- "is_forced": false,
- "authorization_endpoint": "/authorize",
- "token_endpoint": "/token",
- "introspection_token_endpoint": "/introspect",
- "userinfo_endpoint": "/userinfo",
- "endsession_endpoint": "/logout",
- "connection_scopes": [
- "openid"
], - "login_claim": "sub",
- "client_id": "client_id",
- "client_secret": "client_secret",
- "authentication_type": "client_secret_post",
- "verify_peer": true,
- "auto_import": true,
- "contact_template": {
- "id": 1,
- "name": "Default"
}, - "email_bind_attribute": "email",
- "fullname_bind_attribute": "name",
- "authentication_conditions": {
- "trusted_client_addresses": [
- "127.0.0.1"
], - "blacklist_client_addresses": [
- "127.0.0.1"
], - "is_enabled": true,
- "attribute_path": "info.items.prop1",
- "endpoint": {
- "type": "introspection_endpoint",
- "custom_endpoint": "string"
}, - "authorized_values": [
- "string"
]
}, - "groups_mapping": {
- "is_enabled": true,
- "attribute_path": "info.items.groups",
- "endpoint": {
- "type": "introspection_endpoint",
- "custom_endpoint": "string"
}, - "relations": [
- {
- "group_value": "group1",
- "contact_group_id": 1
}
]
}, - "roles_mapping": {
- "is_enabled": true,
- "apply_only_first_role": true,
- "attribute_path": "info.items.role",
- "endpoint": {
- "type": "introspection_endpoint",
- "custom_endpoint": "string"
}, - "relations": [
- {
- "claim_value": "scope",
- "priority": 1,
- "access_group_id": 1
}
]
},
}
{- "code": 403,
- "message": "You are not authorized to access this resource"
}
{- "is_active": true,
- "is_forced": false,
- "certificate": "string",
- "user_id_attribute": "string",
- "logout_from": true,
- "auto_import": true,
- "contact_template": {
- "id": 1,
- "name": "Default"
}, - "email_bind_attribute": "email",
- "fullname_bind_attribute": "name",
- "authentication_conditions": {
- "is_enabled": true,
- "attribute_path": "info.items.prop1",
- "authorized_values": [
- "string"
]
}, - "groups_mapping": {
- "is_enabled": true,
- "attribute_path": "info.items.groups",
- "relations": [
- {
- "group_value": "group1",
- "contact_group": {
- "id": 1,
- "name": "cg1"
}
}
]
}, - "roles_mapping": {
- "is_enabled": true,
- "apply_only_first_role": true,
- "attribute_path": "info.items.role",
- "relations": [
- {
- "claim_value": "scope",
- "priority": 1,
- "access_group": {
- "id": 1,
- "name": "Default"
}
}
]
}
}
is_active required | boolean Indicates whether the provider is active or not |
is_forced required | boolean Indicates whether the provider is forced or not |
remote_login_url required | string Indicates the remote login URL |
entity_id_url required | string Indicates the issuer URL |
certificate required | string IDP certificate |
user_id_attribute required | string |
logout_from required | boolean Logout |
logout_from_url | string or null Indicates the logout URL |
auto_import | boolean Auto import user from external provider |
required | object or null |
email_bind_attribute required | string or null Email bind attribute |
fullname_bind_attribute required | string or null Fullname bind attribute |
object | |
object | |
object |
{- "is_active": true,
- "is_forced": false,
- "certificate": "string",
- "user_id_attribute": "string",
- "logout_from": true,
- "auto_import": true,
- "contact_template": {
- "id": 1,
- "name": "Default"
}, - "email_bind_attribute": "email",
- "fullname_bind_attribute": "name",
- "authentication_conditions": {
- "is_enabled": true,
- "attribute_path": "info.items.prop1",
- "authorized_values": [
- "string"
]
}, - "groups_mapping": {
- "is_enabled": true,
- "attribute_path": "info.items.groups",
- "relations": [
- {
- "group_value": "group1",
- "contact_group_id": 1
}
]
}, - "roles_mapping": {
- "is_enabled": true,
- "apply_only_first_role": true,
- "attribute_path": "info.items.role",
- "relations": [
- {
- "claim_value": "scope",
- "priority": 1,
- "access_group_id": 1
}
]
}
}
{- "code": 403,
- "message": "You are not authorized to access this resource"
}
{- "is_active": true,
- "is_forced": false,
- "trusted_client_addresses": [
- "127.0.0.1"
], - "blacklist_client_addresses": [
- "127.0.0.1"
], - "login_header_attribute": "HTTP_AUTH_USER",
- "pattern_matching_login": "/@.*/",
- "pattern_replace_login": "/@.*/"
}
is_active required | boolean Indicates whether the provider is active or not |
is_forced required | boolean Indicates whether the provider is forced or not |
trusted_client_addresses required | Array of strings List of trusted client addresses |
blacklist_client_addresses required | Array of strings List of blacklisted client addresses |
login_header_attribute required | string or null Header used to retrieve user's login |
pattern_matching_login required | string or null Pattern to search for in the login header attribute name |
pattern_replace_login required | string or null String that will replace the string defined in the Pattern match login (regex) field |
{- "is_active": true,
- "is_forced": false,
- "trusted_client_addresses": [
- "127.0.0.1"
], - "blacklist_client_addresses": [
- "127.0.0.1"
], - "login_header_attribute": "HTTP_AUTH_USER",
- "pattern_matching_login": "/@.*/",
- "pattern_replace_login": "/@.*/"
}
{- "code": 403,
- "message": "You are not authorized to access this resource"
}
{- "monitoring_default_downtime_duration": 3600,
- "monitoring_default_refresh_interval": 15,
- "monitoring_default_acknowledgement_persistent": true,
- "monitoring_default_acknowledgement_sticky": true,
- "monitoring_default_acknowledgement_notify": true,
- "monitoring_default_acknowledgement_force_active_checks": true,
- "monitoring_default_acknowledgement_with_services": true,
- "monitoring_default_downtime_fixed": true,
- "monitoring_default_downtime_with_services": true
}
vault_id required | integer <int64> Example: 1 ID of vault provider |
name required | string Vault configuration name |
address required | string Vault URL or IP |
port required | integer Vault Port |
root_path required | string Vault root storage path |
role_id required | string Vault role id |
secret_id required | string Vault secret id |
{- "name": "centreon_vault",
- "address": "127.0.0.1",
- "port": 8200,
- "root_path": "centreon",
- "role_id": "string",
- "secret_id": "string"
}
{- "code": 400,
- "message": "Property 'name' not found"
}
vault_id required | integer <int64> Example: 1 ID of vault provider |
{- "result": [
- {
- "id": 1,
- "name": "centreon_vault",
- "vault_id": 1,
- "address": "127.0.0.1",
- "port": 8200,
- "root_path": "centreon",
- "role_id": "string"
}
], - "meta": {
- "page": 1,
- "limit": 10,
- "search": { },
- "sort_by": { },
- "total": 1
}
}
vault_id required | integer <int64> Example: 1 ID of vault provider |
vault_configuration_id required | integer <int64> Example: 1 ID of existing vault configuration |
address required | string Vault URL or IP |
port required | integer Vault Port |
role_id required | string Vault role id |
secret_id required | string Vault secret id |
{- "address": "127.0.0.1",
- "port": 8200,
- "role_id": "string",
- "secret_id": "string"
}
{- "code": 400,
- "message": "Property 'name' not found"
}
vault_id required | integer <int64> Example: 1 ID of vault provider |
vault_configuration_id required | integer <int64> Example: 1 ID of existing vault configuration |
{- "code": 403,
- "message": "You are not authorized to access this resource"
}
vault_id required | integer <int64> Example: 1 ID of vault provider |
vault_configuration_id required | integer <int64> Example: 1 ID of existing vault configuration |
{- "id": 1,
- "name": "centreon_vault",
- "vault_id": 1,
- "address": "127.0.0.1",
- "port": 8200,
- "root_path": "centreon",
- "role_id": "string"
}
Entry point to retrieve an authentication token.
Authentication schema
object |
{- "security": {
- "credentials": {
- "login": "admin",
- "password": "centreon"
}
}
}
{- "contact": {
- "id": 3,
- "name": "Admin",
- "alias": "admin",
- "email": "admin@localhost.com",
- "is_admin": true
}, - "security": {
- "token": "9ed937d3911d212eae59300ac6977352"
}
}
alias required | string Alias of the user |
old_password | string Old user password |
new_password | string New user password |
{- "old_password": "Centreon!2021",
- "new_password": "Centreon!2022"
}
{- "code": 400,
- "message": "Property 'name' not found"
}
Endpoint to list active existing providers configuration
[- {
- "id": 1,
- "type": "local",
- "name": "local",
- "authentication_uri": "/centreon/authentication/providers/configurations/local",
- "is_active": true,
- "is_forced": false
}
]
provider_configuration_name required | string Example: local |
login | string |
password | string |
{- "login": "admin",
- "password": "centreon"
}
{- "redirect_uri": "/centreon/main.php?p=50113&o=ldap"
}
List all downtimes
The available parameters to search / sort_by are:
search | string Retrieve only data matching the defined search value.
Simple search can be done like the following example:
Available search operators are:
Examples without nested aggregators:
Example with nested aggregators:
|
limit | integer >= 1 Default: 10 Example: limit=20 Number of items per pages |
page | integer >= 1 Default: 1 Example: page=4 Number of the requested page |
sort_by | object Example: sort_by={"host.name":"ASC"} Sort the resulted data by its properties |
{- "result": [
- {
- "id": 329,
- "author_id": 3,
- "author_name": "admin",
- "host_id": 12,
- "comment": "Downtime set by admin",
- "duration": 7200,
- "entry_time": "2019-08-24T14:15:22Z",
- "start_time": "2019-08-24T14:15:22Z",
- "end_time": "2019-08-24T14:15:22Z",
- "deletion_time": null,
- "actual_start_time": "2019-08-24T14:15:22Z",
- "actual_end_time": null,
- "is_started": true,
- "is_cancelled": false,
- "is_fixed": true,
- "service_id": 5
}
], - "meta": {
- "page": 1,
- "limit": 10,
- "search": { },
- "sort_by": { },
- "total": 1
}
}
Display one downtime.
downtime_id required | integer <int64> Example: 329 ID of the downtime |
{- "id": 329,
- "author_id": 3,
- "author_name": "admin",
- "host_id": 12,
- "comment": "Downtime set by admin",
- "duration": 7200,
- "entry_time": "2019-08-24T14:15:22Z",
- "start_time": "2019-08-24T14:15:22Z",
- "end_time": "2019-08-24T14:15:22Z",
- "deletion_time": null,
- "actual_start_time": "2019-08-24T14:15:22Z",
- "actual_end_time": null,
- "is_started": true,
- "is_cancelled": false,
- "is_fixed": true,
- "service_id": 5
}
List all downtimes of hosts
The available parameters to search / sort_by are:
search | string Retrieve only data matching the defined search value.
Simple search can be done like the following example:
Available search operators are:
Examples without nested aggregators:
Example with nested aggregators:
|
limit | integer >= 1 Default: 10 Example: limit=20 Number of items per pages |
page | integer >= 1 Default: 1 Example: page=4 Number of the requested page |
sort_by | object Example: sort_by={"host.name":"ASC"} Sort the resulted data by its properties |
{- "result": [
- {
- "id": 329,
- "author_id": 3,
- "author_name": "admin",
- "host_id": 12,
- "comment": "Downtime set by admin",
- "duration": 7200,
- "entry_time": "2019-08-24T14:15:22Z",
- "start_time": "2019-08-24T14:15:22Z",
- "end_time": "2019-08-24T14:15:22Z",
- "deletion_time": null,
- "actual_start_time": "2019-08-24T14:15:22Z",
- "actual_end_time": null,
- "is_started": true,
- "is_cancelled": false,
- "is_fixed": true
}
], - "meta": {
- "page": 1,
- "limit": 10,
- "search": { },
- "sort_by": { },
- "total": 1
}
}
start_time | string <date-time> Scheduled start date of the downtime (ISO8601) |
end_time | string <date-time> Scheduled end date of the downtime (ISO8601) |
is_fixed | boolean Indicates whether the downtime is fixed |
duration | integer Downtime duration in seconds |
comment | string Comment of the downtime |
with_services | boolean Indicates whether we should add the downtime on the host-related services |
resource_id | integer <int64> ID of the resource |
parent_resource_id | integer or null <int64> ID of the parent resource (eg: host id) |
[- {
- "start_time": "2019-08-24T14:15:22Z",
- "end_time": "2019-08-24T14:15:22Z",
- "is_fixed": true,
- "duration": 3600,
- "comment": "Downtime set by admin",
- "with_services": true,
- "resource_id": 12,
- "parent_resource_id": 5
}
]
{- "code": 400,
- "message": "Property 'name' not found"
}
List all downtimes of services
The available parameters to search / sort_by are:
search | string Retrieve only data matching the defined search value.
Simple search can be done like the following example:
Available search operators are:
Examples without nested aggregators:
Example with nested aggregators:
|
limit | integer >= 1 Default: 10 Example: limit=20 Number of items per pages |
page | integer >= 1 Default: 1 Example: page=4 Number of the requested page |
sort_by | object Example: sort_by={"host.name":"ASC"} Sort the resulted data by its properties |
{- "result": [
- {
- "id": 329,
- "author_id": 3,
- "author_name": "admin",
- "host_id": 12,
- "comment": "Downtime set by admin",
- "duration": 7200,
- "entry_time": "2019-08-24T14:15:22Z",
- "start_time": "2019-08-24T14:15:22Z",
- "end_time": "2019-08-24T14:15:22Z",
- "deletion_time": null,
- "actual_start_time": "2019-08-24T14:15:22Z",
- "actual_end_time": null,
- "is_started": true,
- "is_cancelled": false,
- "is_fixed": true,
- "service_id": 5
}
], - "meta": {
- "page": 1,
- "limit": 10,
- "search": { },
- "sort_by": { },
- "total": 1
}
}
start_time | string <date-time> Scheduled start date of the downtime (ISO8601) |
end_time | string <date-time> Scheduled end date of the downtime (ISO8601) |
is_fixed | boolean Indicates whether the downtime is fixed |
duration | integer Downtime duration in seconds |
comment | string Comment of the downtime |
resource_id | integer <int64> ID of the resource |
parent_resource_id | integer or null <int64> ID of the parent resource (eg: host id) |
[- {
- "start_time": "2019-08-24T14:15:22Z",
- "end_time": "2019-08-24T14:15:22Z",
- "is_fixed": true,
- "duration": 3600,
- "comment": "Downtime set by admin",
- "resource_id": 12,
- "parent_resource_id": 5
}
]
{- "code": 400,
- "message": "Property 'name' not found"
}
List all downtimes of a host.
The available parameters to search / sort_by are:
host_id required | integer <int64> Example: 12 ID of the host |
show_service | boolean Default: false Example: show_service=true Allows to display services belonging to items |
search | string Retrieve only data matching the defined search value.
Simple search can be done like the following example:
Available search operators are:
Examples without nested aggregators:
Example with nested aggregators:
|
limit | integer >= 1 Default: 10 Example: limit=20 Number of items per pages |
page | integer >= 1 Default: 1 Example: page=4 Number of the requested page |
sort_by | object Example: sort_by={"host.name":"ASC"} Sort the resulted data by its properties |
{- "result": [
- {
- "id": 329,
- "author_id": 3,
- "author_name": "admin",
- "host_id": 12,
- "comment": "Downtime set by admin",
- "duration": 7200,
- "entry_time": "2019-08-24T14:15:22Z",
- "start_time": "2019-08-24T14:15:22Z",
- "end_time": "2019-08-24T14:15:22Z",
- "deletion_time": null,
- "actual_start_time": "2019-08-24T14:15:22Z",
- "actual_end_time": null,
- "is_started": true,
- "is_cancelled": false,
- "is_fixed": true
}
], - "meta": {
- "page": 1,
- "limit": 10,
- "search": { },
- "sort_by": { },
- "total": 1
}
}
Add a downtime on a host.
host_id required | integer <int64> Example: 12 ID of the host |
start_time | string <date-time> Scheduled start date of the downtime (ISO8601) |
end_time | string <date-time> Scheduled end date of the downtime (ISO8601) |
is_fixed | boolean Indicates whether the downtime is fixed |
duration | integer Downtime duration in seconds |
comment | string Comment of the downtime |
with_services | boolean Indicates whether we should add the downtime on the host-related services |
{- "start_time": "2019-08-24T14:15:22Z",
- "end_time": "2019-08-24T14:15:22Z",
- "is_fixed": true,
- "duration": 3600,
- "comment": "Downtime set by admin",
- "with_services": true
}
{- "code": 400,
- "message": "Property 'name' not found"
}
List all downtimes of a service.
The available parameters to search / sort_by are:
host_id required | integer <int64> Example: 12 ID of the host |
service_id required | integer <int64> Example: 5 ID of the service |
search | string Retrieve only data matching the defined search value.
Simple search can be done like the following example:
Available search operators are:
Examples without nested aggregators:
Example with nested aggregators:
|
limit | integer >= 1 Default: 10 Example: limit=20 Number of items per pages |
page | integer >= 1 Default: 1 Example: page=4 Number of the requested page |
sort_by | object Example: sort_by={"host.name":"ASC"} Sort the resulted data by its properties |
{- "result": [
- {
- "id": 329,
- "author_id": 3,
- "author_name": "admin",
- "host_id": 12,
- "comment": "Downtime set by admin",
- "duration": 7200,
- "entry_time": "2019-08-24T14:15:22Z",
- "start_time": "2019-08-24T14:15:22Z",
- "end_time": "2019-08-24T14:15:22Z",
- "deletion_time": null,
- "actual_start_time": "2019-08-24T14:15:22Z",
- "actual_end_time": null,
- "is_started": true,
- "is_cancelled": false,
- "is_fixed": true,
- "service_id": 5
}
], - "meta": {
- "page": 1,
- "limit": 10,
- "search": { },
- "sort_by": { },
- "total": 1
}
}
Add a downtime on a service.
host_id required | integer <int64> Example: 12 ID of the host |
service_id required | integer <int64> Example: 5 ID of the service |
start_time | string <date-time> Scheduled start date of the downtime (ISO8601) |
end_time | string <date-time> Scheduled end date of the downtime (ISO8601) |
is_fixed | boolean Indicates whether the downtime is fixed |
duration | integer Downtime duration in seconds |
comment | string Comment of the downtime |
{- "start_time": "2019-08-24T14:15:22Z",
- "end_time": "2019-08-24T14:15:22Z",
- "is_fixed": true,
- "duration": 3600,
- "comment": "Downtime set by admin"
}
{- "code": 400,
- "message": "Property 'name' not found"
}
List all downtimes of a service.
The available parameters to search / sort_by are:
meta_id required | integer <int64> Example: 1 ID of the meta service |
search | string Retrieve only data matching the defined search value.
Simple search can be done like the following example:
Available search operators are:
Examples without nested aggregators:
Example with nested aggregators:
|
limit | integer >= 1 Default: 10 Example: limit=20 Number of items per pages |
page | integer >= 1 Default: 1 Example: page=4 Number of the requested page |
sort_by | object Example: sort_by={"host.name":"ASC"} Sort the resulted data by its properties |
{- "result": [
- {
- "id": 329,
- "author_id": 3,
- "author_name": "admin",
- "host_id": 12,
- "comment": "Downtime set by admin",
- "duration": 7200,
- "entry_time": "2019-08-24T14:15:22Z",
- "start_time": "2019-08-24T14:15:22Z",
- "end_time": "2019-08-24T14:15:22Z",
- "deletion_time": null,
- "actual_start_time": "2019-08-24T14:15:22Z",
- "actual_end_time": null,
- "is_started": true,
- "is_cancelled": false,
- "is_fixed": true,
- "service_id": 5
}
], - "meta": {
- "page": 1,
- "limit": 10,
- "search": { },
- "sort_by": { },
- "total": 1
}
}
Add a downtime on a metaservice.
meta_id required | integer <int64> Example: 1 ID of the meta service |
start_time | string <date-time> Scheduled start date of the downtime (ISO8601) |
end_time | string <date-time> Scheduled end date of the downtime (ISO8601) |
is_fixed | boolean Indicates whether the downtime is fixed |
duration | integer Downtime duration in seconds |
comment | string Comment of the downtime |
{- "start_time": "2019-08-24T14:15:22Z",
- "end_time": "2019-08-24T14:15:22Z",
- "is_fixed": true,
- "duration": 3600,
- "comment": "Downtime set by admin"
}
{- "code": 400,
- "message": "Property 'name' not found"
}
object (Downtime.Resource) | |
Array of objects (Monitoring.Resource.Action) |
{- "downtime": {
- "comment": "Downtime set by admin",
- "with_services": true,
- "is_fixed": true,
- "duration": 7200,
- "start_time": "2019-08-24T14:15:22Z",
- "end_time": "2019-08-24T14:15:22Z"
}, - "resources": [
- {
- "type": "service|host",
- "id": 12,
- "parent": {
- "id": 12
}
}
]
}
{- "code": 400,
- "message": "Property 'name' not found"
}
List all the hosts in real-time monitoring.
The available parameters to search / sort_by are:
show_service | boolean Default: false Example: show_service=true Allows to display services belonging to items |
search | string Retrieve only data matching the defined search value.
Simple search can be done like the following example:
Available search operators are:
Examples without nested aggregators:
Example with nested aggregators:
|
limit | integer >= 1 Default: 10 Example: limit=20 Number of items per pages |
page | integer >= 1 Default: 1 Example: page=4 Number of the requested page |
sort_by | object Example: sort_by={"host.name":"ASC"} Sort the resulted data by its properties |
{- "result": [
- {
- "id": 12,
- "alias": "Central",
- "display_name": "Central",
- "name": "Central",
- "state": 0,
- "services": [
- {
- "id": 5,
- "description": "Ping",
- "display_name": "Ping",
- "state": 0
}
], - "poller_id": 1,
- "acknowledged": false,
- "address_ip": "127.0.0.1",
- "check_attempt": 1,
- "checked": true,
- "execution_time": 0.070906,
- "icon_image": "ppm/operatingsystems-linux-snmp-linux-128.png",
- "icon_image_alt": "",
- "last_check": "2019-08-24T14:15:22Z",
- "last_hard_state_change": "2019-08-24T14:15:22Z",
- "last_state_change": "2019-08-24T14:15:22Z",
- "last_time_down": "2019-08-24T14:15:22Z",
- "last_time_unreachable": "2019-08-24T14:15:22Z",
- "last_time_up": "2019-08-24T14:15:22Z",
- "last_update": "2019-08-24T14:15:22Z",
- "max_check_attempts": 3,
- "output": "OK - 127.0.0.1 rta 0.100ms lost 0%\n",
- "passive_checks": false,
- "state_type": 0,
- "timezone": ":Europe/Paris",
- "scheduled_downtime_depth": 0,
- "criticality": 10
}
], - "meta": {
- "page": 1,
- "limit": 10,
- "search": { },
- "sort_by": { },
- "total": 1
}
}
Return a single host with full details and some details about its services.
host_id required | integer <int64> Example: 12 ID of the host |
{- "id": 12,
- "alias": "Central",
- "display_name": "Central",
- "name": "Central",
- "state": 0,
- "services": [
- {
- "id": 5,
- "description": "Ping",
- "display_name": "Ping",
- "state": 0
}
], - "poller_id": 1,
- "acknowledged": false,
- "address_ip": "127.0.0.1",
- "check_attempt": 1,
- "checked": true,
- "execution_time": 0.070906,
- "icon_image": "ppm/operatingsystems-linux-snmp-linux-128.png",
- "icon_image_alt": "",
- "last_check": "2019-08-24T14:15:22Z",
- "last_hard_state_change": "2019-08-24T14:15:22Z",
- "last_state_change": "2019-08-24T14:15:22Z",
- "last_time_down": "2019-08-24T14:15:22Z",
- "last_time_unreachable": "2019-08-24T14:15:22Z",
- "last_time_up": "2019-08-24T14:15:22Z",
- "last_update": "2019-08-24T14:15:22Z",
- "max_check_attempts": 3,
- "output": "OK - 127.0.0.1 rta 0.100ms lost 0%\n",
- "passive_checks": false,
- "state_type": 0,
- "timezone": ":Europe/Paris",
- "scheduled_downtime_depth": 0,
- "criticality": 10,
- "active_checks": true,
- "check_command": "base_host_alive",
- "check_interval": 5,
- "check_period": "24x7",
- "check_type": 0,
- "last_hard_state": "2019-08-24T14:15:22Z",
- "last_notification": "2019-08-24T14:15:22Z",
- "latency": 0.005,
- "next_check": "2019-08-24T14:15:22Z",
- "next_host_notification": 0,
- "notification_interval": 30,
- "notification_number": 3,
- "notify": true,
- "notify_on_down": true,
- "notify_on_downtime": false,
- "notify_on_flapping": false,
- "notify_on_recovery": true,
- "notify_on_unreachable": false,
- "flapping": false,
- "percent_state_change": 3.5,
- "downtimes": [
- {
- "id": 329,
- "author_id": 3,
- "author_name": "admin",
- "host_id": 12,
- "comment": "Downtime set by admin",
- "duration": 7200,
- "entry_time": "2019-08-24T14:15:22Z",
- "start_time": "2019-08-24T14:15:22Z",
- "end_time": "2019-08-24T14:15:22Z",
- "deletion_time": null,
- "actual_start_time": "2019-08-24T14:15:22Z",
- "actual_end_time": null,
- "is_started": true,
- "is_cancelled": false,
- "is_fixed": true
}
], - "acknowledgement": {
- "host": {
- "id": 34,
- "author_id": 3,
- "author_name": "admin",
- "comment": "Acknowledged by admin",
- "deletion_time": "2019-08-24T14:15:22Z",
- "entry_time": "2019-08-24T14:15:22Z",
- "host_id": 12,
- "poller_id": 1,
- "is_notify_contacts": false,
- "is_persistent_comment": true,
- "is_sticky": true,
- "state": 1
}
}
}
List of host category configurations
The available parameters to search / sort_by are:
{- "result": [
- {
- "id": 1,
- "name": "host-category",
- "alias": "host-category",
- "is_activated": true,
- "comment": "string"
}
], - "meta": {
- "page": 1,
- "limit": 10,
- "search": { },
- "sort_by": { },
- "total": 1
}
}
Create a host category
This endpoint does NOT update the ACL rights with the new host category
name | string Host category name |
alias | string Host category alias |
is_activated | boolean is active or not (enable/disable) |
comment | string or null some comment |
{- "name": "host-category",
- "alias": "host-category",
- "is_activated": true,
- "comment": "string"
}
{- "code": 400,
- "message": "Property 'name' not found"
}
Delete a host category configuration
host_category_id required | integer <int64> Example: 1 ID of existing host category configuration |
{- "code": 403,
- "message": "You are not authorized to access this resource"
}
Delete a service category configuration
service_category_id required | integer <int64> Example: 1 ID of existing service category configuration |
{- "code": 403,
- "message": "You are not authorized to access this resource"
}
Return all host group configurations.
The available parameters to search / sort_by are:
Changes in 23.04 :
icon
was renamed icon_id
and is no longer an object but the image IDicon_map
was renamed icon_map_id
and is no longer an object but the image ID{- "result": [
- {
- "name": "MySQL-Servers",
- "alias": "All MySQL Servers",
- "notes": "my notes",
- "notes_url": "notes url",
- "action_url": "action url",
- "icon_id": 1,
- "icon_map_id": 1,
- "geo_coords": "48.51,2.20",
- "rrd": 2,
- "comment": "string",
- "is_activated": true,
- "id": 1
}
], - "meta": {
- "page": 1,
- "limit": 10,
- "search": { },
- "sort_by": { },
- "total": 1
}
}
Add a new host group configuration.
Mandatory body properties are:
Since Centreon web 23.04
name | string <= 200 characters Host group name |
alias | string or null <= 200 characters Host group alias |
notes | string or null <= 255 characters Define an optional string of notes pertaining to the host group |
notes_url | string or null <= 255 characters Define an optional URL that can be used to provide more information about the host group |
action_url | string or null <= 255 characters Define an optional URL that can be used to provide more actions to be performed on the host group. You will see the link to the action URL in the host group details |
icon_id | integer or null Define the image ID that should be associated with this host group |
icon_map_id | integer or null Define an image ID that should be associated with this host group in the statusmap CGI in monitoring engine |
geo_coords | string or null <= 32 characters Geographical coordinates use by Centreon Map module to position element on map |
rrd | integer or null [ 1 .. 2147483648 ] RRD retention duration in days of all the services that are in this host group |
comment | string or null <= 65535 characters Comments on this host group |
is_activated | boolean Indicates whether the host group is activated or not |
{- "name": "MySQL-Servers",
- "alias": "All MySQL Servers",
- "notes": "my notes",
- "notes_url": "notes url",
- "action_url": "action url",
- "icon_id": 1,
- "icon_map_id": 1,
- "geo_coords": "48.51,2.20",
- "rrd": 2,
- "comment": "string",
- "is_activated": true
}
{- "name": "MySQL-Servers",
- "alias": "All MySQL Servers",
- "notes": "my notes",
- "notes_url": "notes url",
- "action_url": "action url",
- "icon_id": 1,
- "icon_map_id": 1,
- "geo_coords": "48.51,2.20",
- "rrd": 2,
- "comment": "string",
- "is_activated": true,
- "id": 1
}
internal
Since Centreon web 23.04
Delete host group.
hostgroup_id required | integer <int64> Example: 5 ID of the host group |
{- "code": 403,
- "message": "You are not authorized to access this resource"
}
List all the host groups in real-time monitoring by host id
host_id required | integer <int64> Example: 12 ID of the host |
limit | integer >= 1 Default: 10 Example: limit=20 Number of items per pages |
page | integer >= 1 Default: 1 Example: page=4 Number of the requested page |
sort_by | object Example: sort_by={"host.name":"ASC"} Sort the resulted data by its properties |
{- "result": [
- {
- "id": 28,
- "name": "All",
- "host": {
- "id": 12,
- "alias": "Central",
- "display_name": "Central",
- "name": "Central",
- "state": 0,
- "services": [
- {
- "id": 5,
- "description": "Ping",
- "display_name": "Ping",
- "state": 0
}
]
}
}
], - "meta": {
- "page": 1,
- "limit": 10,
- "search": { },
- "sort_by": { },
- "total": 1
}
}
List all the host groups in real-time monitoring.
The available parameters to search / sort_by are:
show_host | boolean Default: false Example: show_host=true Allows to display hosts belonging to items |
show_service | boolean Default: false Example: show_service=true Allows to display services belonging to items |
search | string Retrieve only data matching the defined search value.
Simple search can be done like the following example:
Available search operators are:
Examples without nested aggregators:
Example with nested aggregators:
|
limit | integer >= 1 Default: 10 Example: limit=20 Number of items per pages |
page | integer >= 1 Default: 1 Example: page=4 Number of the requested page |
sort_by | object Example: sort_by={"host.name":"ASC"} Sort the resulted data by its properties |
{- "result": [
- {
- "id": 28,
- "name": "All",
- "host": {
- "id": 12,
- "alias": "Central",
- "display_name": "Central",
- "name": "Central",
- "state": 0,
- "services": [
- {
- "id": 5,
- "description": "Ping",
- "display_name": "Ping",
- "state": 0
}
]
}
}
], - "meta": {
- "page": 1,
- "limit": 10,
- "search": { },
- "sort_by": { },
- "total": 1
}
}
List all meta services configurations.
The available parameters to search / sort_by are:
search | string Retrieve only data matching the defined search value.
Simple search can be done like the following example:
Available search operators are:
Examples without nested aggregators:
Example with nested aggregators:
|
limit | integer >= 1 Default: 10 Example: limit=20 Number of items per pages |
page | integer >= 1 Default: 1 Example: page=4 Number of the requested page |
sort_by | object Example: sort_by={"host.name":"ASC"} Sort the resulted data by its properties |
{- "result": [
- {
- "id": 2,
- "name": "TOTAL_FIREWALL_CONNECTIONS",
- "output": "Number of connections: %d",
- "calulation_type": "average",
- "data_source_type": "gauge",
- "meta_select_mode": 2,
- "regexp_string": "%service_name%",
- "metric": "used",
- "warning": "80",
- "critical": "90",
- "is_activated": true
}
], - "meta": {
- "page": 1,
- "limit": 10,
- "search": { },
- "sort_by": { },
- "total": 1
}
}
Get a meta service configuration by its id
meta_id required | integer <int64> Example: 1 ID of the meta service |
{- "id": 2,
- "name": "TOTAL_FIREWALL_CONNECTIONS",
- "output": "Number of connections: %d",
- "calulation_type": "average",
- "data_source_type": "gauge",
- "meta_select_mode": 2,
- "regexp_string": "%service_name%",
- "metric": "used",
- "warning": "80",
- "critical": "90",
- "is_activated": true
}
List all meta services metrics from realtime.
The available parameters to search / sort_by are:
meta_id required | integer <int64> Example: 1 ID of the meta service |
search | string Retrieve only data matching the defined search value.
Simple search can be done like the following example:
Available search operators are:
Examples without nested aggregators:
Example with nested aggregators:
|
limit | integer >= 1 Default: 10 Example: limit=20 Number of items per pages |
page | integer >= 1 Default: 1 Example: page=4 Number of the requested page |
sort_by | object Example: sort_by={"host.name":"ASC"} Sort the resulted data by its properties |
{- "result": [
- {
- "id": 2,
- "name": "rta",
- "unitName": "ms",
- "currentValue": 0.25,
- "resource": {
- "uuid": "h13-s21",
- "type": "service|host",
- "short_type": "s|h",
- "id": 12,
- "host_id": 12,
- "service_id": 12,
- "name": "Ping",
- "alias": null,
- "fqdn": null,
- "links": {
- "uris": {
- "configuration": "/centreon/main.php?p=60101&o=c&host_id=11",
- "logs": "/centreon/main.php?p=20301&h=11",
- "reporting": "/centreon/main.php?p=307&host=11"
}, - "endpoints": {
- "details": "/centreon/api/latest/monitoring/resources/hosts/11",
- "timeline": "/centreon/api/latest/monitoring/hosts/11/timeline",
- "status_graph": null,
- "performance_graph": null,
- "acknowledgement": "/centreon/api/latest/monitoring/hosts/11/acknowledgements?limit=1",
- "downtime": "/centreon/api/latest/monitoring/hosts/11/downtimes?search=%7B%22%24and%22:%5B%7B%22start_time%22:%7B%22%24lt%22:1599655905%7D,%22end_time%22:%7B%22%24gt%22:1599655905%7D,%220%22:%7B%22%24or%22:%7B%22is_cancelled%22:%7B%22%24neq%22:1%7D,%22deletion_time%22:%7B%22%24gt%22:1599655905%7D%7D%7D%7D%5D%7D",
- "notification_policy": "/centreon/api/latest/configurations/hosts/11/notification-policy",
- "check": "/centreon/api/latest/monitoring/hosts/17/services/23/check",
- "forced_check": "/centreon/api/latest/monitoring/hosts/17/services/23/check"
}, - "externals": {
}
}, - "monitoring_server_name": "Central",
- "icon": {
- "id": 12,
- "name": "memory",
- "url": "/media/memory.png"
}, - "parent": {
- "type": "service|host",
- "short_type": "s|h",
- "id": 12,
- "name": "Central",
- "alias": "Host",
- "fqdn": "127.0.0.1",
- "links": {
- "uris": {
- "configuration": "/centreon/main.php?p=60101&o=c&host_id=11",
- "logs": "/centreon/main.php?p=20301&h=11",
- "reporting": "/centreon/main.php?p=307&host=11"
}, - "endpoints": {
- "details": "/centreon/api/latest/monitoring/resources/hosts/11",
- "timeline": "/centreon/api/latest/monitoring/hosts/11/timeline",
- "status_graph": null,
- "performance_graph": null,
- "acknowledgement": "/centreon/api/latest/monitoring/hosts/11/acknowledgements?limit=1",
- "downtime": "/centreon/api/latest/monitoring/hosts/11/downtimes?search=%7B%22%24and%22:%5B%7B%22start_time%22:%7B%22%24lt%22:1599655905%7D,%22end_time%22:%7B%22%24gt%22:1599655905%7D,%220%22:%7B%22%24or%22:%7B%22is_cancelled%22:%7B%22%24neq%22:1%7D,%22deletion_time%22:%7B%22%24gt%22:1599655905%7D%7D%7D%7D%5D%7D",
- "notification_policy": "/centreon/api/latest/configurations/hosts/11/notification-policy",
- "check": "/centreon/api/latest/monitoring/hosts/17/services/23/check",
- "forced_check": "/centreon/api/latest/monitoring/hosts/17/services/23/check"
}, - "externals": {
}
}, - "status": {
- "code": 0,
- "name": "UP",
- "severity_code": 1
}
}, - "status": {
- "code": 0,
- "name": "UP",
- "severity_code": 1
}, - "in_downtime": false,
- "acknowledged": false,
- "duration": "2h 3m",
- "last_status_change": "2019-08-24T14:15:22Z",
- "last_time_with_no_issue": "2019-08-24T14:15:22Z",
- "tries": "3/3 (H)",
- "last_check": "1h 45m",
- "information": "OK - Ping is ok",
- "active_checks": true,
- "passive_checks": true,
- "performance_data": "rta=0.025ms;200.000;400.000;0; rtmax=0.061ms;;;; rtmin=0.015ms;;;; pl=0%;20;50;0;100 ",
- "notification_enabled": false,
- "severity": {
- "type": "service",
- "id": 1,
- "name": "Priority 1",
- "icon": {
- "id": 1,
- "name": "applications-monitoring-centreon-central-centreon-128-2.png",
- "url": "/centreon/img/media/ppm/applications-monitoring-centreon-central-centreon-128-2.png"
}
}
}
}
], - "meta": {
- "page": 1,
- "limit": 10,
- "search": { },
- "sort_by": { },
- "total": 1
}
}
meta_id required | integer <int64> Example: 1 ID of the meta service |
search | string Retrieve only data matching the defined search value.
Simple search can be done like the following example:
Available search operators are:
Examples without nested aggregators:
Example with nested aggregators:
|
limit | integer >= 1 Default: 10 Example: limit=20 Number of items per pages |
page | integer >= 1 Default: 1 Example: page=4 Number of the requested page |
sort_by | object Example: sort_by={"host.name":"ASC"} Sort the resulted data by its properties |
{- "result": [
- {
- "id": 34,
- "author_id": 3,
- "author_name": "admin",
- "comment": "Acknowledged by admin",
- "deletion_time": "2019-08-24T14:15:22Z",
- "entry_time": "2019-08-24T14:15:22Z",
- "host_id": 12,
- "poller_id": 1,
- "is_notify_contacts": false,
- "is_persistent_comment": true,
- "is_sticky": true,
- "state": 1,
- "service_id": 5
}
], - "meta": {
- "page": 1,
- "limit": 10,
- "search": { },
- "sort_by": { },
- "total": 1
}
}
List all downtimes of a service.
The available parameters to search / sort_by are:
meta_id required | integer <int64> Example: 1 ID of the meta service |
search | string Retrieve only data matching the defined search value.
Simple search can be done like the following example:
Available search operators are:
Examples without nested aggregators:
Example with nested aggregators:
|
limit | integer >= 1 Default: 10 Example: limit=20 Number of items per pages |
page | integer >= 1 Default: 1 Example: page=4 Number of the requested page |
sort_by | object Example: sort_by={"host.name":"ASC"} Sort the resulted data by its properties |
{- "result": [
- {
- "id": 329,
- "author_id": 3,
- "author_name": "admin",
- "host_id": 12,
- "comment": "Downtime set by admin",
- "duration": 7200,
- "entry_time": "2019-08-24T14:15:22Z",
- "start_time": "2019-08-24T14:15:22Z",
- "end_time": "2019-08-24T14:15:22Z",
- "deletion_time": null,
- "actual_start_time": "2019-08-24T14:15:22Z",
- "actual_end_time": null,
- "is_started": true,
- "is_cancelled": false,
- "is_fixed": true,
- "service_id": 5
}
], - "meta": {
- "page": 1,
- "limit": 10,
- "search": { },
- "sort_by": { },
- "total": 1
}
}
Schedule immediate check on chosen metaservice
meta_id required | integer <int64> Example: 1 ID of the meta service |
is_forced | boolean Indicates whether the check is forced (do not take into account the check timeperiod) |
{- "is_forced": true
}
{- "code": 400,
- "message": "Property 'name' not found"
}
Submit a result (check status, output and perfdata) to a single metaservice
meta_id required | integer <int64> Example: 1 ID of the meta service |
status required | string Enum: 0 1 2 3 Service status code that can be submitted
|
output | string or null Output result of the check sent |
performance_data | string or null Performance data result of the check sent |
{- "status": 2,
- "output": "CRITICAL: Memory exceeded ",
- "performance_data": "'used'=453849088B;;;0;1927262208"
}
{- "code": 400,
- "message": "Property 'name' not found"
}
List of all host severity configurations
The available parameters to search / sort_by are:
Changes in 23.04 :
icon
was renamed icon_id
and is no longer an object but the image ID{- "result": [
- {
- "id": 1,
- "name": "host-severity",
- "alias": "host-severity",
- "level": 2,
- "icon_id": 1,
- "comment": "string",
- "is_activated": true
}
], - "meta": {
- "page": 1,
- "limit": 10,
- "search": { },
- "sort_by": { },
- "total": 1
}
}
Create a host severity
name | string |
alias | string |
level | integer |
icon_id | integer |
{- "name": "host-severity-name",
- "alias": "host-severity-alias",
- "level": 2,
- "icon_id": 1
}
{- "code": 400,
- "message": "Property 'name' not found"
}
Delete a host severity configuration
host_severity_id required | integer <int64> Example: 1 ID of existing host severity configuration |
{- "code": 403,
- "message": "You are not authorized to access this resource"
}
Return all host templates configurations.
The available parameters to search / sort_by are:
{- "result": [
- {
- "id": 1,
- "name": "generic-active-host",
- "alias": "generic-active-host",
- "display_name": "generic-active-host",
- "address": "127.0.0.1",
- "comment": "string",
- "is_activated": true,
- "is_locked": true,
- "active_checks_status": 0,
- "passive_checks_status": 0,
- "max_check_attemps": 0,
- "check_interval": 0,
- "retry_check_interval": 0,
- "notifications_status": 0,
- "notification_interval": 0,
- "first_notification_delay": 0,
- "recovery_notification_delay": 0,
- "notification_options": 5,
- "stalking_options": 3,
- "snmp_community": "string",
- "snmp_version": "2c",
- "icon": {
- "id": 0,
- "name": "string",
- "path": "string",
- "comment": "string"
}, - "alternative_icon": "string",
- "status_map_image": {
- "id": 0,
- "name": "string",
- "path": "string",
- "comment": "string"
}, - "url_notes": "string",
- "action_url": "string",
- "notes": "string",
- "parents": [
- 0
]
}
], - "meta": {
- "page": 1,
- "limit": 10,
- "search": { },
- "sort_by": { },
- "total": 1
}
}
List all monitoring servers configurations.
The available parameters to search / sort_by are:
search | string Retrieve only data matching the defined search value.
Simple search can be done like the following example:
Available search operators are:
Examples without nested aggregators:
Example with nested aggregators:
|
limit | integer >= 1 Default: 10 Example: limit=20 Number of items per pages |
page | integer >= 1 Default: 1 Example: page=4 Number of the requested page |
sort_by | object Example: sort_by={"host.name":"ASC"} Sort the resulted data by its properties |
{- "result": [
- {
- "id": 2,
- "name": "Central",
- "address": "127.0.0.1",
- "is_localhost": true,
- "is_default": true,
- "ssh_port": 22,
- "last_restart": "2019-08-24T14:15:22Z",
- "engine_start_command": "service centengine start",
- "engine_stop_command": "service centengine stop",
- "engine_restart_command": "service centengine restart",
- "engine_reload_command": "service centengine reload",
- "nagios_bin": "/usr/sbin/centengine",
- "nagiostats_bin": "/usr/sbin/centenginestats",
- "broker_reload_command": "service cbd reload",
- "centreonbroker_cfg_path": "/etc/centreon-broker",
- "centreonbroker_module_path": "/usr/share/centreon/lib/centreon-broker",
- "centreonbroker_logs_path": null,
- "centreonconnector_path": "/usr/lib64/centreon-connector",
- "init_script_centreontrapd": "centreontrapd",
- "snmp_trapd_path_conf": "/etc/snmp/centreon_traps/",
- "remote_id": null,
- "remote_server_use_as_proxy": true,
- "is_updated": true,
- "is_activate": true
}
], - "meta": {
- "page": 1,
- "limit": 10,
- "search": { },
- "sort_by": { },
- "total": 1
}
}
Generate and move the configuration files of the monitoring server
monitoring_server_id required | integer <int64> Example: 1 ID of the monitoring server (poller) |
{- "code": 403,
- "message": "You are not authorized to access this resource"
}
Reload the configuration files of the monitoring server
monitoring_server_id required | integer <int64> Example: 1 ID of the monitoring server (poller) |
{- "code": 403,
- "message": "You are not authorized to access this resource"
}
Generate, move and reload the configuration files of the monitoring server
monitoring_server_id required | integer <int64> Example: 1 ID of the monitoring server (poller) |
{- "code": 403,
- "message": "You are not authorized to access this resource"
}
Generate and move the configuration files for all monitoring servers.
The process will stop at the first error.
{- "code": 403,
- "message": "You are not authorized to access this resource"
}
Reload the configuration files for all monitoring servers.
The process will stop at the first error.
{- "code": 403,
- "message": "You are not authorized to access this resource"
}
Generate, move and reload the configuration files for all monitoring servers.
The process will stop at the first error.
{- "code": 403,
- "message": "You are not authorized to access this resource"
}
List all monitoring servers configured and stored in real time.
The available parameters to search / sort_by are:
search | string Retrieve only data matching the defined search value.
Simple search can be done like the following example:
Available search operators are:
Examples without nested aggregators:
Example with nested aggregators:
|
limit | integer >= 1 Default: 10 Example: limit=20 Number of items per pages |
page | integer >= 1 Default: 1 Example: page=4 Number of the requested page |
sort_by | object Example: sort_by={"host.name":"ASC"} Sort the resulted data by its properties |
{- "result": [
- {
- "id": 2,
- "name": "Central",
- "address": "127.0.0.1",
- "description": "Central server",
- "isRunning": true,
- "lastAlive": 0,
- "version": "20.10.0"
}
], - "meta": {
- "page": 1,
- "limit": 10,
- "search": { },
- "sort_by": { },
- "total": 1
}
}
url required | string URL of the proxy |
port required | integer [ 0 .. 65535 ] Port of the proxy |
user required | string or null Login used to connect to proxy |
password required | string or null Password used to connect to proxy |
{- "url": "proxy.internal.company.org",
- "port": 3128,
- "user": "proxy-user",
- "password": "proxy-pass"
}
{- "code": 400,
- "message": "Property 'name' not found"
}
List all the services in real-time monitoring.
The available parameters to search / sort_by are:
search | string Retrieve only data matching the defined search value.
Simple search can be done like the following example:
Available search operators are:
Examples without nested aggregators:
Example with nested aggregators:
|
limit | integer >= 1 Default: 10 Example: limit=20 Number of items per pages |
page | integer >= 1 Default: 1 Example: page=4 Number of the requested page |
sort_by | object Example: sort_by={"host.name":"ASC"} Sort the resulted data by its properties |
{- "result": [
- {
- "id": 5,
- "description": "Ping",
- "display_name": "Ping",
- "state": 0,
- "check_attempt": 1,
- "icon_image": "",
- "icon_image_alt": "",
- "last_check": "2019-08-24T14:15:22Z",
- "last_state_change": "2019-08-24T14:15:22Z",
- "max_check_attempts": 3,
- "output": "OK - 127.0.0.1 rta 0.025ms lost 0%\n",
- "state_type": 1,
- "criticality": 10,
- "status": {
- "code": 0,
- "name": "UP",
- "severity_code": 1
}, - "duration": "2h 3m",
- "hosts": {
- "id": 12,
- "alias": "Central",
- "display_name": "Central",
- "name": "Central",
- "state": 0
}
}
], - "meta": {
- "page": 1,
- "limit": 10,
- "search": { },
- "sort_by": { },
- "total": 1
}
}
List all services related to a host in real-time monitoring.
The available parameters to search / sort_by are:
host_id required | integer <int64> Example: 12 ID of the host |
search | string Retrieve only data matching the defined search value.
Simple search can be done like the following example:
Available search operators are:
Examples without nested aggregators:
Example with nested aggregators:
|
limit | integer >= 1 Default: 10 Example: limit=20 Number of items per pages |
page | integer >= 1 Default: 1 Example: page=4 Number of the requested page |
sort_by | object Example: sort_by={"host.name":"ASC"} Sort the resulted data by its properties |
{- "result": [
- {
- "id": 5,
- "description": "Ping",
- "display_name": "Ping",
- "state": 0,
- "check_attempt": 1,
- "icon_image": "",
- "icon_image_alt": "",
- "last_check": "2019-08-24T14:15:22Z",
- "last_state_change": "2019-08-24T14:15:22Z",
- "max_check_attempts": 3,
- "output": "OK - 127.0.0.1 rta 0.025ms lost 0%\n",
- "state_type": 1,
- "criticality": 10,
- "status": {
- "code": 0,
- "name": "UP",
- "severity_code": 1
}, - "duration": "2h 3m"
}
], - "meta": {
- "page": 1,
- "limit": 10,
- "search": { },
- "sort_by": { },
- "total": 1
}
}
Return a single service with full details.
host_id required | integer <int64> Example: 12 ID of the host |
service_id required | integer <int64> Example: 5 ID of the service |
{- "id": 5,
- "description": "Ping",
- "display_name": "Ping",
- "state": 0,
- "check_attempt": 1,
- "icon_image": "",
- "icon_image_alt": "",
- "last_check": "2019-08-24T14:15:22Z",
- "last_state_change": "2019-08-24T14:15:22Z",
- "max_check_attempts": 3,
- "output": "OK - 127.0.0.1 rta 0.025ms lost 0%\n",
- "state_type": 1,
- "criticality": 10,
- "status": {
- "code": 0,
- "name": "UP",
- "severity_code": 1
}, - "duration": "2h 3m",
- "check_command": "base_centreon_ping",
- "check_interval": 5,
- "check_period": "24x7",
- "check_type": 0,
- "command_line": "/usr/lib64/nagios/plugins/check_icmp -H 127.0.0.1 -n 5 -w 200,20% -c 400,50%",
- "execution_time": 0.179335,
- "is_acknowledged": false,
- "is_active_check": true,
- "is_checked": true,
- "last_hard_state_change": "2019-08-24T14:15:22Z",
- "last_notification": "2019-08-24T14:15:22Z",
- "last_time_critical": "2019-08-24T14:15:22Z",
- "last_time_ok": "2019-08-24T14:15:22Z",
- "last_time_unknown": "2019-08-24T14:15:22Z",
- "last_time_warning": "2019-08-24T14:15:22Z",
- "last_update": "2019-08-24T14:15:22Z",
- "latency": 0.031,
- "next_check": "2019-08-24T14:15:22Z",
- "performance_data": "rta=0.025ms;200.000;400.000;0; rtmax=0.061ms;;;; rtmin=0.015ms;;;; pl=0%;20;50;0;100 ",
- "scheduled_downtime_depth": 0,
- "downtimes": [
- {
- "id": 329,
- "author_id": 3,
- "author_name": "admin",
- "host_id": 12,
- "comment": "Downtime set by admin",
- "duration": 7200,
- "entry_time": "2019-08-24T14:15:22Z",
- "start_time": "2019-08-24T14:15:22Z",
- "end_time": "2019-08-24T14:15:22Z",
- "deletion_time": null,
- "actual_start_time": "2019-08-24T14:15:22Z",
- "actual_end_time": null,
- "is_started": true,
- "is_cancelled": false,
- "is_fixed": true,
- "service_id": 5
}
], - "acknowledgement": {
- "id": 34,
- "author_id": 3,
- "author_name": "admin",
- "comment": "Acknowledged by admin",
- "deletion_time": "2019-08-24T14:15:22Z",
- "entry_time": "2019-08-24T14:15:22Z",
- "host_id": 12,
- "poller_id": 1,
- "is_notify_contacts": false,
- "is_persistent_comment": true,
- "is_sticky": true,
- "state": 1,
- "service_id": 5
}, - "flapping": false
}
Return all service group configurations.
The available parameters to search / sort_by are:
{- "result": [
- {
- "name": "MySQL-Servers",
- "alias": "All MySQL Servers",
- "geo_coords": "48.51,2.20",
- "comment": "string",
- "is_activated": true,
- "id": 1
}
], - "meta": {
- "page": 1,
- "limit": 10,
- "search": { },
- "sort_by": { },
- "total": 1
}
}
Add a new service group configuration.
Mandatory body properties are:
Since Centreon web 23.04
name | string <= 200 characters Service group name |
alias | string or null <= 200 characters Service group alias |
geo_coords | string or null <= 32 characters Geographical coordinates use by Centreon Map module to position element on map |
comment | string or null <= 65535 characters Comments on this service group |
is_activated | boolean Indicates whether the service group is activated or not |
{- "name": "MySQL-Servers",
- "alias": "All MySQL Servers",
- "geo_coords": "48.51,2.20",
- "comment": "string",
- "is_activated": true
}
{- "name": "MySQL-Servers",
- "alias": "All MySQL Servers",
- "geo_coords": "48.51,2.20",
- "comment": "string",
- "is_activated": true,
- "id": 1
}
internal
Since Centreon web 23.04
Delete service group.
servicegroup_id required | integer <int64> Example: 5 ID of the service group |
{- "code": 403,
- "message": "You are not authorized to access this resource"
}
Return a list of service groups for host-service pair.
host_id required | integer <int64> Example: 12 ID of the host |
service_id required | integer <int64> Example: 5 ID of the service |
{- "id": 13,
- "name": "MySG"
}
List all the service groups in real-time monitoring.
The available parameters to search / sort_by are:
show_service | boolean Default: false Example: show_service=true Allows to display services belonging to items |
show_host | boolean Default: false Example: show_host=true Allows to display hosts belonging to items |
search | string Retrieve only data matching the defined search value.
Simple search can be done like the following example:
Available search operators are:
Examples without nested aggregators:
Example with nested aggregators:
|
limit | integer >= 1 Default: 10 Example: limit=20 Number of items per pages |
page | integer >= 1 Default: 1 Example: page=4 Number of the requested page |
sort_by | object Example: sort_by={"host.name":"ASC"} Sort the resulted data by its properties |
{- "result": [
- {
- "id": 13,
- "name": "MySG"
}
], - "meta": {
- "page": 1,
- "limit": 10,
- "search": { },
- "sort_by": { },
- "total": 1
}
}
List of service category configurations
The available parameters to search / sort_by are:
{- "result": [
- {
- "id": 1,
- "name": "host-category",
- "alias": "host-category",
- "is_activated": true,
- "comment": "string"
}
], - "meta": {
- "page": 1,
- "limit": 10,
- "search": { },
- "sort_by": { },
- "total": 1
}
}
Create a service category
This endpoint does NOT update the ACL rights with the new service category
name | string Service category name |
alias | string Service category alias |
is_activated | boolean is active or not (enabled/disabled) |
{- "name": "service-category",
- "alias": "service-category",
- "is_activated": true
}
{- "code": 400,
- "message": "Property 'name' not found"
}
List all the service severities in real-time monitoring.
The available parameters to search / sort_by are:
search | string Retrieve only data matching the defined search value.
Simple search can be done like the following example:
Available search operators are:
Examples without nested aggregators:
Example with nested aggregators:
|
limit | integer >= 1 Default: 10 Example: limit=20 Number of items per pages |
page | integer >= 1 Default: 1 Example: page=4 Number of the requested page |
sort_by | object Example: sort_by={"host.name":"ASC"} Sort the resulted data by its properties |
{- "result": [
- {
- "id": 13,
- "name": "severity-name",
- "level": 50,
- "type": "host|service",
- "icon": {
- "name": "centreon.png",
- "url": "img/centreon.png"
}
}
], - "meta": {
- "page": 1,
- "limit": 10,
- "search": { },
- "sort_by": { },
- "total": 1
}
}
List all the host severities in real-time monitoring.
The available parameters to search / sort_by are:
search | string Retrieve only data matching the defined search value.
Simple search can be done like the following example:
Available search operators are:
Examples without nested aggregators:
Example with nested aggregators:
|
limit | integer >= 1 Default: 10 Example: limit=20 Number of items per pages |
page | integer >= 1 Default: 1 Example: page=4 Number of the requested page |
sort_by | object Example: sort_by={"host.name":"ASC"} Sort the resulted data by its properties |
{- "result": [
- {
- "id": 13,
- "name": "severity-name",
- "level": 50,
- "type": "host|service",
- "icon": {
- "name": "centreon.png",
- "url": "img/centreon.png"
}
}
], - "meta": {
- "page": 1,
- "limit": 10,
- "search": { },
- "sort_by": { },
- "total": 1
}
}
Get list of all time periods
The available parameters to search / sort_by are:
{- "result": [
- {
- "id": 1,
- "name": "24x7",
- "alias": "Always",
- "days": [
- {
- "day": 1,
- "time_range": "00:00-06:00,07:00-08:00"
}
], - "templates": [
- {
- "id": 1,
- "alias": "Always"
}
], - "exceptions": [
- {
- "id": 1,
- "day_range": "monday 1",
- "time_range": "00:00-06:00,07:00-08:00"
}
]
}
], - "meta": {
- "page": 1,
- "limit": 10,
- "search": { },
- "sort_by": { },
- "total": 1
}
}
name | string Name of the time period |
alias | string Alias of the time period |
Array of objects (Configuration.TimePeriod.days) | |
templates | Array of integers IDs of the time periods used as a template |
Array of objects (Configuration.TimePeriod.ExtraTimePeriod) List of exceptions to the standard schedule |
{- "name": "24x7",
- "alias": "Always",
- "days": [
- {
- "day": 1,
- "time_range": "00:00-06:00,07:00-08:00"
}
], - "templates": [
- 0
], - "exceptions": [
- {
- "day_range": "monday 1",
- "time_range": "00:00-06:00,07:00-08:00"
}
]
}
{- "code": 400,
- "message": "Property 'name' not found"
}
id required | integer <int64> Example: 1 Time period ID |
{- "id": 1,
- "name": "24x7",
- "alias": "Always",
- "days": [
- {
- "day": 1,
- "time_range": "00:00-06:00,07:00-08:00"
}
], - "templates": [
- {
- "id": 1,
- "alias": "Always"
}
], - "exceptions": [
- {
- "id": 1,
- "day_range": "monday 1",
- "time_range": "00:00-06:00,07:00-08:00"
}
]
}
id required | integer <int64> Example: 1 ID of the time period to be updated |
name | string Name of the time period |
alias | string Alias of the time period |
Array of objects (Configuration.TimePeriod.days) | |
templates | Array of integers IDs of the time periods used as a template |
Array of objects (Configuration.TimePeriod.ExtraTimePeriod) List of exceptions to the standard schedule |
{- "name": "24x7",
- "alias": "Always",
- "days": [
- {
- "day": 1,
- "time_range": "00:00-06:00,07:00-08:00"
}
], - "templates": [
- 0
], - "exceptions": [
- {
- "day_range": "monday 1",
- "time_range": "00:00-06:00,07:00-08:00"
}
]
}
{- "code": 403,
- "message": "You are not authorized to access this resource"
}
Register a server to the platform topology
name required | string Name of the server to register in the topology |
hostname | string Platform's 'physical' name |
type required | string Enum: "central" "poller" "remote" "map" "mbi" Type of the server from available Server types :
|
address required | string Address of the server. IPv4, IPv6 or DNS |
parent_address | string It should not be added to register a Central or other platforms in specific cases: Eg : To register a remote server as top level platform on its own platform. Mandatory parameter for all other types, to be able to link a platform to its parent Example : - To link a poller to a Central - To link a remote server to a Central - To link a poller to a remote server |
{- "name": "myPoller",
- "hostname": "my.poller.physical.hostname",
- "type": "poller",
- "address": "1.1.1.2",
- "parent_address": "1.1.1.1"
}
{- "code": 400,
- "message": "Property 'name' not found"
}
Get a platform topology in Json Graph Format
{- "graph": {
- "label": "centreon-topology",
- "metadata": {
- "version": "1.0.0"
}, - "nodes": {
- "id": {
- "type": "central",
- "label": "Central",
- "metadata": {
- "centreon-id": "1",
- "hostname": "localhost.localdomain",
- "address": "192.168.0.1"
}
}
}, - "edges": [
- {
- "source": "91",
- "relation": "peer_retention",
- "target": "1"
}
]
}
}
List of all service severity configurations
The available parameters to search / sort_by are:
{- "result": [
- {
- "id": 1,
- "name": "service-severity",
- "alias": "service-severity",
- "level": 2,
- "icon_id": 1,
- "is_activated": true
}
], - "meta": {
- "page": 1,
- "limit": 10,
- "search": { },
- "sort_by": { },
- "total": 1
}
}
Create a service severity
name | string |
alias | string |
level | integer |
icon_id | integer |
{- "name": "service-severity-name",
- "alias": "service-severity-alias",
- "level": 2,
- "icon_id": 1
}
{- "code": 400,
- "message": "Property 'name' not found"
}
Delete a service severity configuration
service_severity_id required | integer <int64> Example: 1 ID of existing service severity configuration |
{- "code": 403,
- "message": "You are not authorized to access this resource"
}
List all icons from centreon configuration.
The available parameters to search / sort_by are:
{- "result": [
- {
- "id": 1,
- "directory": "ppm",
- "name": "operatingsystems-linux-snmp-linux-128.png",
- "url": "/centreon/img/media/ppm/operatingsystems-linux-snmp-linux-128.png"
}
], - "meta": {
- "page": 1,
- "limit": 10,
- "search": { },
- "sort_by": { },
- "total": 1
}
}
Return the notified contacts and contact groups of a host.
host_id required | integer <int64> Example: 12 ID of the host |
{- "contacts": [
- {
- "id": 14,
- "name": "contact 1",
- "alias": "contact1",
- "email": "contact1@localhost",
- "notifications": {
- "host": {
- "events": [
- "UP",
- "DOWN"
], - "time_period": {
- "id": 14,
- "name": "24/7",
- "alias": "24/24 7/7"
}
}, - "service": {
- "events": [
- "OK",
- "CRITICAL"
], - "time_period": {
- "id": 14,
- "name": "24/7",
- "alias": "24/24 7/7"
}
}
}, - "configuration_uri": "/centreon/main.php?p=60301&o=c&contact_id=14"
}
]
}
Return the notified contacts and contact groups of a service.
host_id required | integer <int64> Example: 12 ID of the host |
service_id required | integer <int64> Example: 5 ID of the service |
{- "contacts": [
- {
- "id": 14,
- "name": "contact 1",
- "alias": "contact1",
- "email": "contact1@localhost",
- "notifications": {
- "host": {
- "events": [
- "UP",
- "DOWN"
], - "time_period": {
- "id": 14,
- "name": "24/7",
- "alias": "24/24 7/7"
}
}, - "service": {
- "events": [
- "OK",
- "CRITICAL"
], - "time_period": {
- "id": 14,
- "name": "24/7",
- "alias": "24/24 7/7"
}
}
}, - "configuration_uri": "/centreon/main.php?p=60301&o=c&contact_id=14"
}
]
}
Return the notified contacts and contact groups of a meta service.
meta_id required | integer <int64> Example: 1 ID of the meta service |
{- "contacts": [
- {
- "id": 14,
- "name": "contact 1",
- "alias": "contact1",
- "email": "contact1@localhost",
- "notifications": {
- "host": {
- "events": [
- "UP",
- "DOWN"
], - "time_period": {
- "id": 14,
- "name": "24/7",
- "alias": "24/24 7/7"
}
}, - "service": {
- "events": [
- "OK",
- "CRITICAL"
], - "time_period": {
- "id": 14,
- "name": "24/7",
- "alias": "24/24 7/7"
}
}
}, - "configuration_uri": "/centreon/main.php?p=60301&o=c&contact_id=14"
}
]
}
Get list of configured users
The available parameters to search / sort_by are:
{- "result": [
- {
- "id": 1,
- "name": "John Doe",
- "alias": "admin",
- "email": "root@localhost",
- "is_admin": true
}
], - "meta": {
- "page": 1,
- "limit": 10,
- "search": { },
- "sort_by": { },
- "total": 1
}
}
List configured parameters for the current user
{- "id": 1,
- "name": "Administrator",
- "alias": "admin",
- "email": "admin@localhost",
- "timezone": "Europe/Paris",
- "locale": "en_US",
- "is_admin": true,
- "use_deprecated_pages": false,
- "theme": "light",
- "user_interface_density": "extended",
- "default_page": "/main.php?p=60901"
}
Update a user
The available parameters to be updated are :
theme | string Enum: "light" "dark" Theme |
user_interface_density | string Enum: "compact" "extended" User interface view mode |
{- "theme": "light",
- "user_interface_density": "extended"
}
{- "code": 403,
- "message": "You are not authorized to access this resource"
}
internal
Since Centreon web 20.04.6
List user filters saved for a given page.
page_name required | string Example: events-view name of the page |
{- "result": [
- {
- "id": 1,
- "name": "my filter 1",
- "criterias": [
- {
- "type": "text",
- "name": "field1",
- "value": "search value 1"
}
], - "order": 1
}
], - "meta": {
- "page": 1,
- "limit": 10,
- "search": { },
- "sort_by": { },
- "total": 1
}
}
internal
Since Centreon web 20.04.6
Get detailed information of a user filter for a given page.
page_name required | string Example: events-view name of the page |
filter_id required | integer <int64> Example: 1 id of the filter |
{- "id": 1,
- "name": "my filter 1",
- "criterias": [
- {
- "type": "text",
- "name": "field1",
- "value": "search value 1"
}
], - "order": 1
}
{- "result": [
- {
- "id": 1,
- "name": "Access group",
- "alias": "Access group alias",
- "is_activated": true,
- "has_changed": true
}
], - "meta": {
- "page": 1,
- "limit": 10,
- "search": { },
- "sort_by": { },
- "total": 1
}
}
internal
Since Centreon web 20.04.6
Add user filter for a given page.
page_name required | string Example: events-view name of the page |
name | string filter name |
criterias | Array of objects list of filter criterias |
{- "name": "my filter 1",
- "criterias": [
- {
- "type": "text",
- "name": "field1",
- "value": "search value 1"
}
]
}
{- "id": 1,
- "name": "my filter 1",
- "criterias": [
- {
- "type": "text",
- "name": "field1",
- "value": "search value 1"
}
], - "order": 1
}
internal
Since Centreon web 20.04.6
Update user filter for a given page.
page_name required | string Example: events-view name of the page |
filter_id required | integer <int64> Example: 1 id of the filter |
id | integer filter id |
name required | string filter name |
criterias required | Array of objects list of filter criterias |
order | integer filter order |
{- "id": 1,
- "name": "my filter 1",
- "criterias": [
- {
- "type": "text",
- "name": "field1",
- "value": "search value 1"
}
], - "order": 1
}
{- "id": 1,
- "name": "my filter 1",
- "criterias": [
- {
- "type": "text",
- "name": "field1",
- "value": "search value 1"
}
], - "order": 1
}
internal
Since Centreon web 20.04.6
Patch user filter order for a given page.
page_name required | string Example: events-view name of the page |
filter_id required | integer <int64> Example: 1 id of the filter |
order required | integer filter order |
{- "order": 1
}
{- "id": 1,
- "name": "my filter 1",
- "criterias": [
- {
- "type": "text",
- "name": "field1",
- "value": "search value 1"
}
], - "order": 1
}
internal
Since Centreon web 20.04.6
Delete user filter for a given page.
page_name required | string Example: events-view name of the page |
filter_id required | integer <int64> Example: 1 id of the filter |
{- "code": 403,
- "message": "You are not authorized to access this resource"
}
List all the resources in real-time monitoring : hosts and services.
The available parameters to search / sort_by are:
Only for searching:
search | string Retrieve only data matching the defined search value.
Simple search can be done like the following example:
Available search operators are:
Examples without nested aggregators:
Example with nested aggregators:
|
limit | integer >= 1 Default: 10 Example: limit=20 Number of items per pages |
page | integer >= 1 Default: 1 Example: page=4 Number of the requested page |
sort_by | object Example: sort_by={"host.name":"ASC"} Sort the resulted data by its properties |
types | Array of strings Items Enum: "service" "host" "metaservice" Example: types=["host"] Filter the resources by type |
states | Array of strings Items Enum: "unhandled_problems" "resources_problems" "in_downtime" "acknowledged" "all" Example: states=["in_downtime", "acknowledged"] Filter the resources by state |
statuses | Array of strings Items Enum: "OK" "UP" "WARNING" "DOWN" "CRITICAL" "UNREACHABLE" "UNKNOWN" "PENDING" Example: statuses=["OK", "UP", "PENDING"] Filter the resources by status |
hostgroup_names | Array of strings Example: hostgroup_names=["ESX-Paris", "ESX-London"] Filter the resources by host group names |
servicegroup_names | Array of strings Example: servicegroup_names=["Memory-Services", "Ping-Services"] Filter the resources by service group names |
service_category_names | Array of strings Example: service_category_names=["Ping", "CPUs"] Filter the resources by service category names |
host_category_names | Array of strings Example: host_category_names=["Linux", "Windows"] Filter the resources by host category names |
host_severity_names | Array of strings Example: host_severity_names=["Linux", "Windows"] Filter the resources by host severity names |
service_severity_names | Array of strings Example: service_severity_names=["Ping", "CPUs"] Filter the resources by service severity names |
host_severity_levels | Array of integers Example: host_severity_levels=[50, 75] Filter the resources by host severity levels |
service_severity_levels | Array of integers Example: service_severity_levels=[50, 75] Filter the resources by service severity levels |
monitoring_server_names | Array of strings Example: monitoring_server_names=["Central", "Remote-Server-Paris", "Poller-Lyon"] Filter the resources by monitoring server names |
status_types | Array of strings Items Enum: "soft" "hard" Example: status_types=["soft"] Filter the resources by status types |
{- "result": [
- {
- "uuid": "h13-s21",
- "type": "service|host",
- "short_type": "s|h",
- "id": 12,
- "host_id": 12,
- "service_id": 12,
- "name": "Ping",
- "alias": null,
- "fqdn": null,
- "links": {
- "uris": {
- "configuration": "/centreon/main.php?p=60101&o=c&host_id=11",
- "logs": "/centreon/main.php?p=20301&h=11",
- "reporting": "/centreon/main.php?p=307&host=11"
}, - "endpoints": {
- "details": "/centreon/api/latest/monitoring/resources/hosts/11",
- "timeline": "/centreon/api/latest/monitoring/hosts/11/timeline",
- "status_graph": null,
- "performance_graph": null,
- "acknowledgement": "/centreon/api/latest/monitoring/hosts/11/acknowledgements?limit=1",
- "downtime": "/centreon/api/latest/monitoring/hosts/11/downtimes?search=%7B%22%24and%22:%5B%7B%22start_time%22:%7B%22%24lt%22:1599655905%7D,%22end_time%22:%7B%22%24gt%22:1599655905%7D,%220%22:%7B%22%24or%22:%7B%22is_cancelled%22:%7B%22%24neq%22:1%7D,%22deletion_time%22:%7B%22%24gt%22:1599655905%7D%7D%7D%7D%5D%7D",
- "notification_policy": "/centreon/api/latest/configurations/hosts/11/notification-policy",
- "check": "/centreon/api/latest/monitoring/hosts/17/services/23/check",
- "forced_check": "/centreon/api/latest/monitoring/hosts/17/services/23/check"
}, - "externals": {
}
}, - "monitoring_server_name": "Central",
- "icon": {
- "id": 12,
- "name": "memory",
- "url": "/media/memory.png"
}, - "parent": {
- "type": "service|host",
- "short_type": "s|h",
- "id": 12,
- "name": "Central",
- "alias": "Host",
- "fqdn": "127.0.0.1",
- "links": {
- "uris": {
- "configuration": "/centreon/main.php?p=60101&o=c&host_id=11",
- "logs": "/centreon/main.php?p=20301&h=11",
- "reporting": "/centreon/main.php?p=307&host=11"
}, - "endpoints": {
- "details": "/centreon/api/latest/monitoring/resources/hosts/11",
- "timeline": "/centreon/api/latest/monitoring/hosts/11/timeline",
- "status_graph": null,
- "performance_graph": null,
- "acknowledgement": "/centreon/api/latest/monitoring/hosts/11/acknowledgements?limit=1",
- "downtime": "/centreon/api/latest/monitoring/hosts/11/downtimes?search=%7B%22%24and%22:%5B%7B%22start_time%22:%7B%22%24lt%22:1599655905%7D,%22end_time%22:%7B%22%24gt%22:1599655905%7D,%220%22:%7B%22%24or%22:%7B%22is_cancelled%22:%7B%22%24neq%22:1%7D,%22deletion_time%22:%7B%22%24gt%22:1599655905%7D%7D%7D%7D%5D%7D",
- "notification_policy": "/centreon/api/latest/configurations/hosts/11/notification-policy",
- "check": "/centreon/api/latest/monitoring/hosts/17/services/23/check",
- "forced_check": "/centreon/api/latest/monitoring/hosts/17/services/23/check"
}, - "externals": {
}
}, - "status": {
- "code": 0,
- "name": "UP",
- "severity_code": 1
}
}, - "status": {
- "code": 0,
- "name": "UP",
- "severity_code": 1
}, - "in_downtime": false,
- "acknowledged": false,
- "duration": "2h 3m",
- "last_status_change": "2019-08-24T14:15:22Z",
- "last_time_with_no_issue": "2019-08-24T14:15:22Z",
- "tries": "3/3 (H)",
- "last_check": "1h 45m",
- "information": "OK - Ping is ok",
- "active_checks": true,
- "passive_checks": true,
- "performance_data": "rta=0.025ms;200.000;400.000;0; rtmax=0.061ms;;;; rtmin=0.015ms;;;; pl=0%;20;50;0;100 ",
- "notification_enabled": false,
- "severity": {
- "type": "service",
- "id": 1,
- "name": "Priority 1",
- "icon": {
- "id": 1,
- "name": "applications-monitoring-centreon-central-centreon-128-2.png",
- "url": "/centreon/img/media/ppm/applications-monitoring-centreon-central-centreon-128-2.png"
}
}
}
], - "meta": {
- "page": 1,
- "limit": 10,
- "search": { },
- "sort_by": { },
- "total": 1
}
}
Return the full detail of a resource typed Service.
host_id required | integer <int64> Example: 12 ID of the host |
service_id required | integer <int64> Example: 5 ID of the service |
null
is_forced | boolean Indicates whether the check is forced (do not take into account the check timeperiod) |
resource_id | integer <int64> ID of the resource |
parent_resource_id | integer or null <int64> ID of the parent resource (eg: host id) |
[- {
- "is_forced": true,
- "resource_id": 12,
- "parent_resource_id": 5
}
]
{- "code": 400,
- "message": "Property 'name' not found"
}
is_forced | boolean Indicates whether the check is forced (do not take into account the check timeperiod) |
resource_id | integer <int64> ID of the resource |
parent_resource_id | integer or null <int64> ID of the parent resource (eg: host id) |
[- {
- "is_forced": true,
- "resource_id": 12,
- "parent_resource_id": 5
}
]
{- "code": 400,
- "message": "Property 'name' not found"
}
Schedule immediate check on chosen host
host_id required | integer <int64> Example: 12 ID of the host |
is_forced | boolean Indicates whether the check is forced (do not take into account the check timeperiod) |
{- "is_forced": true
}
{- "code": 400,
- "message": "Property 'name' not found"
}
Schedule immediate check on chosen service
host_id required | integer <int64> Example: 12 ID of the host |
service_id required | integer <int64> Example: 5 ID of the service |
is_forced | boolean Indicates whether the check is forced (do not take into account the check timeperiod) |
{- "is_forced": true
}
{- "code": 400,
- "message": "Property 'name' not found"
}
Schedule immediate check on chosen metaservice
meta_id required | integer <int64> Example: 1 ID of the meta service |
is_forced | boolean Indicates whether the check is forced (do not take into account the check timeperiod) |
{- "is_forced": true
}
{- "code": 400,
- "message": "Property 'name' not found"
}
Schedule immediate check on chosen resources
object | |
Array of objects |
{- "check": {
- "is_forced": true
}, - "resources": [
- {
- "type": "service",
- "id": 10,
- "parent": {
- "id": 17
}
}
]
}
{- "code": 400,
- "message": "Property 'name' not found"
}
Submit a result (check status, output and perfdata) to a single host
host_id required | integer <int64> Example: 12 ID of the host |
status required | integer Enum: 0 1 2 Host status code that can be submitted
|
output | string or null Output result of the check sent |
performance_data | string or null Performance data result of the check sent |
{- "status": 1,
- "output": "CRITICAL: Connection lost",
- "performance_data": "'nbproc'=0;;1:1;0;"
}
{- "code": 400,
- "message": "Property 'name' not found"
}
Submit a result (check status, output and perfdata) to a single service
host_id required | integer <int64> Example: 12 ID of the host |
service_id required | integer <int64> Example: 5 ID of the service |
status required | string Enum: 0 1 2 3 Service status code that can be submitted
|
output | string or null Output result of the check sent |
performance_data | string or null Performance data result of the check sent |
{- "status": 2,
- "output": "CRITICAL: Memory exceeded ",
- "performance_data": "'used'=453849088B;;;0;1927262208"
}
{- "code": 400,
- "message": "Property 'name' not found"
}
Submit a result (check status, output and perfdata) to a single metaservice
meta_id required | integer <int64> Example: 1 ID of the meta service |
status required | string Enum: 0 1 2 3 Service status code that can be submitted
|
output | string or null Output result of the check sent |
performance_data | string or null Performance data result of the check sent |
{- "status": 2,
- "output": "CRITICAL: Memory exceeded ",
- "performance_data": "'used'=453849088B;;;0;1927262208"
}
{- "code": 400,
- "message": "Property 'name' not found"
}
Submit a result (check status, output and perfdata) to resources
required | Array of objects |
{- "resources": [
- {
- "type": "service",
- "id": 10,
- "parent": {
- "id": 17
}, - "status": 2,
- "output": "CRITICAL: Memory exceeded ",
- "performance_data": "'used'=453849088B;;;0;1927262208"
}
]
}
{- "code": 400,
- "message": "Property 'name' not found"
}
Add at least one comment to a single or to multiple resources
required | Array of objects |
{- "resources": [
- {
- "type": "service",
- "id": 10,
- "parent": {
- "id": 17
}, - "date": "2019-08-24T14:15:22Z",
- "comment": "Resource is not-OK but it is expected"
}
]
}
{- "code": 400,
- "message": "Property 'name' not found"
}
host_id required | integer <int64> Example: 12 ID of the host |
service_id required | integer <int64> Example: 5 ID of the service |
start required | string <date-time> Example: 2020-02-18T00:00:00 Start date of metrics (default date is 24 hours in the past) |
end required | string <date-time> Example: 2020-02-19T00:00:00 End date of metrics (default date is current date) |
{- "global": {
- "title": "graph title",
- "start": 1594504800,
- "end": 1594591200,
- "vertical-label": "Value",
- "base": "1024",
- "width": "550",
- "height": "140",
- "lower-limit": "0",
- "scaled": 1,
- "multiple_services": false
}, - "metrics": [
- {
- "index_id": "4",
- "metric_id": "29",
- "metric": "cpu",
- "metric_legend": "cpu",
- "unit": "%",
- "hidden": 0,
- "min": "0",
- "max": "100",
- "virtual": 0,
- "ds_data": {
- "ds_min": "1",
- "ds_max": "1",
- "ds_minmax_int": null,
- "ds_last": "1",
- "ds_average": "1",
- "ds_total": null,
- "ds_tickness": "1",
- "ds_color_line_mode": "1",
- "ds_color_line": "#666600"
}, - "legend": "cpu (%)",
- "stack": 0,
- "warn": null,
- "warn_low": null,
- "crit": null,
- "crit_low": null,
- "ds_color_area_warn": "#ff9a13",
- "ds_color_area_crit": "#e00b3d",
- "ds_order": 0,
- "data": [
- 1,
- null,
- 1
], - "prints": [
- [
- "Last:1.00"
]
], - "last_value": 5,
- "minimum_value": 0,
- "maximum_value": 10,
- "average_value": 5.64
}
], - "times": [
- "1594505100",
- "1594505400",
- "1594505700"
]
}
Get status data from a service between given interval
host_id required | integer <int64> Example: 12 ID of the host |
service_id required | integer <int64> Example: 5 ID of the service |
start required | string <date-time> Example: 2020-02-18T00:00:00 Start date of metrics (default date is 24 hours in the past) |
end required | string <date-time> Example: 2020-02-19T00:00:00 End date of metrics (default date is current date) |
{- "critical": [
- {
- "start": "1581987121",
- "end": "1581987181"
}
], - "warning": [
- {
- "start": "1581987121",
- "end": "1581987181"
}
], - "ok": [
- {
- "start": "1581987121",
- "end": "1581987181"
}
], - "unknown": [
- {
- "start": "1581987121",
- "end": "1581987181"
}
]
}
host_id required | integer <int64> Example: 12 ID of the host |
service_id required | integer <int64> Example: 5 ID of the service |
start | string <date-time> Example: start=2020-02-18T00:00:00 Start date of metrics (default date is 24 hours in the past) |
end | string <date-time> Example: end=2020-02-19T00:00:00 End date of metrics (default date is current date) |
{- "global": {
- "title": "graph title",
- "start": "2020-02-18T00:00:00",
- "end": "2020-02-19T00:00:00",
- "vertical-label": "Value",
- "base": "1024",
- "width": "550",
- "height": "140",
- "lower-limit": "0",
- "scaled": 1,
- "multiple_services": false
}, - "metrics": [
- {
- "index_id": "4",
- "metric_id": "29",
- "metric": "cpu",
- "metric_legend": "cpu",
- "unit": "%",
- "hidden": 0,
- "min": "0",
- "max": "100",
- "virtual": 0,
- "ds_data": {
- "ds_min": "1",
- "ds_max": "1",
- "ds_minmax_int": null,
- "ds_last": "1",
- "ds_average": "1",
- "ds_total": null,
- "ds_tickness": "1",
- "ds_color_line_mode": "1",
- "ds_color_line": "#666600"
}, - "legend": "cpu (%)",
- "stack": 0,
- "warn": null,
- "warn_low": null,
- "crit": null,
- "crit_low": null,
- "ds_color_area_warn": "#ff9a13",
- "ds_color_area_crit": "#e00b3d",
- "ds_order": 0,
- "data": [
- 1,
- null,
- 1
], - "prints": [
- [
- "Last:1.00"
]
], - "minimum_value": 1,
- "maximum_value": 1
}
], - "times": [
- "2020-02-19T00:00:00",
- "2020-02-19T00:05:00",
- "2020-02-19T00:10:00"
]
}
host_id required | integer <int64> Example: 12 ID of the host |
service_id required | integer <int64> Example: 5 ID of the service |
start_date required | string <date-time> Example: start_date=2022-01-01T00:00:22Z Start date of metrics (date format should be in ISO 8601) |
end required | string <date-time> Example: end=2023-01-01T00:00:00Z End date of metrics (date format should be in ISO 8601) |
{- "code": 500,
- "message": "Internal Server Error"
}
Get status data from a service between given interval
host_id required | integer <int64> Example: 12 ID of the host |
service_id required | integer <int64> Example: 5 ID of the service |
start | string <date-time> Example: start=2020-02-18T00:00:00 Start date of metrics (default date is 24 hours in the past) |
end | string <date-time> Example: end=2020-02-19T00:00:00 End date of metrics (default date is current date) |
{- "critical": [
- {
- "start": "1581987121",
- "end": "1581987181"
}
], - "warning": [
- {
- "start": "1581987121",
- "end": "1581987181"
}
], - "ok": [
- {
- "start": "1581987121",
- "end": "1581987181"
}
], - "unknown": [
- {
- "start": "1581987121",
- "end": "1581987181"
}
]
}
List all events for a given host
The available parameters to search / sort_by are:
host_id required | integer <int64> Example: 12 ID of the host |
search | string Retrieve only data matching the defined search value.
Simple search can be done like the following example:
Available search operators are:
Examples without nested aggregators:
Example with nested aggregators:
|
limit | integer >= 1 Default: 10 Example: limit=20 Number of items per pages |
page | integer >= 1 Default: 1 Example: page=4 Number of the requested page |
sort_by | object Example: sort_by={"host.name":"ASC"} Sort the resulted data by its properties |
{- "result": [
- {
- "id": 1,
- "type": "event",
- "date": "2019-08-24T14:15:22Z",
- "start_date": "2019-08-24T14:15:22Z",
- "end_date": "2019-08-24T14:15:22Z",
- "content": "string",
- "contact": {
- "id": 0,
- "name": "string"
}, - "status": {
- "code": 0,
- "name": "UP",
- "severity_code": 1
}, - "tries": 0
}
], - "meta": {
- "page": 1,
- "limit": 10,
- "search": { },
- "sort_by": { },
- "total": 1
}
}
List all events for a given service
The available parameters to search / sort_by are:
host_id required | integer <int64> Example: 12 ID of the host |
service_id required | integer <int64> Example: 5 ID of the service |
search | string Retrieve only data matching the defined search value.
Simple search can be done like the following example:
Available search operators are:
Examples without nested aggregators:
Example with nested aggregators:
|
limit | integer >= 1 Default: 10 Example: limit=20 Number of items per pages |
page | integer >= 1 Default: 1 Example: page=4 Number of the requested page |
sort_by | object Example: sort_by={"host.name":"ASC"} Sort the resulted data by its properties |
{- "result": [
- {
- "id": 1,
- "type": "event",
- "date": "2019-08-24T14:15:22Z",
- "start_date": "2019-08-24T14:15:22Z",
- "end_date": "2019-08-24T14:15:22Z",
- "content": "string",
- "contact": {
- "id": 0,
- "name": "string"
}, - "status": {
- "code": 0,
- "name": "UP",
- "severity_code": 1
}, - "tries": 0
}
], - "meta": {
- "page": 1,
- "limit": 10,
- "search": { },
- "sort_by": { },
- "total": 1
}
}
platformName | string The name of the platform |
isRemote | boolean Platform is a remote server |
address | string The address of the platform |
centralServerAddress | string Central linked address |
apiUsername | string Api Username |
apiCredentials | string Api Password |
apiScheme | string Protocol |
apiPort | integer Port used by the API |
apiPath | string name of your API root folder |
peerValidation | boolean Usage of peer validation |
object |
{- "platformName": "string",
- "isRemote": true,
- "address": "10.0.0.1",
- "centralServerAddress": "192.168.0.1",
- "apiUsername": "admin",
- "apiCredentials": "centreon",
- "apiScheme": "http",
- "apiPort": "80",
- "apiPath": "centreon",
- "peerValidation": false,
- "proxy": {
- "host": "example.proxy.com",
- "port": 80,
- "user": "admin",
- "password": "centreon"
}
}
{- "code": 400,
- "message": "Property 'name' not found"
}
List versions of web, widgets and modules
{- "web": {
- "version": "22.04.0",
- "major": "22",
- "minor": "04",
- "fix": "0"
}, - "widgets": {
- "widgetName": {
- "version": "22.04.0",
- "major": "22",
- "minor": "04",
- "fix": "0"
}
}, - "modules": {
- "moduleName": {
- "version": "22.04.0",
- "major": "22",
- "minor": "04",
- "fix": "0"
}
}
}
Update Centreon web component
Array of objects |
{- "components": [
- {
- "name": "centreon-web"
}
]
}
{- "code": 500,
- "message": "Internal Server Error"
}