diff --git a/doc/API/centreon-api-v2.html b/doc/API/centreon-api-v2.html index 103fd223e7f..eb230ebd078 100644 --- a/doc/API/centreon-api-v2.html +++ b/doc/API/centreon-api-v2.html @@ -356,7 +356,7 @@

Responses

200

successful operation

403

Forbidden

500

Internal Server Error

-
get /acknowledgements/hosts
http://localhost/centreon/api/beta/acknowledgements/hosts

Response samples

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

Adds an acknowledgement on host

Authorizations:
Request Body schema: application/json

Acknowledgment

+
get /acknowledgements/hosts
http://localhost/centreon/api/beta/acknowledgements/hosts

Response samples

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

Adds an acknowledgement on host

Authorizations:
Request Body schema: application/json

Acknowledgment

comment
string

Short description of the acknowledgement

host_id
integer <int64>

Unique id of the host

is_notify_contacts
boolean

Indicates whether notification is send to the contacts linked to the host or service

@@ -376,7 +376,7 @@

Responses

200

successful operation

403

Forbidden

500

Internal Server Error

-
get /acknowledgements/services
http://localhost/centreon/api/beta/acknowledgements/services

Response samples

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

Adds an acknowledgement on service

Authorizations:
Request Body schema: application/json

Acknowledgment

+
get /acknowledgements/services
http://localhost/centreon/api/beta/acknowledgements/services

Response samples

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

Adds an acknowledgement on service

Authorizations:
Request Body schema: application/json

Acknowledgment

comment
string

Short description of the acknowledgement

host_id
integer <int64>

Unique id of the host

is_notify_contacts
boolean

Indicates whether notification is send to the contacts linked to the host or service

@@ -433,7 +433,7 @@

Responses

200

successful operation

403

Forbidden

500

Internal Server Error

-
get /monitoring/hosts/downtimes
http://localhost/centreon/api/beta/monitoring/hosts/downtimes

Response samples

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

List all downtimes of one host

List all downtimes of one host

+
get /monitoring/hosts/downtimes
http://localhost/centreon/api/beta/monitoring/hosts/downtimes

Response samples

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

List all downtimes of one host

List all downtimes of one host

The available parameters to search / sort_by are:

  • id
  • @@ -448,15 +448,18 @@
  • contact.id
  • contact.name
+

By default, the host-related services downtimes are not displayed. +To display them, set the URI parameter "show_services" to true.

Authorizations:
path Parameters
host_id
required
integer <int64>

ID of host

query Parameters
limit
integer (RequestParameters.limit) >= 1
Example: limit=20

Max items per pages

page
integer (RequestParameters.page) >= 1
Example: page=1

Number of the page requested

sort_by
any

Used to sort the request

-
search
any

Used to search with specifics parameters

+
search
any

Used to search with specifics parameters

+
show_services
boolean

Indicates whether we need to display the host-related services downtimes or not (by default: false)

Responses

200

successful operation

403

Forbidden

500

Internal Server Error

-
get /monitoring/hosts/{host_id}/downtimes
http://localhost/centreon/api/beta/monitoring/hosts/{host_id}/downtimes

Response samples

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

Add a downtimes of one host

Authorizations:
path Parameters
host_id
required
integer <int64>

ID of host

+
get /monitoring/hosts/{host_id}/downtimes
http://localhost/centreon/api/beta/monitoring/hosts/{host_id}/downtimes

Response samples

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

Add a downtimes of one host

Authorizations:
path Parameters
host_id
required
integer <int64>

ID of host

Request Body schema: application/json

Downtime

start_time
string <date-time>

Scheduled start date of the downtime (ISO8601)

end_time
string <date-time>

Scheduled end date of the downtime (ISO8601)

@@ -468,7 +471,7 @@

Responses

204

Command sent

403

Forbidden

500

Internal Server Error

-
post /monitoring/hosts/{host_id}/downtimes
http://localhost/centreon/api/beta/monitoring/hosts/{host_id}/downtimes

Request samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "start_time": "2019-11-12T09:08:00Z",
  • "end_time": "2019-11-12T09:08:00Z",
  • "is_fixed": true,
  • "duration": 0,
  • "author_id": 0,
  • "comment": "string",
  • "with_services": true
}

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "message": "string"
}

List all services downtimes

List all downtimes of services

+
post /monitoring/hosts/{host_id}/downtimes
http://localhost/centreon/api/beta/monitoring/hosts/{host_id}/downtimes

Request samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "start_time": "2019-11-21T09:30:06Z",
  • "end_time": "2019-11-21T09:30:06Z",
  • "is_fixed": true,
  • "duration": 0,
  • "author_id": 0,
  • "comment": "string",
  • "with_services": true
}

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "message": "string"
}

