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 @@
-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 @@ |
successful operation
Forbidden
Internal Server Error
-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 @@ |
successful operation
Forbidden
Internal Server Error
-This API allow to:
+successful operation
+Forbidden
+Internal Server Error
+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 + |
Command sent
+Forbidden
+Internal Server Error
+This API allow to:
successful operation
Forbidden
Internal Server Error
-successful operation
Forbidden
Internal Server Error
-successful operation
Forbidden
Internal Server Error
-successful operation
Forbidden
Internal Server Error
-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 {
Add a downtime of one host-related servicepath Parameters
Request Body schema: application/jsonDowntime
Responses204 Command sent Forbidden 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 {
Response samples
Content type application/json Copy Expand all Collapse all {
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 {
Response samples
Content type application/json Copy Expand all Collapse all {
|
successful operation
Forbidden
Internal Server Error
-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 {
Display one downtimepath Parameters
Responsessuccessful operation Forbidden 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 {
Cancel a downtimepath Parameters
Responsessuccessful operation Forbidden Internal Server Error - get /monitoring/hostgroups http://localhost/centreon/api/beta/monitoring/hostgroups Response samples
Content type application/json Copy Expand all Collapse all {
get /monitoring/hostgroups http://localhost/centreon/api/beta/monitoring/hostgroups Response samples
Content type application/json Copy Expand all Collapse all {
|
successful operation
Forbidden
Internal Server Error
-Retuns a single host with full details and some details about its services
hostId required | integer <int64> ID of host to return |
successful operation
Forbidden
Host not found
Internal Server Error
-Retuns a single host with full details
hostId required | integer <int64> Host Id for which service is associed |
serviceId required | integer <int64> ID of service to return |
successful operation
Forbidden
Host or service not found
Internal Server Error
-successful operation
Forbidden
Internal Server Error
-successful operation
Forbidden
Internal Server Error
-