New features

  • Added real-time monitoring for hosts and services
  • Added acknowledgement for hosts and services
  • Added downtimes for hosts and services
  • Added the list of monitoring server configurations
  • Added the proxy configuration

Information

All dates are in ISO 8601 format

Authentication

There are two modes of authentication:

  • By token: after identification with your login credentials
  • By cookie: by reusing a valid session ID

Token

The use of the API requires a security token.

To retrieve it, you will need to authenticate yourself with your login credentials.

The token will be deleted if it has not been used for more than one hour.

Security Scheme Type API Key
Header parameter name: X-AUTH-TOKEN

Cookie

If you have already connected on the Centreon web application, you can reused the PHPSESSID cookie. The cookie will be valid as long as the connection to Centreon is maintained.

Security Scheme Type API Key
Cookie parameter name: PHPSESSID

Authentication

Login and logout endpoints to retrieve authentication token

Login

Entry point to retrieve an authentication token.

Request Body schema: application/json

Authentication schema

object

Responses

Request samples

Content type
application/json
{
  • "security": {
    }
}

Response samples

Content type
application/json
{
  • "contact": {
    },
  • "security": {
    }
}

Logout

Entry point to delete an existing authentication token.

Authorizations:

Responses

Response samples

Content type
application/json
{
  • "message": "Successful logout"
}

Proxy

Display the default configuration of the Centreon proxy

Authorizations:

Responses

Response samples

Content type
application/json
{
  • "url": "proxy.internal.company.org",
  • "port": 3128,
  • "user": "proxy-user",
  • "password": "proxy-pass"
}

Update the default configuration of the Centreon proxy

Authorizations:
Request Body schema: application/json
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

Responses

Request samples

Content type
application/json
{
  • "url": "proxy.internal.company.org",
  • "port": 3128,
  • "user": "proxy-user",
  • "password": "proxy-pass"
}

Response samples

Content type
application/json
{
  • "code": 403,
  • "message": "You are not authorized to access this resource"
}

Monitoring Server

List all monitoring servers configurations

List all monitoring servers configurations.

The available parameters to search / sort_by are:

  • id
  • name
  • is_localhost
  • address
  • is_activate
Authorizations:
query Parameters
search
string

Retrieve only data matching the defined search value. Simple search can be done like the following example: search={"host.name":"Central"} Complex search can be done with aggregators and operators. Available search aggregators are:

  • $or
  • $and

Available search operators are:

  • $eq → equal
  • $neq → not equal
  • $lt → less than
  • $le → less or equal than
  • $gt → greater than
  • $ge → greater or equal than
  • $lk → like
  • $nk → not like
  • $in → in
  • $ni → not in

Examples without nested aggregators:

search={
  "$or":[
    {"host.name":{"$eq":"name_1"}},
    {"host.name":{"$eq":"name_2"}}
  ]
}
search={
  "$and":[
    {"host.address":{"$rg":"^10\.0\.0\.\d+$"}},
    {"host.name":{"$lk":"fr%"}}
  ]
}

Example with nested aggregators:

search={
  "$or":[
    {
      "$and":[
        {"host.address":{"$rg":"^10\.0\.0\.\d+$"}},
        {"host.name":{"$lk":"fr%"}}
      ]
    },
    {
      "$and":[
        {"host.address":{"$rg":"^192\.168\.0\.\d+$"}},
        {"host.name":{"$lk":"us%"}}
      ]
    }
  ]
}
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

Responses

Response samples

Content type
application/json
{
  • "result": [
    ],
  • "meta": {
    }
}

Host

List all hosts

List all the hosts in real-time monitoring.

The available parameters to search / sort_by are:

  • host.id
  • host.name
  • host.alias
  • host.address
  • host.state
  • poller.id
  • service.display_name
  • host_group.id
  • host.is_acknowledged
  • host.downtime
  • host.criticality
Authorizations:
query Parameters
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: search={"host.name":"Central"} Complex search can be done with aggregators and operators. Available search aggregators are:

  • $or
  • $and

Available search operators are:

  • $eq → equal
  • $neq → not equal
  • $lt → less than
  • $le → less or equal than
  • $gt → greater than
  • $ge → greater or equal than
  • $lk → like
  • $nk → not like
  • $in → in
  • $ni → not in

Examples without nested aggregators:

search={
  "$or":[
    {"host.name":{"$eq":"name_1"}},
    {"host.name":{"$eq":"name_2"}}
  ]
}
search={
  "$and":[
    {"host.address":{"$rg":"^10\.0\.0\.\d+$"}},
    {"host.name":{"$lk":"fr%"}}
  ]
}

Example with nested aggregators:

search={
  "$or":[
    {
      "$and":[
        {"host.address":{"$rg":"^10\.0\.0\.\d+$"}},
        {"host.name":{"$lk":"fr%"}}
      ]
    },
    {
      "$and":[
        {"host.address":{"$rg":"^192\.168\.0\.\d+$"}},
        {"host.name":{"$lk":"us%"}}
      ]
    }
  ]
}
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

Responses

Response samples

Content type
application/json
{
  • "result": [
    ],
  • "meta": {
    }
}

Get a host

Return a single host with full details and some details about its services.

Authorizations:
path Parameters
host_id
required
integer <int64>
Example: 12

ID of the host

Responses

Response samples

Content type
application/json
{
  • "id": 12,
  • "alias": "Central",
  • "display_name": "Central",
  • "name": "Central",
  • "state": 0,
  • "services": [
    ],
  • "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": [
    ],
  • "acknowledgement": {
    }
}

Service

List all services

List all the services in real-time monitoring.

The available parameters to search / sort_by are:

  • host.id
  • host.name
  • host.alias
  • host.address
  • host.state
  • host_group.id
  • service.display_name
  • service.description
  • service.is_acknowledged
  • service.output
  • service.state
  • service_group.id
  • poller.id
  • service.downtime
  • service.criticality
Authorizations:
query Parameters
search
string

Retrieve only data matching the defined search value. Simple search can be done like the following example: search={"host.name":"Central"} Complex search can be done with aggregators and operators. Available search aggregators are:

  • $or
  • $and

Available search operators are:

  • $eq → equal
  • $neq → not equal
  • $lt → less than
  • $le → less or equal than
  • $gt → greater than
  • $ge → greater or equal than
  • $lk → like
  • $nk → not like
  • $in → in
  • $ni → not in

