diff --git a/doc/API/centreon-api-v2.html b/doc/API/centreon-api-v2.html index a9847080aa6..4c48240f9fc 100644 --- a/doc/API/centreon-api-v2.html +++ b/doc/API/centreon-api-v2.html @@ -376,7 +376,7 @@

Responses

200

OK

403

Forbidden

500

Internal Server Error

-
get /configuration/monitoring-servers
{protocol}://{server}:{port}/centreon/api/{version}/configuration/monitoring-servers

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "result":
    [
    ],
  • "meta":
    {
    }
}

Host

List all hosts

List all the hosts in real-time monitoring.

+
get /configuration/monitoring-servers
{protocol}://{server}:{port}/centreon/api/{version}/configuration/monitoring-servers

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "result":
    [
    ],
  • "meta":
    {
    }
}

Host

List all hosts

List all the hosts in real-time monitoring.

The available parameters to search / sort_by are:

  • host.id
  • @@ -399,13 +399,13 @@

Responses

200

OK

403

Forbidden

500

Internal Server Error

-
get /monitoring/hosts
{protocol}://{server}:{port}/centreon/api/{version}/monitoring/hosts

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "result":
    [
    ],
  • "meta":
    {
    }
}

Get a host

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

+
get /monitoring/hosts
{protocol}://{server}:{port}/centreon/api/{version}/monitoring/hosts

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "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

200

OK

403

Forbidden

404

Not Found

500

Internal Server Error

-
get /monitoring/hosts/{host_id}
{protocol}://{server}:{port}/centreon/api/{version}/monitoring/hosts/{host_id}

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "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": "2020-02-25T12:20:19Z",
  • "last_hard_state_change": "2020-02-25T12:20:19Z",
  • "last_state_change": "2020-02-25T12:20:19Z",
  • "last_time_down": "2020-02-25T12:20:19Z",
  • "last_time_unreachable": "2020-02-25T12:20:19Z",
  • "last_time_up": "2020-02-25T12:20:19Z",
  • "last_update": "2020-02-25T12:20:19Z",
  • "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": "2020-02-25T12:20:19Z",
  • "last_notification": "2020-02-25T12:20:19Z",
  • "latency": 0.005,
  • "next_check": "2020-02-25T12:20:19Z",
  • "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
}

Service

List all services

List all the services in real-time monitoring.

+
get /monitoring/hosts/{host_id}
{protocol}://{server}:{port}/centreon/api/{version}/monitoring/hosts/{host_id}

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "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": "2020-02-28T09:16:16Z",
  • "last_hard_state_change": "2020-02-28T09:16:16Z",
  • "last_state_change": "2020-02-28T09:16:16Z",
  • "last_time_down": "2020-02-28T09:16:16Z",
  • "last_time_unreachable": "2020-02-28T09:16:16Z",
  • "last_time_up": "2020-02-28T09:16:16Z",
  • "last_update": "2020-02-28T09:16:16Z",
  • "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": "2020-02-28T09:16:16Z",
  • "last_notification": "2020-02-28T09:16:16Z",
  • "latency": 0.005,
  • "next_check": "2020-02-28T09:16:16Z",
  • "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
}

Service

List all services

List all the services in real-time monitoring.

The available parameters to search / sort_by are:

  • host.id
  • @@ -431,7 +431,7 @@

Responses

200

OK

403

Forbidden

500

Internal Server Error

-
get /monitoring/services
{protocol}://{server}:{port}/centreon/api/{version}/monitoring/services

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "result":
    [
    ],
  • "meta":
    {
    }
}

List services related to a host

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

+
get /monitoring/services
{protocol}://{server}:{port}/centreon/api/{version}/monitoring/services

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "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
  • @@ -450,14 +450,14 @@
403

Forbidden

404

Not Found

500

Internal Server Error

-
get /monitoring/hosts/{host_id}/services
{protocol}://{server}:{port}/centreon/api/{version}/monitoring/hosts/{host_id}/services

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "result":
    [
    ],
  • "meta":
    {
    }
}

Get a service

Return a single service with full details.

+
get /monitoring/hosts/{host_id}/services
{protocol}://{server}:{port}/centreon/api/{version}/monitoring/hosts/{host_id}/services

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "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

200

OK

403

Forbidden

404

Not Found

500

Internal Server Error

