POST /metrics_service/subscriptions
Use this method to create a metrics forwarder.
Authentication
Authentication with username and password is required.
Request URL
POST https://{management_server_IP}/metrics_service/subscriptions
Query parameters
None
Request body
| Parameter | Required / Optional | Type | Description | ||
|---|---|---|---|---|---|
| authUser | Required if restAuthentication is set to basic | String | Authentication user ID if authentication is used | ||
| authPassword | Required if restAuthentication is set to basic | String | Authentication password if authentication is used | ||
| description | Optional | String | Description for the metrics forwarder | ||
| enable | Optional | Boolean | Indicates whether the metrics forwarder is enabled. This can be one of the following values.
| ||
| ipAddress | Required | String | IPv4 or IPv6 address or hostname of the remote system that is the target to receive the metrics. For email, this is the SMTP server. | ||
| name | Required | String | User-defined name for the metrics forwarder. This name must be unique for all metrics forwarders. | ||
| port | Optional | String | TCP/UDP port used for the connection | ||
| restAuthentication | Optional | String | Authentication type. This can be one of the following values.
| ||
| restPath | Optional | String | Resource path on which the forwarder is to post the metrics The default path is /api/v1/inbound/metrics. | ||
The following example creates a metrics forwarder.
{
"authUser": "ADMIN",
"authPassword": "********",
"description": "Metrics subscription",
"enable": "true",
"ipAddress": "192.0.2.40",
"name": "Metrics_subscription",
"port": "443",
"restAuthentication": "basic",
"restPath": "/api/v1/metrics"
}
Response codes
| Code | Description | Comments |
|---|---|---|
| 200 | OK | The request completed successfully. |
| 404 | Not found | A specified resource cannot be found. A descriptive error message is returned in the response body. |
| 500 | Internal Server Error | An internal error occurred. A descriptive error message is returned in the response body. |
Response body
| Parameters | Type | Description | ||
|---|---|---|---|---|
| id | String | Metrics forwarder (subscription) ID | ||
The following example is returned if the request is successful.
{
"id": "5e3279917f30b2de48e905b5"
}
Give documentation feedback