Examples without nested aggregators:

search={
  "$or":[
    {"host.name":{"$eq":"name_1"}},
    {"host.name":{"$eq":"name_2"}}
  ]
}
search={
  "$and":[
    {"host.address":{"$rg":"^10\.0\.0\.\d+$"}},
    {"host.name":{"$lk":"fr%"}}
  ]
}

Example with nested aggregators:

search={
  "$or":[
    {
      "$and":[
        {"host.address":{"$rg":"^10\.0\.0\.\d+$"}},
        {"host.name":{"$lk":"fr%"}}
      ]
    },
    {
      "$and":[
        {"host.address":{"$rg":"^192\.168\.0\.\d+$"}},
        {"host.name":{"$lk":"us%"}}
      ]
    }
  ]
}
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

Responses

Response samples

Content type
application/json
{
  • "result": [
    ],
  • "meta": {
    }
}

List services related to a host

List all services related to a host in real-time monitoring.

The available parameters to search / sort_by are:

  • service.id
  • service.description
  • service.display_name
  • service_group.id
  • service.is_acknowledged
  • service.state
Authorizations:
path Parameters
host_id
required
integer <int64>
Example: 12

ID of the host

query Parameters
search
string

Retrieve only data matching the defined search value. Simple search can be done like the following example: search={"host.name":"Central"} Complex search can be done with aggregators and operators. Available search aggregators are:

  • $or
  • $and

Available search operators are:

  • $eq → equal
  • $neq → not equal
  • $lt → less than
  • $le → less or equal than
  • $gt → greater than
  • $ge → greater or equal than
  • $lk → like
  • $nk → not like
  • $in → in
  • $ni → not in

Examples without nested aggregators:

search={
  "$or":[
    {"host.name":{"$eq":"name_1"}},
    {"host.name":{"$eq":"name_2"}}
  ]
}
search={
  "$and":[
    {"host.address":{"$rg":"^10\.0\.0\.\d+$"}},
    {"host.name":{"$lk":"fr%"}}
  ]
}

Example with nested aggregators:

search={
  "$or":[
    {
      "$and":[
        {"host.address":{"$rg":"^10\.0\.0\.\d+$"}},
        {"host.name":{"$lk":"fr%"}}
      ]
    },
    {
      "$and":[
        {"host.address":{"$rg":"^192\.168\.0\.\d+$"}},
        {"host.name":{"$lk":"us%"}}
      ]
    }
  ]
}
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

Responses

Response samples

Content type
application/json
{
  • "result": [
    ],
  • "meta": {
    }
}

Get a service

Return a single service with full details.

Authorizations:
path Parameters
host_id
required
integer <int64>
Example: 12

ID of the host

service_id
required
integer <int64>
Example: 5

ID of the service

Responses

Response samples

Content type
application/json
{
  • "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": {
    },
  • "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": [
    ],
  • "acknowledgement": {
    },
  • "flapping": false
}

Host Group

List all host groups by host id

List all the host groups in real-time monitoring by host id

Authorizations:
path Parameters
host_id
required
integer <int64>
Example: 12

ID of the host

query Parameters
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

Responses

Response samples

Content type
application/json
{
  • "result": [
    ],
  • "meta": {
    }
}

List all host groups

List all the host groups in real-time monitoring.

The available parameters to search / sort_by are:

  • host.id
  • host.name
  • host.alias
  • host.address
  • host.state
  • poller.id
  • service.display_name
  • host_group.id
Authorizations:
query Parameters
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: search={"host.name":"Central"} Complex search can be done with aggregators and operators. Available search aggregators are:

  • $or
  • $and

Available search operators are:

  • $eq → equal
  • $neq → not equal
  • $lt → less than
  • $le → less or equal than
  • $gt → greater than
  • $ge → greater or equal than
  • $lk → like
  • $nk → not like
  • $in → in
  • $ni → not in

Examples without nested aggregators:

search={
  "$or":[
    {"host.name":{"$eq":"name_1"}},
    {"host.name":{"$eq":"name_2"}}
  ]
}
search={
  "$and":[
    {"host.address":{"$rg":"^10\.0\.0\.\d+$"}},
    {"host.name":{"$lk":"fr%"}}
  ]
}

Example with nested aggregators:

search={
  "$or":[
    {
      "$and":[
        {"host.address":{"$rg":"^10\.0\.0\.\d+$"}},
        {"host.name":{"$lk":"fr%"}}
      ]
    },
    {
      "$and":[
        {"host.address":{"$rg":"^192\.168\.0\.\d+$"}},
        {"host.name":{"$lk":"us%"}}
      ]
    }
  ]
}
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

Responses

Response samples

Content type
application/json
{
  • "result": [
    ],
  • "meta": {
    }
}

Service Group

Get service groups by host id and service id

Return a list of service groups for host-service pair.

Authorizations:
path Parameters
host_id
required
integer <int64>
Example: 12

ID of the host

service_id
required
integer <int64>
Example: 5

ID of the service

Responses

Response samples

Content type
application/json
{
  • "id": 13,
  • "name": "MySG"
}

List all service groups

List all the service groups in real-time monitoring.

The available parameters to search / sort_by are:

  • id
  • name
Authorizations:
query Parameters
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: search={"host.name":"Central"} Complex search can be done with aggregators and operators. Available search aggregators are:

  • $or
  • $and

Available search operators are:

  • $eq → equal
  • $neq → not equal
  • $lt → less than
  • $le → less or equal than
  • $gt → greater than
  • $ge → greater or equal than
  • $lk → like
  • $nk → not like
  • $in → in
  • $ni → not in

Examples without nested aggregators:

search={
  "$or":[
    {"host.name":{"$eq":"name_1"}},
    {"host.name":{"$eq":"name_2"}}
  ]
}
search={
  "$and":[
    {"host.address":{"$rg":"^10\.0\.0\.\d+$"}},
    {"host.name":{"$lk":"fr%"}}
  ]
}

Example with nested aggregators:

search={
  "$or":[
    {
      "$and":[
        {"host.address":{"$rg":"^10\.0\.0\.\d+$"}},
        {"host.name":{"$lk":"fr%"}}
      ]
    },
    {
      "$and":[
        {"host.address":{"$rg":"^192\.168\.0\.\d+$"}},
        {"host.name":{"$lk":"us%"}}
      ]
    }
  ]
}
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

Responses

Response samples