List all services downtimes

List all downtimes of services

The available parameters to search / sort_by are:

  • id
  • @@ -497,7 +500,7 @@

Responses

200

successful operation

403

Forbidden

500

Internal Server Error

-
get /monitoring/services/downtimes
http://localhost/centreon/api/beta/monitoring/services/downtimes

Response samples

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

List all downtimes of one host-related service

List all downtimes of one host-related service

+
get /monitoring/services/downtimes
http://localhost/centreon/api/beta/monitoring/services/downtimes

Response samples

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

List all downtimes of one host-related service

List all downtimes of one host-related service

The available parameters to search / sort_by are:

  • id
  • @@ -521,7 +524,7 @@

Responses

200

successful operation

403

Forbidden

500

Internal Server Error

-
get /monitoring/hosts/{host_id}/services/{service_id}/downtimes
http://localhost/centreon/api/beta/monitoring/hosts/{host_id}/services/{service_id}/downtimes

Response samples

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

Add a downtime of one host-related service

Authorizations:
path Parameters
host_id
required
integer <int64>

ID of host

+
get /monitoring/hosts/{host_id}/services/{service_id}/downtimes
http://localhost/centreon/api/beta/monitoring/hosts/{host_id}/services/{service_id}/downtimes

Response samples

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

Add a downtime of one host-related service

Authorizations:
path Parameters
host_id
required
integer <int64>

ID of host

service_id
required
integer <int64>

ID of service linked to the host

Request Body schema: application/json

Downtime

start_time
string <date-time>

Scheduled start date of the downtime (ISO8601)

@@ -533,7 +536,7 @@

Responses

204

Command sent

403

Forbidden

500

Internal Server Error

-
post /monitoring/hosts/{host_id}/services/{service_id}/downtimes
http://localhost/centreon/api/beta/monitoring/hosts/{host_id}/services/{service_id}/downtimes

Request samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "start_time": "2019-11-12T09:08:00Z",
  • "end_time": "2019-11-12T09:08:00Z",
  • "is_fixed": true,
  • "duration": 0,
  • "author_id": 0,
  • "comment": "string"
}

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "message": "string"
}

List all downtimes

List all downtimes

+
post /monitoring/hosts/{host_id}/services/{service_id}/downtimes
http://localhost/centreon/api/beta/monitoring/hosts/{host_id}/services/{service_id}/downtimes

Request samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "start_time": "2019-11-21T09:30:06Z",
  • "end_time": "2019-11-21T09:30:06Z",
  • "is_fixed": true,
  • "duration": 0,
  • "author_id": 0,
  • "comment": "string"
}

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "message": "string"
}

List all downtimes

List all downtimes

The available parameters to search / sort_by are:

  • id
  • @@ -562,11 +565,11 @@

Responses

200

successful operation

403

Forbidden

500

Internal Server Error

-
get /monitoring/downtimes
http://localhost/centreon/api/beta/monitoring/downtimes

Response samples

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

Display one downtime

Authorizations:
path Parameters
downtime_id
required
integer <int64>

ID of downtime

+
get /monitoring/downtimes
http://localhost/centreon/api/beta/monitoring/downtimes

Response samples

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

Display one downtime

Authorizations:
path Parameters
downtime_id
required
integer <int64>

ID of downtime

Responses

200

successful operation

403

Forbidden

500

Internal Server Error

-
get /monitoring/downtimes/{downtime_id}
http://localhost/centreon/api/beta/monitoring/downtimes/{downtime_id}

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "id": 0,
  • "author_id": 0,
  • "host_id": 0,
  • "comment": "string",
  • "duration": 0,
  • "entry_time": "2019-11-12T09:08:00Z",
  • "start_time": "2019-11-12T09:08:00Z",
  • "end_time": "2019-11-12T09:08:00Z",
  • "deletion_time": "2019-11-12T09:08:00Z",
  • "actual_start_time": "2019-11-12T09:08:00Z",
  • "actual_end_time": "2019-11-12T09:08:00Z",
  • "is_started": true,
  • "is_cancelled": true,
  • "is_fixed": true,
  • "service_id": 0
}

Cancel a downtime

Authorizations:
path Parameters
downtime_id
required
integer <int64>

ID of downtime