-
get /monitoring/hosts/{host_id}/services/{service_id}
{protocol}://{server}:{port}/centreon/api/{version}/monitoring/hosts/{host_id}/services/{service_id}

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "id": 5,
  • "description": "Ping",
  • "display_name": "Ping",
  • "state": 0,
  • "check_attempt": 1,
  • "icon_image": "",
  • "icon_image_alt": "",
  • "last_check": "2020-02-25T12:20:19Z",
  • "last_state_change": "2020-02-25T12:20:19Z",
  • "max_check_attempts": 3,
  • "output": "OK - 127.0.0.1 rta 0.025ms lost 0%\n",
  • "state_type": 1,
  • "criticality": 10,
  • "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": "2020-02-25T12:20:19Z",
  • "last_notification": "2020-02-25T12:20:19Z",
  • "last_time_critical": "2020-02-25T12:20:19Z",
  • "last_time_ok": "2020-02-25T12:20:19Z",
  • "last_time_unknown": "2020-02-25T12:20:19Z",
  • "last_time_warning": "2020-02-25T12:20:19Z",
  • "last_update": "2020-02-25T12:20:19Z",
  • "latency": 0.031,
  • "next_check": "2020-02-25T12:20:19Z",
  • "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
}

Host Group

List all host groups by host id

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

+
get /monitoring/hosts/{host_id}/services/{service_id}
{protocol}://{server}:{port}/centreon/api/{version}/monitoring/hosts/{host_id}/services/{service_id}

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "id": 5,
  • "description": "Ping",
  • "display_name": "Ping",
  • "state": 0,
  • "check_attempt": 1,
  • "icon_image": "",
  • "icon_image_alt": "",
  • "last_check": "2020-02-28T09:16:16Z",
  • "last_state_change": "2020-02-28T09:16:16Z",
  • "max_check_attempts": 3,
  • "output": "OK - 127.0.0.1 rta 0.025ms lost 0%\n",
  • "state_type": 1,
  • "criticality": 10,
  • "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": "2020-02-28T09:16:16Z",
  • "last_notification": "2020-02-28T09:16:16Z",
  • "last_time_critical": "2020-02-28T09:16:16Z",
  • "last_time_ok": "2020-02-28T09:16:16Z",
  • "last_time_unknown": "2020-02-28T09:16:16Z",
  • "last_time_warning": "2020-02-28T09:16:16Z",
  • "last_update": "2020-02-28T09:16:16Z",
  • "latency": 0.031,
  • "next_check": "2020-02-28T09:16:16Z",
  • "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
}

Host Group

List all host groups by host id

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

Authorizations:
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

@@ -521,27 +521,27 @@

Responses

200

OK

403

Forbidden

500

Internal Server Error

-
get /monitoring/acknowledgements
{protocol}://{server}:{port}/centreon/api/{version}/monitoring/acknowledgements

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "result":
    [
    ],
  • "meta":
    {
    }
}

Display one acknowledgement

Display one acknowledgement.

+
get /monitoring/acknowledgements
{protocol}://{server}:{port}/centreon/api/{version}/monitoring/acknowledgements

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "result":
    [
    ],
  • "meta":
    {
    }
}

Display one acknowledgement

Display one acknowledgement.

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

ID of the acknowledgement

Responses

200

OK

403

Forbidden

404

Not Found

500

Internal Server Error

-
get /monitoring/acknowledgements/{acknowledgement_id}
{protocol}://{server}:{port}/centreon/api/{version}/monitoring/acknowledgements/{acknowledgement_id}

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "id": 34,
  • "author_id": 3,
  • "comment": "Acknowledged by admin",
  • "deletion_time": "2020-02-25T12:20:19Z",
  • "entry_time": "2020-02-25T12:20:19Z",
  • "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
object
Example: search={"host.name":"Central"}

Retrieve only data matching the defined search value

+
get /monitoring/acknowledgements/{acknowledgement_id}
{protocol}://{server}:{port}/centreon/api/{version}/monitoring/acknowledgements/{acknowledgement_id}

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "id": 34,
  • "author_id": 3,
  • "comment": "Acknowledged by admin",
  • "deletion_time": "2020-02-28T09:16:16Z",
  • "entry_time": "2020-02-28T09:16:16Z",
  • "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
object
Example: search={"host.name":"Central"}

Retrieve only data matching the defined search value

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

200

OK

403

Forbidden

500

Internal Server Error

-
get /monitoring/hosts/acknowledgements
{protocol}://{server}:{port}/centreon/api/{version}/monitoring/hosts/acknowledgements

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "result":
    [
    ],
  • "meta":
    {
    }
}

List all services acknowledgements

Authorizations:
query Parameters
search
object
Example: search={"host.name":"Central"}

Retrieve only data matching the defined search value

+
get /monitoring/hosts/acknowledgements
{protocol}://{server}:{port}/centreon/api/{version}/monitoring/hosts/acknowledgements

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "result":
    [
    ],
  • "meta":
    {
    }
}

List all services acknowledgements

Authorizations:
query Parameters
search
object
Example: search={"host.name":"Central"}

Retrieve only data matching the defined search value

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

200

OK

403

Forbidden

500

Internal Server Error