Content type
application/json
{
  • "result": [
    ],
  • "meta": {
    }
}

Acknowledgement

List all acknowledgements

Authorizations:
query Parameters
search
string

Retrieve only data matching the defined search value. Simple search can be done like the following example: search={"host.name":"Central"} Complex search can be done with aggregators and operators. Available search aggregators are:

  • $or
  • $and

Available search operators are:

  • $eq → equal
  • $neq → not equal
  • $lt → less than
  • $le → less or equal than
  • $gt → greater than
  • $ge → greater or equal than
  • $lk → like
  • $nk → not like
  • $in → in
  • $ni → not in

Examples without nested aggregators:

search={
  "$or":[
    {"host.name":{"$eq":"name_1"}},
    {"host.name":{"$eq":"name_2"}}
  ]
}
search={
  "$and":[
    {"host.address":{"$rg":"^10\.0\.0\.\d+$"}},
    {"host.name":{"$lk":"fr%"}}
  ]
}

Example with nested aggregators:

search={
  "$or":[
    {
      "$and":[
        {"host.address":{"$rg":"^10\.0\.0\.\d+$"}},
        {"host.name":{"$lk":"fr%"}}
      ]
    },
    {
      "$and":[
        {"host.address":{"$rg":"^192\.168\.0\.\d+$"}},
        {"host.name":{"$lk":"us%"}}
      ]
    }
  ]
}
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

Responses

Response samples

Content type
application/json
{
  • "result": [
    ],
  • "meta": {
    }
}

Massively disacknowledge resources

Authorizations:
Request Body schema: application/json
object (Disacknowledgement.Resource)
Array of objects[ items ]

Responses

Request samples

Content type
application/json
{
  • "disacknowledgement": {
    },
  • "resources": [
    ]
}

Response samples

Content type
application/json
{
  • "code": 403,
  • "message": "You are not authorized to access this resource"
}

Display one acknowledgement

Display one acknowledgement.

Authorizations:
path Parameters
acknowledgement_id
required
integer <int64>
Example: 227

ID of the acknowledgement

Responses

Response samples

Content type
application/json
{
  • "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
}

List all hosts acknowledgements

Authorizations:
query Parameters
search
string

Retrieve only data matching the defined search value. Simple search can be done like the following example: search={"host.name":"Central"} Complex search can be done with aggregators and operators. Available search aggregators are:

  • $or
  • $and

Available search operators are:

  • $eq → equal
  • $neq → not equal
  • $lt → less than
  • $le → less or equal than
  • $gt → greater than
  • $ge → greater or equal than
  • $lk → like
  • $nk → not like
  • $in → in
  • $ni → not in

Examples without nested aggregators:

search={
  "$or":[
    {"host.name":{"$eq":"name_1"}},
    {"host.name":{"$eq":"name_2"}}
  ]
}
search={
  "$and":[
    {"host.address":{"$rg":"^10\.0\.0\.\d+$"}},
    {"host.name":{"$lk":"fr%"}}
  ]
}

Example with nested aggregators:

search={
  "$or":[
    {
      "$and":[
        {"host.address":{"$rg":"^10\.0\.0\.\d+$"}},
        {"host.name":{"$lk":"fr%"}}
      ]
    },
    {
      "$and":[
        {"host.address":{"$rg":"^192\.168\.0\.\d+$"}},
        {"host.name":{"$lk":"us%"}}
      ]
    }
  ]
}
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

Responses

Response samples

Content type
application/json
{
  • "result": [
    ],
  • "meta": {
    }
}

Add an acknowledgement on multiple hosts

Authorizations:
Request Body schema: application/json
Array
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)

Responses

Request samples

Content type
application/json
[
  • {
    }
]

Response samples

Content type
application/json
{
  • "code": 403,
  • "message": "You are not authorized to access this resource"
}

List all services acknowledgements

Authorizations:
query Parameters
search
string

Retrieve only data matching the defined search value. Simple search can be done like the following example: search={"host.name":"Central"} Complex search can be done with aggregators and operators. Available search aggregators are:

  • $or
  • $and

Available search operators are:

  • $eq → equal
  • $neq → not equal
  • $lt → less than
  • $le → less or equal than
  • $gt → greater than
  • $ge → greater or equal than
  • $lk → like
  • $nk → not like
  • $in → in
  • $ni → not in

Examples without nested aggregators:

search={
  "$or":[
    {"host.name":{"$eq":"name_1"}},
    {"host.name":{"$eq":"name_2"}}
  ]
}
search={
  "$and":[
    {"host.address":{"$rg":"^10\.0\.0\.\d+$"}},
    {"host.name":{"$lk":"fr%"}}
  ]
}

Example with nested aggregators:

search={
  "$or":[
    {
      "$and":[
        {"host.address":{"$rg":"^10\.0\.0\.\d+$"}},
        {"host.name":{"$lk":"fr%"}}
      ]
    },
    {
      "$and":[
        {"host.address":{"$rg":"^192\.168\.0\.\d+$"}},
        {"host.name":{"$lk":"us%"}}
      ]
    }
  ]
}
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

Responses

Response samples

Content type
application/json
{
  • "result": [
    ],
  • "meta": {
    }
}

Add an acknowledgement on multiple services

Authorizations:
Request Body schema: application/json
Array
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)

Responses

Request samples

Content type
application/json
[
  • {
    }
]

Response samples

Content type
application/json
{
  • "code": 403,
  • "message": "You are not authorized to access this resource"
}

List all acknowledgements of a host

Authorizations:
path Parameters
host_id
required
integer <int64>
Example: 12

ID of the host

query Parameters
search
string

Retrieve only data matching the defined search value. Simple search can be done like the following example: search={"host.name":"Central"} Complex search can be done with aggregators and operators. Available search aggregators are:

  • $or
  • $and

Available search operators are:

  • $eq → equal
  • $neq → not equal
  • $lt → less than
  • $le → less or equal than
  • $gt → greater than
  • $ge → greater or equal than
  • $lk → like
  • $nk → not like
  • $in → in
  • $ni → not in

Examples without nested aggregators:

search={
  "$or":[
    {"host.name":{"$eq":"name_1"}},
    {"host.name":{"$eq":"name_2"}}
  ]
}
search={
  "$and":[
    {"host.address":{"$rg":"^10\.0\.0\.\d+$"}},
    {"host.name":{"$lk":"fr%"}}
  ]
}