+
get /monitoring/downtimes/{downtime_id}
http://localhost/centreon/api/beta/monitoring/downtimes/{downtime_id}

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "id": 0,
  • "author_id": 0,
  • "host_id": 0,
  • "comment": "string",
  • "duration": 0,
  • "entry_time": "2019-11-21T09:30:07Z",
  • "start_time": "2019-11-21T09:30:07Z",
  • "end_time": "2019-11-21T09:30:07Z",
  • "deletion_time": "2019-11-21T09:30:07Z",
  • "actual_start_time": "2019-11-21T09:30:07Z",
  • "actual_end_time": "2019-11-21T09:30:07Z",
  • "is_started": true,
  • "is_cancelled": true,
  • "is_fixed": true,
  • "service_id": 0
}

Cancel a downtime

Authorizations:
path Parameters
downtime_id
required
integer <int64>

ID of downtime

Responses

204

Command sent

403

Forbidden

500

Internal Server Error

@@ -623,13 +626,13 @@

Information

Responses

200

successful operation

403

Forbidden

500

Internal Server Error

-
get /monitoring/hosts
http://localhost/centreon/api/beta/monitoring/hosts

Response samples

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

Find host by ID

Retuns a single host with full details and some details about its services

+
get /monitoring/hosts
http://localhost/centreon/api/beta/monitoring/hosts

Response samples

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

Find host by ID

Retuns a single host with full details and some details about its services

Authorizations:
path Parameters
hostId
required
integer <int64>

ID of host to return

Responses

200

successful operation

403

Forbidden

404

Host not found

500

Internal Server Error

-
get /monitoring/hosts/{hostId}
http://localhost/centreon/api/beta/monitoring/hosts/{hostId}

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "id": 0,
  • "alias": "string",
  • "display_name": "string",
  • "name": "string",
  • "state": 0,
  • "services":
    [
    ],
  • "poller_id": 0,
  • "acknowledged": true,
  • "address_ip": "192.168.0.1",
  • "check_attempt": 0,
  • "checked": true,
  • "execution_time": 0,
  • "icon_image": "string",
  • "icon_image_alt": "string",
  • "last_check": "2019-11-12T09:08:01Z",
  • "last_hard_state_change": "2019-11-12T09:08:01Z",
  • "last_state_change": "2019-11-12T09:08:01Z",
  • "last_time_down": "2019-11-12T09:08:01Z",
  • "last_time_unreachable": "2019-11-12T09:08:01Z",
  • "last_time_up": "2019-11-12T09:08:01Z",
  • "last_update": "2019-11-12T09:08:01Z",
  • "max_check_attempts": 0,
  • "output": "string",
  • "passive_checks": true,
  • "state_type": 0,
  • "timezone": ":Europe/Paris",
  • "active_checks": true,
  • "check_command": "string",
  • "check_interval": 0,
  • "check_period": "string",
  • "check_type": 0,
  • "last_hard_state": "2019-11-12T09:08:01Z",
  • "last_notification": "2019-11-12T09:08:01Z",
  • "latency": "string",
  • "next_check": "2019-11-12T09:08:01Z",
  • "next_host_notification": 0,
  • "notification_interval": 0,
  • "notification_number": 0,
  • "notify": true,
  • "notify_on_down": true,
  • "notify_on_downtime": true,
  • "notify_on_flapping": true,
  • "notify_on_recovery": true,
  • "notify_on_unreachable": true
}

Find host-related services

Returns all services associated with a host.

+
get /monitoring/hosts/{hostId}
http://localhost/centreon/api/beta/monitoring/hosts/{hostId}

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "id": 0,
  • "alias": "string",
  • "display_name": "string",
  • "name": "string",
  • "state": 0,
  • "services":
    [
    ],
  • "poller_id": 0,
  • "acknowledged": true,
  • "address_ip": "192.168.0.1",
  • "check_attempt": 0,
  • "checked": true,
  • "execution_time": 0,
  • "icon_image": "string",
  • "icon_image_alt": "string",
  • "last_check": "2019-11-21T09:30:07Z",
  • "last_hard_state_change": "2019-11-21T09:30:07Z",
  • "last_state_change": "2019-11-21T09:30:07Z",
  • "last_time_down": "2019-11-21T09:30:07Z",
  • "last_time_unreachable": "2019-11-21T09:30:07Z",
  • "last_time_up": "2019-11-21T09:30:07Z",
  • "last_update": "2019-11-21T09:30:07Z",
  • "max_check_attempts": 0,
  • "output": "string",
  • "passive_checks": true,
  • "state_type": 0,
  • "timezone": ":Europe/Paris",
  • "active_checks": true,
  • "check_command": "string",
  • "check_interval": 0,
  • "check_period": "string",
  • "check_type": 0,
  • "last_hard_state": "2019-11-21T09:30:07Z",
  • "last_notification": "2019-11-21T09:30:07Z",
  • "latency": "string",
  • "next_check": "2019-11-21T09:30:07Z",
  • "next_host_notification": 0,
  • "notification_interval": 0,
  • "notification_number": 0,
  • "notify": true,
  • "notify_on_down": true,
  • "notify_on_downtime": true,
  • "notify_on_flapping": true,
  • "notify_on_recovery": true,
  • "notify_on_unreachable": true
}