-
get /monitoring/services/acknowledgements
{protocol}://{server}:{port}/centreon/api/{version}/monitoring/services/acknowledgements

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "result":
    [
    ],
  • "meta":
    {
    }
}

List all acknowledgements of a host

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

ID of the host

+
get /monitoring/services/acknowledgements
{protocol}://{server}:{port}/centreon/api/{version}/monitoring/services/acknowledgements

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "result":
    [
    ],
  • "meta":
    {
    }
}

List all acknowledgements of a host

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

ID of the host

query Parameters
search
object
Example: search={"host.name":"Central"}

Retrieve only data matching the defined search value

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

@@ -549,7 +549,7 @@

Responses

200

OK

403

Forbidden

500

Internal Server Error

-
get /monitoring/hosts/{host_id}/acknowledgements
{protocol}://{server}:{port}/centreon/api/{version}/monitoring/hosts/{host_id}/acknowledgements

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "result":
    [
    ],
  • "meta":
    {
    }
}

Add an acknowledgement on chosen host

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

ID of the host

+
get /monitoring/hosts/{host_id}/acknowledgements
{protocol}://{server}:{port}/centreon/api/{version}/monitoring/hosts/{host_id}/acknowledgements

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "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

@@ -570,7 +570,7 @@

Responses

200

OK

403

Forbidden

500

Internal Server Error

-
get /monitoring/hosts/{host_id}/services/{service_id}/acknowledgements
{protocol}://{server}:{port}/centreon/api/{version}/monitoring/hosts/{host_id}/services/{service_id}/acknowledgements

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "result":
    [
    ],
  • "meta":
    {
    }
}

Add an acknowledgement on chosen service

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

ID of the host

+
get /monitoring/hosts/{host_id}/services/{service_id}/acknowledgements
{protocol}://{server}:{port}/centreon/api/{version}/monitoring/hosts/{host_id}/services/{service_id}/acknowledgements

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "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

@@ -613,13 +613,13 @@

Responses

200

OK

403

Forbidden

500

Internal Server Error

-
get /monitoring/downtimes
{protocol}://{server}:{port}/centreon/api/{version}/monitoring/downtimes

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "result":
    [
    ],
  • "meta":
    {
    }
}

Display one downtime

Display one downtime.

+
get /monitoring/downtimes
{protocol}://{server}:{port}/centreon/api/{version}/monitoring/downtimes

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "result":
    [
    ],
  • "meta":
    {
    }
}

Display one downtime

Display one downtime.

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

ID of the downtime

Responses

200

OK

403

Forbidden

404

Not Found

500

Internal Server Error

-
get /monitoring/downtimes/{downtime_id}
{protocol}://{server}:{port}/centreon/api/{version}/monitoring/downtimes/{downtime_id}

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "id": 329,
  • "author_id": 3,
  • "host_id": 12,
  • "comment": "Downtime set by admin",
  • "duration": 7200,
  • "entry_time": "2020-02-25T12:20:19Z",
  • "start_time": "2020-02-25T12:20:19Z",
  • "end_time": "2020-02-25T12:20:19Z",
  • "deletion_time": null,
  • "actual_start_time": "2020-02-25T12:20:19Z",
  • "actual_end_time": null,
  • "is_started": true,
  • "is_cancelled": false,
  • "is_fixed": true,
  • "service_id": 5
}

Cancel a downtime

Cancel a downtime.

+
get /monitoring/downtimes/{downtime_id}
{protocol}://{server}:{port}/centreon/api/{version}/monitoring/downtimes/{downtime_id}

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "id": 329,
  • "author_id": 3,
  • "host_id": 12,
  • "comment": "Downtime set by admin",
  • "duration": 7200,
  • "entry_time": "2020-02-28T09:16:16Z",
  • "start_time": "2020-02-28T09:16:16Z",
  • "end_time": "2020-02-28T09:16:16Z",
  • "deletion_time": null,
  • "actual_start_time": "2020-02-28T09:16:16Z",
  • "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

204

Command Sent

403

Forbidden

@@ -654,7 +654,7 @@

Responses

200

OK

403

Forbidden

500

Internal Server Error

-
get /monitoring/hosts/downtimes
{protocol}://{server}:{port}/centreon/api/{version}/monitoring/hosts/downtimes

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "result":
    [
    ],
  • "meta":
    {
    }
}

List all services downtimes

List all downtimes of services

+
get /monitoring/hosts/downtimes
{protocol}://{server}:{port}/centreon/api/{version}/monitoring/hosts/downtimes

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "result":
    [
    ],
  • "meta":
    {
    }
}

List all services downtimes

List all downtimes of services

The available parameters to search / sort_by are:

  • id
  • @@ -683,7 +683,7 @@

Responses

200

OK

403

Forbidden

500

Internal Server Error

-
get /monitoring/services/downtimes
{protocol}://{server}:{port}/centreon/api/{version}/monitoring/services/downtimes

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "result":
    [
    ],
  • "meta":
    {
    }
}