Example with nested aggregators:

search={
  "$or":[
    {
      "$and":[
        {"host.address":{"$rg":"^10\.0\.0\.\d+$"}},
        {"host.name":{"$lk":"fr%"}}
      ]
    },
    {
      "$and":[
        {"host.address":{"$rg":"^192\.168\.0\.\d+$"}},
        {"host.name":{"$lk":"us%"}}
      ]
    }
  ]
}
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

Responses

Response samples

Content type
application/json
{
  • "result": [
    ],
  • "meta": {
    }
}

Add an acknowledgement on chosen host

Authorizations:
path Parameters
host_id
required
integer <int64>
Example: 12

ID of the host

Request Body schema: application/json
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

Responses

Request samples

Content type
application/json
{
  • "comment": "Acknowledged by admin",
  • "is_notify_contacts": false,
  • "is_persistent_comment": true,
  • "is_sticky": true,
  • "with_services": true
}

Response samples

Content type
application/json
{
  • "code": 403,
  • "message": "You are not authorized to access this resource"
}

Cancel an acknowledgement on a host

Authorizations:
path Parameters
host_id
required
integer <int64>
Example: 12

ID of the host

Responses

Response samples

Content type
application/json
{
  • "code": 403,
  • "message": "You are not authorized to access this resource"
}

List all acknowledgements of a service

Authorizations:
path Parameters
host_id
required
integer <int64>
Example: 12

ID of the host

service_id
required
integer <int64>
Example: 5

ID of the service

query Parameters
search
string

Retrieve only data matching the defined search value. Simple search can be done like the following example: search={"host.name":"Central"} Complex search can be done with aggregators and operators. Available search aggregators are:

  • $or
  • $and

Available search operators are:

  • $eq → equal
  • $neq → not equal
  • $lt → less than
  • $le → less or equal than
  • $gt → greater than
  • $ge → greater or equal than
  • $lk → like
  • $nk → not like
  • $in → in
  • $ni → not in

Examples without nested aggregators:

search={
  "$or":[
    {"host.name":{"$eq":"name_1"}},
    {"host.name":{"$eq":"name_2"}}
  ]
}
search={
  "$and":[
    {"host.address":{"$rg":"^10\.0\.0\.\d+$"}},
    {"host.name":{"$lk":"fr%"}}
  ]
}

Example with nested aggregators:

search={
  "$or":[
    {
      "$and":[
        {"host.address":{"$rg":"^10\.0\.0\.\d+$"}},
        {"host.name":{"$lk":"fr%"}}
      ]
    },
    {
      "$and":[
        {"host.address":{"$rg":"^192\.168\.0\.\d+$"}},
        {"host.name":{"$lk":"us%"}}
      ]
    }
  ]
}
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

Responses

Response samples

Content type
application/json
{
  • "result": [
    ],
  • "meta": {
    }
}

Add an acknowledgement on chosen service

Authorizations:
path Parameters
host_id
required
integer <int64>
Example: 12

ID of the host

service_id
required
integer <int64>
Example: 5

ID of the service

Request Body schema: application/json
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

Responses

Request samples

Content type
application/json
{
  • "comment": "Acknowledged by admin",
  • "is_notify_contacts": false,
  • "is_persistent_comment": true,
  • "is_sticky": true
}

Response samples

Content type
application/json
{
  • "code": 403,
  • "message": "You are not authorized to access this resource"
}

Cancel an acknowledgement on a service

Authorizations:
path Parameters
host_id
required
integer <int64>
Example: 12

ID of the host

service_id
required
integer <int64>
Example: 5

ID of the service

Responses

Response samples

Content type
application/json
{
  • "code": 403,
  • "message": "You are not authorized to access this resource"
}

Acknowledge multiple resources

Authorizations:
Request Body schema: application/json
object (Acknowledgement.Resource)
Array of objects[ items ]

Responses

Request samples

Content type
application/json
{
  • "acknowledgement": {
    },
  • "resources": [
    ]
}

Response samples

Content type
application/json
{
  • "code": 403,
  • "message": "You are not authorized to access this resource"
}

Downtime

List all downtimes

List all downtimes

The available parameters to search / sort_by are:

  • id
  • entry_time
  • is_cancelled
  • comment
  • deletion_time
  • duration
  • end_time
  • is_fixed
  • start_time
  • host.id
  • host.name
  • host.alias
  • host.address
  • host.display_name
  • host.state
  • poller.id
  • contact.id
  • contact.name
Authorizations:
query Parameters
search
string

Retrieve only data matching the defined search value. Simple search can be done like the following example: search={"host.name":"Central"} Complex search can be done with aggregators and operators. Available search aggregators are:

  • $or
  • $and

Available search operators are:

  • $eq → equal
  • $neq → not equal
  • $lt → less than
  • $le → less or equal than
  • $gt → greater than
  • $ge → greater or equal than
  • $lk → like
  • $nk → not like
  • $in → in
  • $ni → not in

Examples without nested aggregators:

search={
  "$or":[
    {"host.name":{"$eq":"name_1"}},
    {"host.name":{"$eq":"name_2"}}
  ]
}
search={
  "$and":[
    {"host.address":{"$rg":"^10\.0\.0\.\d+$"}},
    {"host.name":{"$lk":"fr%"}}
  ]
}

Example with nested aggregators:

search={
  "$or":[
    {
      "$and":[
        {"host.address":{"$rg":"^10\.0\.0\.\d+$"}},
        {"host.name":{"$lk":"fr%"}}
      ]
    },
    {
      "$and":[
        {"host.address":{"$rg":"^192\.168\.0\.\d+$"}},
        {"host.name":{"$lk":"us%"}}
      ]
    }
  ]
}
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

Responses

Response samples

Content type
application/json
{
  • "result": [
    ],
  • "meta": {
    }
}

Display one downtime

Display one downtime.

Authorizations:
path Parameters
downtime_id
required
integer <int64>
Example: 329

ID of the downtime

Responses

Response samples

Content type
application/json
{
  • "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
}

Cancel a downtime

Cancel a downtime.

Authorizations:
path Parameters
downtime_id
required
integer <int64>
Example: 329

ID of the downtime

Responses

Response samples

Content type
application/json
{
  • "code": 403,
  • "message": "You are not authorized to access this resource"
}

List all hosts downtimes

List all downtimes of hosts