Find host-related services

Returns all services associated with a host.

The available parameters to search / sort_by are:

  • service.id
  • @@ -648,14 +651,14 @@

    Information

403

Forbidden

404

Host not found

500

Internal Server Error

-
get /monitoring/hosts/{hostId}/services
http://localhost/centreon/api/beta/monitoring/hosts/{hostId}/services

Response samples

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

Find service by ID related to a host

Retuns a single host with full details

+
get /monitoring/hosts/{hostId}/services
http://localhost/centreon/api/beta/monitoring/hosts/{hostId}/services

Response samples

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

Find service by ID related to a host

Retuns a single host with full details

Authorizations:
path Parameters
hostId
required
integer <int64>

Host Id for which service is associed

serviceId
required
integer <int64>

ID of service to return

Responses

200

successful operation

403

Forbidden

404

Host or service not found

500

Internal Server Error

-
get /monitoring/hosts/{hostId}/services/{serviceId}
http://localhost/centreon/api/beta/monitoring/hosts/{hostId}/services/{serviceId}

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "id": 0,
  • "description": "string",
  • "display_name": "string",
  • "state": 0,
  • "check_attempt": 0,
  • "icon_image": "string",
  • "icon_image_alt": "string",
  • "last_check": "2019-11-12T09:08:01Z",
  • "last_state_change": "2019-11-12T09:08:01Z",
  • "max_check_attempts": 0,
  • "output": "string",
  • "state_type": 0,
  • "check_command": "string",
  • "check_interval": 0,
  • "check_period": "string",
  • "check_type": 0,
  • "command_line": "string",
  • "execution_time": 0,
  • "is_acknowledged": true,
  • "is_active_check": true,
  • "is_checked": true,
  • "last_hard_state_change": "2019-11-12T09:08:01Z",
  • "last_notification": "2019-11-12T09:08:01Z",
  • "last_time_critical": "2019-11-12T09:08:01Z",
  • "last_time_ok": "2019-11-12T09:08:01Z",
  • "last_time_unknown": "2019-11-12T09:08:01Z",
  • "last_time_warning": "2019-11-12T09:08:01Z",
  • "last_update": "2019-11-12T09:08:01Z",
  • "latency": 0,
  • "next_check": "2019-11-12T09:08:01Z",
  • "performance_data": "string",
  • "scheduled_downtime_depth": 0
}

List all services grouped by service groups

Returns all services grouped by service groups.

+
get /monitoring/hosts/{hostId}/services/{serviceId}
http://localhost/centreon/api/beta/monitoring/hosts/{hostId}/services/{serviceId}

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "id": 0,
  • "description": "string",
  • "display_name": "string",
  • "state": 0,
  • "check_attempt": 0,
  • "icon_image": "string",
  • "icon_image_alt": "string",
  • "last_check": "2019-11-21T09:30:07Z",
  • "last_state_change": "2019-11-21T09:30:07Z",
  • "max_check_attempts": 0,
  • "output": "string",
  • "state_type": 0,
  • "check_command": "string",
  • "check_interval": 0,
  • "check_period": "string",
  • "check_type": 0,
  • "command_line": "string",
  • "execution_time": 0,
  • "is_acknowledged": true,
  • "is_active_check": true,
  • "is_checked": true,
  • "last_hard_state_change": "2019-11-21T09:30:07Z",
  • "last_notification": "2019-11-21T09:30:07Z",
  • "last_time_critical": "2019-11-21T09:30:07Z",
  • "last_time_ok": "2019-11-21T09:30:07Z",
  • "last_time_unknown": "2019-11-21T09:30:07Z",
  • "last_time_warning": "2019-11-21T09:30:07Z",
  • "last_update": "2019-11-21T09:30:07Z",
  • "latency": 0,
  • "next_check": "2019-11-21T09:30:07Z",
  • "performance_data": "string",
  • "scheduled_downtime_depth": 0
}

List all services grouped by service groups

Returns all services grouped by service groups.

The available parameters to search / sort_by are:

  • host.id
  • @@ -708,9 +711,9 @@

    Information

Responses

200

successful operation

403

Forbidden

500

Internal Server Error

-
get /monitoring/services
http://localhost/centreon/api/beta/monitoring/services

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "result":
    [
    ],
  • "meta":
    {
    }
}
+
get /monitoring/services
http://localhost/centreon/api/beta/monitoring/services

Response samples

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