diff --git a/composer.json b/composer.json index e675620b072..629972e138d 100644 --- a/composer.json +++ b/composer.json @@ -54,7 +54,8 @@ "symfony/translation": "4.3.*", "symfony/expression-language": "4.3.*", "ext-json": "*", - "justinrainbow/json-schema": "^5.2" + "justinrainbow/json-schema": "^5.2", + "ext-pdo": "*" }, "autoload": { "psr-4": { diff --git a/config/Modules/Centreon.yaml b/config/Modules/Centreon.yaml index 09b4efa20a8..e97154da0e1 100644 --- a/config/Modules/Centreon.yaml +++ b/config/Modules/Centreon.yaml @@ -98,3 +98,10 @@ services: Centreon\Domain\Acknowledgement\Interfaces\AcknowledgementServiceInterface: class: Centreon\Domain\Acknowledgement\AcknowledgementService + + # Proxy configuration + Centreon\Domain\Proxy\Interfaces\ProxyServiceInterface: + class: Centreon\Domain\Proxy\ProxyService + + Centreon\Domain\Proxy\Interfaces\ProxyRepositoryInterface: + class: Centreon\Infrastructure\Proxy\ProxyRepositoryRDB \ No newline at end of file diff --git a/config/packages/validator/validation.yaml b/config/packages/validator/validation.yaml index 1ee39e83a7b..ce12a68c039 100644 --- a/config/packages/validator/validation.yaml +++ b/config/packages/validator/validation.yaml @@ -81,4 +81,26 @@ Centreon\Domain\Downtime\Downtime: type: integer pollerId: - Type: - type: integer \ No newline at end of file + type: integer + +# Used to validate the Proxy entity +Centreon\Domain\Proxy\Proxy: + properties: + url: + - Type: + type: string + - NotNull: ~ + port: + - Type: + type: integer + - PositiveOrZero: ~ + - LessThanOrEqual: 65535 + - NotNull: ~ + user: + - Type: + type: string + - NotNull: ~ + password: + - Type: + type: string + - NotNull: ~ \ No newline at end of file diff --git a/doc/API/centreon-api-v2.html b/doc/API/centreon-api-v2.html index bb992253bc2..b52f26ea617 100644 --- a/doc/API/centreon-api-v2.html +++ b/doc/API/centreon-api-v2.html @@ -308,7 +308,7 @@ -

Information

All dates are in ISO 8601 format

Authentication

There are two modes of authentication:

@@ -357,7 +358,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

@@ -377,7 +378,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

@@ -419,7 +420,23 @@

Responses

200

successful operation

403

Forbidden

500

Internal Server Error

-
get /configuration/monitoring-servers
http://localhost/centreon/api/beta/configuration/monitoring-servers

Response samples

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

Downtime

This API allow to:

+
get /configuration/monitoring-servers
http://localhost/centreon/api/beta/configuration/monitoring-servers

Response samples

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

Proxy

This API allow to:

+
    +
  • Show the default proxy configuration of Centreon
  • +
  • Update the default proxy configuration of Centreon
  • +
+

Display the default configuration of the Centreon proxy

Authorizations:

Responses

200

successful operation

+
403

Forbidden

+
500

Internal Server Error

+
get /configuration/proxy
http://localhost/centreon/api/beta/configuration/proxy

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "url": "string",
  • "port": 0,
  • "user": "string",
  • "password": "string"
}

Update the default configuration of the Centreon proxy

Authorizations:
Request Body schema: application/json

Proxy configuration

+
url
required
string

Url of the proxy

+
port
required
integer [ 0 .. 65535 ]

Port of the proxy

+
user
required
string

Login of the proxy

+
password
required
string

Password of the proxy

+

Responses

204

Command sent

+
403

Forbidden

+
500

Internal Server Error

+
post /configuration/proxy
http://localhost/centreon/api/beta/configuration/proxy

Request samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "url": "string",
  • "port": 0,
  • "user": "string",
  • "password": "string"
}

Response samples

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

Downtime

This API allow to:

  • Show hosts and services downtimes
  • Add a downtime on host or service
  • @@ -454,7 +471,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
  • @@ -480,7 +497,7 @@

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)

@@ -492,7 +509,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-12-10T12:19:38Z",
  • "end_time": "2019-12-10T12:19:38Z",
  • "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-12-12T10:35:04Z",
  • "end_time": "2019-12-12T10:35:04Z",
  • "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
  • @@ -521,7 +538,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
  • @@ -545,7 +562,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)