The available parameters to search / sort_by are:

  • id
  • entry_time
  • is_cancelled
  • comment
  • deletion_time
  • duration
  • end_time
  • is_fixed
  • start_time
  • host.id
  • host.name
  • host.alias
  • host.address
  • host.display_name
  • host.state
  • poller.id
  • contact.id
  • contact.name
Authorizations:
query Parameters
search
string

Retrieve only data matching the defined search value. Simple search can be done like the following example: search={"host.name":"Central"} Complex search can be done with aggregators and operators. Available search aggregators are:

  • $or
  • $and

Available search operators are:

  • $eq → equal
  • $neq → not equal
  • $lt → less than
  • $le → less or equal than
  • $gt → greater than
  • $ge → greater or equal than
  • $lk → like
  • $nk → not like
  • $in → in
  • $ni → not in

Examples without nested aggregators:

search={
  "$or":[
    {"host.name":{"$eq":"name_1"}},
    {"host.name":{"$eq":"name_2"}}
  ]
}
search={
  "$and":[
    {"host.address":{"$rg":"^10\.0\.0\.\d+$"}},
    {"host.name":{"$lk":"fr%"}}
  ]
}

Example with nested aggregators:

search={
  "$or":[
    {
      "$and":[
        {"host.address":{"$rg":"^10\.0\.0\.\d+$"}},
        {"host.name":{"$lk":"fr%"}}
      ]
    },
    {
      "$and":[
        {"host.address":{"$rg":"^192\.168\.0\.\d+$"}},
        {"host.name":{"$lk":"us%"}}
      ]
    }
  ]
}
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

Responses

Response samples

Content type
application/json
{
  • "result": [
    ],
  • "meta": {
    }
}

Add an downtime on multiple hosts

Authorizations:
Request Body schema: application/json
Array
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

author_id
integer

ID of the contact who requested the downtime

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)

Responses

Request samples

Content type
application/json
[
  • {
    }
]

Response samples

Content type
application/json
{
  • "code": 403,
  • "message": "You are not authorized to access this resource"
}

List all services downtimes

List all downtimes of services

The available parameters to search / sort_by are:

  • id
  • entry_time
  • is_cancelled
  • comment
  • deletion_time
  • duration
  • end_time
  • is_fixed
  • start_time
  • host.id
  • host.name
  • host.alias
  • host.address
  • host.display_name
  • host.state
  • poller.id
  • contact.id
  • contact.name
Authorizations:
query Parameters
search
string

Retrieve only data matching the defined search value. Simple search can be done like the following example: search={"host.name":"Central"} Complex search can be done with aggregators and operators. Available search aggregators are:

  • $or
  • $and

Available search operators are:

  • $eq → equal
  • $neq → not equal
  • $lt → less than
  • $le → less or equal than
  • $gt → greater than
  • $ge → greater or equal than
  • $lk → like
  • $nk → not like
  • $in → in
  • $ni → not in

Examples without nested aggregators:

search={
  "$or":[
    {"host.name":{"$eq":"name_1"}},
    {"host.name":{"$eq":"name_2"}}
  ]
}
search={
  "$and":[
    {"host.address":{"$rg":"^10\.0\.0\.\d+$"}},
    {"host.name":{"$lk":"fr%"}}
  ]
}

Example with nested aggregators:

search={
  "$or":[
    {
      "$and":[
        {"host.address":{"$rg":"^10\.0\.0\.\d+$"}},
        {"host.name":{"$lk":"fr%"}}
      ]
    },
    {
      "$and":[
        {"host.address":{"$rg":"^192\.168\.0\.\d+$"}},
        {"host.name":{"$lk":"us%"}}
      ]
    }
  ]
}
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

Responses

Response samples

Content type
application/json
{
  • "result": [
    ],
  • "meta": {
    }
}

Add an downtime on multiple services

Authorizations:
Request Body schema: application/json
Array
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

author_id
integer

ID of the contact who requested the downtime

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)

Responses

Request samples

Content type
application/json
[
  • {
    }
]

Response samples

Content type
application/json
{
  • "code": 403,
  • "message": "You are not authorized to access this resource"
}

List all downtimes of a host

List all downtimes of a host.

The available parameters to search / sort_by are:

  • id
  • entry_time
  • is_cancelled
  • comment
  • deletion_time
  • duration
  • end_time
  • is_fixed
  • start_time
  • contact.id
  • contact.name
Authorizations:
path Parameters
host_id
required
integer <int64>
Example: 12

ID of the host

query Parameters
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: search={"host.name":"Central"} Complex search can be done with aggregators and operators. Available search aggregators are:

  • $or
  • $and

Available search operators are:

  • $eq → equal
  • $neq → not equal
  • $lt → less than
  • $le → less or equal than
  • $gt → greater than
  • $ge → greater or equal than
  • $lk → like
  • $nk → not like
  • $in → in
  • $ni → not in

Examples without nested aggregators:

search={
  "$or":[
    {"host.name":{"$eq":"name_1"}},
    {"host.name":{"$eq":"name_2"}}
  ]
}
search={
  "$and":[
    {"host.address":{"$rg":"^10\.0\.0\.\d+$"}},
    {"host.name":{"$lk":"fr%"}}
  ]
}

Example with nested aggregators:

search={
  "$or":[
    {
      "$and":[
        {"host.address":{"$rg":"^10\.0\.0\.\d+$"}},
        {"host.name":{"$lk":"fr%"}}
      ]
    },
    {
      "$and":[
        {"host.address":{"$rg":"^192\.168\.0\.\d+$"}},
        {"host.name":{"$lk":"us%"}}
      ]
    }
  ]
}
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

Responses

Response samples

Content type
application/json
{
  • "result": [
    ],
  • "meta": {
    }
}

Add a downtime on a host

Add a downtime on a host.

Authorizations:
path Parameters
host_id
required
integer <int64>
Example: 12

ID of the host

Request Body schema: application/json
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

author_id
integer

ID of the contact who requested the downtime

comment
string

Comment of the downtime

with_services
boolean

Indicates whether we should add the downtime on the host-related services

Responses

Request samples

Content type
application/json
{
  • "start_time": "2019-08-24T14:15:22Z",
  • "end_time": "2019-08-24T14:15:22Z",
  • "is_fixed": true,
  • "duration": 3600,
  • "author_id": 3,
  • "comment": "Downtime set by admin",
  • "with_services": true
}

Response samples