List all downtimes of a host

List all downtimes of a host.

+
get /monitoring/services/downtimes
{protocol}://{server}:{port}/centreon/api/{version}/monitoring/services/downtimes

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "result":
    [
    ],
  • "meta":
    {
    }
}

List all downtimes of a host

List all downtimes of a host.

The available parameters to search / sort_by are:

  • id
  • @@ -707,7 +707,7 @@

Responses

200

OK

403

Forbidden

500

Internal Server Error

-
get /monitoring/hosts/{host_id}/downtimes
{protocol}://{server}:{port}/centreon/api/{version}/monitoring/hosts/{host_id}/downtimes

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "result":
    [
    ],
  • "meta":
    {
    }
}

Add a downtime on a host

Add a downtime on a host.

+
get /monitoring/hosts/{host_id}/downtimes
{protocol}://{server}:{port}/centreon/api/{version}/monitoring/hosts/{host_id}/downtimes

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "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)

@@ -719,7 +719,7 @@

Responses

204

Command Sent

403

Forbidden

500

Internal Server Error

-
post /monitoring/hosts/{host_id}/downtimes
{protocol}://{server}:{port}/centreon/api/{version}/monitoring/hosts/{host_id}/downtimes

Request samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "start_time": "2020-02-25T12:20:18Z",
  • "end_time": "2020-02-25T12:20:18Z",
  • "is_fixed": true,
  • "duration": 3600,
  • "author_id": 3,
  • "comment": "Downtime set by admin",
  • "with_services": true
}

Response samples

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

List all downtimes of a service

List all downtimes of a service.

+
post /monitoring/hosts/{host_id}/downtimes
{protocol}://{server}:{port}/centreon/api/{version}/monitoring/hosts/{host_id}/downtimes

Request samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "start_time": "2020-02-28T09:16:16Z",
  • "end_time": "2020-02-28T09:16:16Z",
  • "is_fixed": true,
  • "duration": 3600,
  • "author_id": 3,
  • "comment": "Downtime set by admin",
  • "with_services": true
}

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "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
  • @@ -743,7 +743,7 @@

Responses

200

OK

403

Forbidden

500

Internal Server Error

-
get /monitoring/hosts/{host_id}/services/{service_id}/downtimes
{protocol}://{server}:{port}/centreon/api/{version}/monitoring/hosts/{host_id}/services/{service_id}/downtimes

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "result":
    [
    ],
  • "meta":
    {
    }
}

Add a downtime on a service

Add a downtime on a service.

+
get /monitoring/hosts/{host_id}/services/{service_id}/downtimes
{protocol}://{server}:{port}/centreon/api/{version}/monitoring/hosts/{host_id}/services/{service_id}/downtimes

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "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)

@@ -755,7 +755,7 @@

Responses

204

Command Sent

403

Forbidden

500

Internal Server Error

-
post /monitoring/hosts/{host_id}/services/{service_id}/downtimes
{protocol}://{server}:{port}/centreon/api/{version}/monitoring/hosts/{host_id}/services/{service_id}/downtimes

Request samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "start_time": "2020-02-25T12:20:18Z",
  • "end_time": "2020-02-25T12:20:18Z",
  • "is_fixed": true,
  • "duration": 3600,
  • "author_id": 3,
  • "comment": "Downtime set by admin"
}

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "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.

+
post /monitoring/hosts/{host_id}/services/{service_id}/downtimes
{protocol}://{server}:{port}/centreon/api/{version}/monitoring/hosts/{host_id}/services/{service_id}/downtimes

Request samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "start_time": "2020-02-28T09:16:16Z",
  • "end_time": "2020-02-28T09:16:16Z",
  • "is_fixed": true,
  • "duration": 3600,
  • "author_id": 3,
  • "comment": "Downtime set by admin"
}

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "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:

  • host.name
  • @@ -768,7 +768,7 @@

Responses

200

OK

403

Forbidden

500

Internal Server Error

-
get /monitoring/resources
{protocol}://{server}:{port}/centreon/api/{version}/monitoring/resources

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "result":
    [
    ],
  • "meta":
    {
    }
}

Check

Check host

Schedule immediate check on chosen host

+
get /monitoring/resources
{protocol}://{server}:{port}/centreon/api/{version}/monitoring/resources

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "result":
    [
    ],
  • "meta":
    {
    }
}

Check

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

204

Command Sent

@@ -803,7 +803,7 @@
500

Internal Server Error

get /monitoring/hosts/{host_id}/services/{service_id}/status/start/{start}/end/{end}
{protocol}://{server}:{port}/centreon/api/{version}/monitoring/hosts/{host_id}/services/{service_id}/status/start/{start}/end/{end}

Response samples

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