@@ -557,7 +574,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-12-10T12:19:38Z",
  • "end_time": "2019-12-10T12:19:38Z",
  • "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-12-12T10:35:04Z",
  • "end_time": "2019-12-12T10:35:04Z",
  • "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
  • @@ -586,15 +603,15 @@

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-12-10T12:19:38Z",
  • "start_time": "2019-12-10T12:19:38Z",
  • "end_time": "2019-12-10T12:19:38Z",
  • "deletion_time": "2019-12-10T12:19:38Z",
  • "actual_start_time": "2019-12-10T12:19:38Z",
  • "actual_end_time": "2019-12-10T12:19:38Z",
  • "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-12-12T10:35:04Z",
  • "start_time": "2019-12-12T10:35:04Z",
  • "end_time": "2019-12-12T10:35:04Z",
  • "deletion_time": "2019-12-12T10:35:04Z",
  • "actual_start_time": "2019-12-12T10:35:04Z",
  • "actual_end_time": "2019-12-12T10:35:04Z",
  • "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

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

Response samples

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

Monitoring

Real-time monitoring of the services and hosts

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

Response samples

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

Monitoring

Real-time monitoring of the services and hosts

List all services grouped by host groups

Returns all services grouped by host groups.

The available parameters to search / sort_by are:

    @@ -623,7 +640,7 @@

    Information

Responses

200

successful operation

403

Forbidden

500

Internal Server Error

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

Response samples

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

List all hosts

Returns all hosts.

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

Response samples

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

List all hosts

Returns all hosts.

The available parameters to search / sort_by are:

  • host.id
  • @@ -647,13 +664,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-12-10T12:19:38Z",
  • "last_hard_state_change": "2019-12-10T12:19:38Z",
  • "last_state_change": "2019-12-10T12:19:38Z",
  • "last_time_down": "2019-12-10T12:19:38Z",
  • "last_time_unreachable": "2019-12-10T12:19:38Z",
  • "last_time_up": "2019-12-10T12:19:38Z",
  • "last_update": "2019-12-10T12:19:38Z",
  • "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-12-10T12:19:38Z",
  • "last_notification": "2019-12-10T12:19:38Z",
  • "latency": "string",
  • "next_check": "2019-12-10T12:19:38Z",
  • "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-12-12T10:35:04Z",
  • "last_hard_state_change": "2019-12-12T10:35:04Z",
  • "last_state_change": "2019-12-12T10:35:04Z",
  • "last_time_down": "2019-12-12T10:35:04Z",
  • "last_time_unreachable": "2019-12-12T10:35:04Z",
  • "last_time_up": "2019-12-12T10:35:04Z",
  • "last_update": "2019-12-12T10:35:04Z",
  • "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-12-12T10:35:04Z",
  • "last_notification": "2019-12-12T10:35:04Z",
  • "latency": "string",
  • "next_check": "2019-12-12T10:35:04Z",
  • "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
  • @@ -672,14 +689,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-12-10T12:19:38Z",
  • "last_state_change": "2019-12-10T12:19:38Z",
  • "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-12-10T12:19:38Z",
  • "last_notification": "2019-12-10T12:19:38Z",
  • "last_time_critical": "2019-12-10T12:19:38Z",
  • "last_time_ok": "2019-12-10T12:19:38Z",
  • "last_time_unknown": "2019-12-10T12:19:38Z",
  • "last_time_warning": "2019-12-10T12:19:38Z",
  • "last_update": "2019-12-10T12:19:38Z",
  • "latency": 0,
  • "next_check": "2019-12-10T12:19:38Z",
  • "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-12-12T10:35:04Z",
  • "last_state_change": "2019-12-12T10:35:04Z",
  • "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-12-12T10:35:04Z",
  • "last_notification": "2019-12-12T10:35:04Z",
  • "last_time_critical": "2019-12-12T10:35:04Z",
  • "last_time_ok": "2019-12-12T10:35:04Z",
  • "last_time_unknown": "2019-12-12T10:35:04Z",
  • "last_time_warning": "2019-12-12T10:35:04Z",
  • "last_update": "2019-12-12T10:35:04Z",
  • "latency": 0,
  • "next_check": "2019-12-12T10:35:04Z",
  • "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,7 +725,7 @@

    Information

Responses

200

successful operation

403

Forbidden

500

Internal Server Error

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

Response samples

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

List all services

Returns all services.

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

Response samples

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

List all services

Returns all services.

The available parameters to search / sort_by are:

  • host.id
  • @@ -732,9 +749,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":
    {
    }
}