Content type
application/json
{
  • "code": 403,
  • "message": "You are not authorized to access this resource"
}

List all downtimes of a service

List all downtimes of a service.

The available parameters to search / sort_by are:

  • id
  • entry_time
  • is_cancelled
  • comment
  • deletion_time
  • duration
  • end_time
  • is_fixed
  • start_time
  • contact.id
  • contact.name
Authorizations:
path Parameters
host_id
required
integer <int64>
Example: 12

ID of the host

service_id
required
integer <int64>
Example: 5

ID of the service

query Parameters
search
string

Retrieve only data matching the defined search value. Simple search can be done like the following example: search={"host.name":"Central"} Complex search can be done with aggregators and operators. Available search aggregators are:

  • $or
  • $and

Available search operators are:

  • $eq → equal
  • $neq → not equal
  • $lt → less than
  • $le → less or equal than
  • $gt → greater than
  • $ge → greater or equal than
  • $lk → like
  • $nk → not like
  • $in → in
  • $ni → not in

Examples without nested aggregators:

search={
  "$or":[
    {"host.name":{"$eq":"name_1"}},
    {"host.name":{"$eq":"name_2"}}
  ]
}
search={
  "$and":[
    {"host.address":{"$rg":"^10\.0\.0\.\d+$"}},
    {"host.name":{"$lk":"fr%"}}
  ]
}

Example with nested aggregators:

search={
  "$or":[
    {
      "$and":[
        {"host.address":{"$rg":"^10\.0\.0\.\d+$"}},
        {"host.name":{"$lk":"fr%"}}
      ]
    },
    {
      "$and":[
        {"host.address":{"$rg":"^192\.168\.0\.\d+$"}},
        {"host.name":{"$lk":"us%"}}
      ]
    }
  ]
}
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

Responses

Response samples

Content type
application/json
{
  • "result": [
    ],
  • "meta": {
    }
}

Add a downtime on a service

Add a downtime on a service.

Authorizations:
path Parameters
host_id
required
integer <int64>
Example: 12

ID of the host

service_id
required
integer <int64>
Example: 5

ID of the service

Request Body schema: application/json
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

author_id
integer

ID of the contact who requested the downtime

comment
string

Comment of the downtime

Responses

Request samples

Content type
application/json
{
  • "start_time": "2019-08-24T14:15:22Z",
  • "end_time": "2019-08-24T14:15:22Z",
  • "is_fixed": true,
  • "duration": 3600,
  • "author_id": 3,
  • "comment": "Downtime set by admin"
}

Response samples

Content type
application/json
{
  • "code": 403,
  • "message": "You are not authorized to access this resource"
}

Set downtime for multiple resources

Authorizations:
Request Body schema: application/json
object (Downtime.Resource)
Array of objects[ items ]

Responses

Request samples

Content type
application/json
{
  • "downtime": {
    },
  • "resources": [
    ]
}

Response samples

Content type
application/json
{
  • "code": 403,
  • "message": "You are not authorized to access this resource"
}

Topology

Register to platform topology

Register a server to the platform topology

Authorizations:
Request Body schema: application/json
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 :

  • 'Central'
  • 'Poller'
  • 'Remote'
  • 'MAP'
  • 'MBI'
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

Responses

Request samples

Content type
application/json
{
  • "name": "myPoller",
  • "hostname": "my.poller.physical.hostname",
  • "type": "poller",
  • "address": "1.1.1.2",
  • "parent_address": "1.1.1.1"
}

Response samples

Content type
application/json
{
  • "code": 403,
  • "message": "You are not authorized to access this resource"
}

Get a platform topology

Get a platform topology in Json Graph Format

Authorizations:

Responses

Response samples

Content type
application/json
{
  • "graph": {
    }
}

Delete a Platform

Delete a platform from the topology

Authorizations:
path Parameters
poller_id
required
integer <int64>
Example: 5

ID of the poller

Responses

Response samples

Content type
application/json
{
  • "code": 403,
  • "message": "You are not authorized to access this resource"
}

Icons

List all icons

List all icons from centreon configuration.

The available parameters to search / sort_by are:

  • id
  • name
Authorizations:

Responses

Response samples

Content type
application/json
{
  • "result": [
    ],
  • "meta": {
    }
}

User ACL actions

List allowed actions

List allowed actions of the current user.

Authorizations:

Responses

Response samples

Content type
application/json
{
  • "host": {
    },
  • "service": {
    }
}

User parameters

List user parameters

List configured parameters for the current user

Authorizations:

Responses

Response samples

Content type
application/json
{
  • "id": 1,
  • "name": "Administrator",
  • "alias": "admin",
  • "email": "admin@localhost",
  • "timezone": "Europe/Paris",
  • "locale": "en_US",
  • "is_admin": true,
  • "use_deprecated_pages": false
}

User filters

List user filters by page

internal

Since Centreon web 20.04.6

List user filters saved for a given page.

Authorizations:
path Parameters
page_name
required
string
Example: events-view

name of the page

Responses

Response samples

Content type
application/json
{
  • "result": [
    ],
  • "meta": {
    }
}

Add user filter

internal

Since Centreon web 20.04.6

Add user filter for a given page.

Authorizations:
path Parameters
page_name
required
string
Example: events-view

name of the page

Request Body schema: application/json
name
string

filter name

criterias
Array of objects[ items ]

list of filter criterias

Responses

Request samples

Content type
application/json
{
  • "name": "my filter 1",
  • "criterias": [
    ]
}

Response samples

Content type
application/json
{
  • "id": 1,
  • "name": "my filter 1",
  • "criterias": [
    ],
  • "order": 1
}

Detailed user filter

internal

Since Centreon web 20.04.6

Get detailed information of a user filter for a given page.

Authorizations:
path Parameters
page_name
required
string
Example: events-view

name of the page

filter_id
required
integer <int64>
Example: 1

id of the filter

Responses

Response samples

Content type
application/json
{
  • "id": 1,
  • "name": "my filter 1",
  • "criterias": [
    ],
  • "order": 1
}

Update user filter

internal

Since Centreon web 20.04.6

Update user filter for a given page.

Authorizations:
path Parameters
page_name
required
string
Example: events-view

name of the page

filter_id
required
integer <int64>
Example: 1

id of the filter

Request Body schema: application/json
id
integer

filter id

name
required
string

filter name

criterias
required
Array of objects[ items ]

list of filter criterias

order
integer

filter order

Responses

Request samples

Content type
application/json
{
  • "id": 1,
  • "name": "my filter 1",
  • "criterias": [
    ],
  • "order": 1
}

Response samples

Content type
application/json
{
  • "id": 1,
  • "name": "my filter 1",
  • "criterias": [
    ],
  • "order": 1
}

Patch user filter

internal

Since Centreon web 20.04.6

Patch user filter order for a given page.

Authorizations:
path Parameters
page_name
required
string
Example: events-view

name of the page

filter_id
required
integer <int64>
Example: 1

id of the filter

Request Body schema: application/json
order
required
integer

filter order

Responses

Request samples

Content type
application/json
{
  • "order": 1
}

Response samples

Content type
application/json
{
  • "id": 1,
  • "name": "my filter 1",
  • "criterias": [
    ],
  • "order": 1
}

Delete user filter

internal

Since Centreon web 20.04.6

Delete user filter for a given page.

Authorizations:
path Parameters
page_name
required
string
Example: events-view

name of the page

filter_id
required
integer <int64>
Example: 1

id of the filter

Responses

Response samples

Content type
application/json
{
  • "code": 403,
  • "message": "You are not authorized to access this resource"
}

Resource

List all resources including hosts and services

List all the resources in real-time monitoring : hosts and services.

The available parameters to search / sort_by are:

  • id
  • name
  • alias
  • fqdn
  • type
  • status_code
  • status
  • action_url
  • notes_label
  • notes_url
  • parent_name
  • parent_status
  • severity_level
  • in_downtime
  • acknowledged
  • last_status_change
  • tries
  • last_check
  • information

Only for searching:


  • h.name
  • h.alias
  • h.address
  • h.fqdn
  • s.description
Authorizations:
query Parameters
search
string

Retrieve only data matching the defined search value. Simple search can be done like the following example: search={"host.name":"Central"} Complex search can be done with aggregators and operators. Available search aggregators are:

  • $or
  • $and

Available search operators are:

  • $eq → equal
  • $neq → not equal
  • $lt → less than
  • $le → less or equal than
  • $gt → greater than
  • $ge → greater or equal than
  • $lk → like
  • $nk → not like
  • $in → in
  • $ni → not in

Examples without nested aggregators:

search={
  "$or":[
    {"host.name":{"$eq":"name_1"}},
    {"host.name":{"$eq":"name_2"}}
  ]
}
search={
  "$and":[
    {"host.address":{"$rg":"^10\.0\.0\.\d+$"}},
    {"host.name":{"$lk":"fr%"}}
  ]
}

Example with nested aggregators:

search={
  "$or":[
    {
      "$and":[
        {"host.address":{"$rg":"^10\.0\.0\.\d+$"}},
        {"host.name":{"$lk":"fr%"}}
      ]
    },
    {
      "$and":[
        {"host.address":{"$rg":"^192\.168\.0\.\d+$"}},
        {"host.name":{"$lk":"us%"}}
      ]
    }
  ]
}
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"
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_ids
Array of integers <int64> [ items &lt;int64&gt; ]
Example: hostgroup_ids=[13, 22, 31]

Filter the resources by host group ID

servicegroup_ids
Array of integers <int64> [ items &lt;int64&gt; ]
Example: servicegroup_ids=[2033]

Filter the resources by service group ID

Responses

Response samples

Content type
application/json
{
  • "result": [
    ],
  • "meta": {
    }
}

Check

Check multiple hosts

Authorizations:
Request Body schema: application/json
Array
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)

Responses

Request samples

Content type
application/json
[
  • {
    }
]

Response samples

Content type
application/json
{
  • "code": 403,
  • "message": "You are not authorized to access this resource"
}

Check multiple services

Authorizations:
Request Body schema: application/json
Array
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)

Responses

Request samples

Content type
application/json
[
  • {
    }
]

Response samples

Content type
application/json
{
  • "code": 403,
  • "message": "You are not authorized to access this resource"
}

Check host

Schedule immediate check on chosen host

Authorizations:
path Parameters
host_id
required
integer <int64>
Example: 12

ID of the host

Request Body schema: application/json
is_forced
boolean

Indicates whether the check is forced (do not take into account the check timeperiod)

Responses

Request samples

Content type
application/json
{
  • "is_forced": true
}

Response samples

Content type
application/json
{
  • "code": 403,
  • "message": "You are not authorized to access this resource"
}

Check service

Schedule immediate check on chosen service

Authorizations:
path Parameters
host_id
required
integer <int64>
Example: 12

ID of the host

service_id
required
integer <int64>
Example: 5

ID of the service

Request Body schema: application/json
is_forced
boolean

Indicates whether the check is forced (do not take into account the check timeperiod)

Responses

Request samples

Content type
application/json
{
  • "is_forced": true
}

Response samples

Content type
application/json
{
  • "code": 403,
  • "message": "You are not authorized to access this resource"
}

Check resources

Schedule immediate check on chosen resources

Authorizations:
Request Body schema: application/json
Array of objects[ items ]

Responses

Request samples

Content type
application/json
{
  • "resources": [
    ]
}

Response samples

Content type
application/json
{
  • "code": 403,
  • "message": "You are not authorized to access this resource"
}

Submit

Submit a result to a single host

Submit a result (check status, output and perfdata) to a single host

Authorizations:
path Parameters
host_id
required
integer <int64>
Example: 12

ID of the host

Request Body schema: application/json
status
required
integer
Enum: 0 1 2

Host status code that can be submitted

  • 0 - UP
  • 1 - DOWN
  • 2 - UNREACHABLE
output
string or null

Output result of the check sent

performance_data
string or null

Performance data result of the check sent

Responses

Request samples

Content type
application/json
{
  • "status": 1,
  • "output": "CRITICAL: Connection lost",
  • "performance_data": "'nbproc'=0;;1:1;0;"
}

Response samples

Content type
application/json
{
  • "code": 401,
  • "message": "string"
}

Submit a result to a single service

Submit a result (check status, output and perfdata) to a single service

Authorizations:
path Parameters
host_id
required
integer <int64>
Example: 12

ID of the host

service_id
required
integer <int64>
Example: 5

ID of the service

Request Body schema: application/json
status
required
string
Enum: 0 1 2 3

Service status code that can be submitted

  • 0 - OK
  • 1 - WARNING
  • 2 - CRITICAL
  • 3 - UNKNOWN
output
string or null

Output result of the check sent

performance_data
string or null

Performance data result of the check sent

Responses

Request samples

Content type
application/json
{
  • "status": 2,
  • "output": "CRITICAL: Memory exceeded ",
  • "performance_data": "'used'=453849088B;;;0;1927262208"
}

Response samples

Content type
application/json
{
  • "code": 401,
  • "message": "string"
}

Submit result to resources

Submit a result (check status, output and perfdata) to resources

Authorizations:
Request Body schema: application/json
required
Array of objects[ items ]

Responses

Request samples

Content type
application/json
{
  • "resources": [
    ]
}

Response samples

Content type
application/json
{
  • "code": 401,
  • "message": "string"
}

Metrics

Get service metrics

Authorizations:
path Parameters
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)

Responses

Response samples

Content type
application/json
{
  • "global": {
    },
  • "metrics": [
    ],
  • "times": [
    ]
}

Get service status data

Get status data from a service between given interval

Authorizations:
path Parameters
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)

Responses

Response samples

Content type
application/json
{
  • "critical": [
    ],
  • "warning": [
    ],
  • "ok": [
    ],
  • "unknown": [
    ]
}

Get service performance data

Authorizations:
path Parameters
host_id
required
integer <int64>
Example: 12

ID of the host

service_id
required
integer <int64>
Example: 5

ID of the service

query Parameters
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)

Responses

Response samples

Content type
application/json
{
  • "global": {
    },
  • "metrics": [
    ],
  • "times": [
    ]
}

Get service status data

Get status data from a service between given interval

Authorizations:
path Parameters
host_id
required
integer <int64>
Example: 12

ID of the host

service_id
required
integer <int64>
Example: 5

ID of the service

query Parameters
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)

Responses

Response samples

Content type
application/json
{
  • "critical": [
    ],
  • "warning": [
    ],
  • "ok": [
    ],
  • "unknown": [
    ]
}

Timeline

Get host timeline

List all events for a given host

The available parameters to search / sort_by are:

  • type
  • content
  • date
Authorizations:
path Parameters
host_id
required
integer <int64>
Example: 12

ID of the host

query Parameters
search
string

Retrieve only data matching the defined search value. Simple search can be done like the following example: search={"host.name":"Central"} Complex search can be done with aggregators and operators. Available search aggregators are:

  • $or
  • $and

Available search operators are:

  • $eq → equal
  • $neq → not equal
  • $lt → less than
  • $le → less or equal than
  • $gt → greater than
  • $ge → greater or equal than
  • $lk → like
  • $nk → not like
  • $in → in
  • $ni → not in

Examples without nested aggregators:

search={
  "$or":[
    {"host.name":{"$eq":"name_1"}},
    {"host.name":{"$eq":"name_2"}}
  ]
}
search={
  "$and":[
    {"host.address":{"$rg":"^10\.0\.0\.\d+$"}},
    {"host.name":{"$lk":"fr%"}}
  ]
}

Example with nested aggregators:

search={
  "$or":[
    {
      "$and":[
        {"host.address":{"$rg":"^10\.0\.0\.\d+$"}},
        {"host.name":{"$lk":"fr%"}}
      ]
    },
    {
      "$and":[
        {"host.address":{"$rg":"^192\.168\.0\.\d+$"}},
        {"host.name":{"$lk":"us%"}}
      ]
    }
  ]
}
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

Responses

Response samples

Content type
application/json
{
  • "result": [
    ],
  • "meta": {
    }
}

Get service timeline

List all events for a given service

The available parameters to search / sort_by are:

  • type
  • content
  • date
Authorizations:
path Parameters
host_id
required
integer <int64>
Example: 12

ID of the host

service_id
required
integer <int64>
Example: 5

ID of the service

query Parameters
search
string

Retrieve only data matching the defined search value. Simple search can be done like the following example: search={"host.name":"Central"} Complex search can be done with aggregators and operators. Available search aggregators are:

  • $or
  • $and

Available search operators are:

  • $eq → equal
  • $neq → not equal
  • $lt → less than
  • $le → less or equal than
  • $gt → greater than
  • $ge → greater or equal than
  • $lk → like
  • $nk → not like
  • $in → in
  • $ni → not in

Examples without nested aggregators:

search={
  "$or":[
    {"host.name":{"$eq":"name_1"}},
    {"host.name":{"$eq":"name_2"}}
  ]
}
search={
  "$and":[
    {"host.address":{"$rg":"^10\.0\.0\.\d+$"}},
    {"host.name":{"$lk":"fr%"}}
  ]
}

Example with nested aggregators:

search={
  "$or":[
    {
      "$and":[
        {"host.address":{"$rg":"^10\.0\.0\.\d+$"}},
        {"host.name":{"$lk":"fr%"}}
      ]
    },
    {
      "$and":[
        {"host.address":{"$rg":"^192\.168\.0\.\d+$"}},
        {"host.name":{"$lk":"us%"}}
      ]
    }
  ]
}
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

Responses

Response samples

Content type
application/json
{
  • "result": [
    ],
  • "meta": {
    }
}

Platform

Update a platform information

Authorizations:
Request Body schema: application/json
platformName
string

The name of the platform

isRemote
boolean

Platform is a remote server

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

Responses

Request samples

Content type
application/json
{
  • "platformName": "string",
  • "isRemote": true,
  • "centralServerAddress": "192.168.0.1",
  • "apiUsername": "admin",
  • "apiCredentials": "centreon",
  • "apiScheme": "http",
  • "apiPort": "80",
  • "apiPath": "centreon",
  • "peerValidation": false,
  • "proxy": {
    }
}

Response samples

Content type
application/json
{
  • "code": 403,
  • "message": "You are not authorized to access this resource"
}

Gorgone

Gorgone poller responses token

Authorizations:
path Parameters
poller_id
required
integer <int64>
Example: 5

ID of the poller

token
required
string

Gorgone Token

Responses

Response samples

Content type
application/json
{ }

Gorgone command on specific poller

Authorizations:
path Parameters
poller_id
required
integer <int64>
Example: 5

ID of the poller

command_name
required
string

Gorgone Command

Responses

Response samples

Content type
application/json
{
  • "token": "string"
}

Administration parameters

Administration parameters

Authorizations:

Responses

Response samples

Content type
application/json
{
  • "monitoring_default_downtime_duration": 3600,
  • "monitoring_default_refresh_interval": 15
}