Skip to main content

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

ParameterRequired / OptionalTypeDescription
authUserRequired if restAuthentication is set to basicStringAuthentication user ID if authentication is used
authPasswordRequired if restAuthentication is set to basicStringAuthentication password if authentication is used
descriptionOptionalStringDescription for the metrics forwarder
enableOptionalBooleanIndicates whether the metrics forwarder is enabled. This can be one of the following values.
  • true. (default) The metrics forwarder is enabled.
  • false. The metrics forwarder is disabled.
ipAddressRequiredStringIPv4 or IPv6 address or hostname of the remote system that is the target to receive the metrics. For email, this is the SMTP server.
nameRequiredStringUser-defined name for the metrics forwarder. This name must be unique for all metrics forwarders.
portOptionalStringTCP/UDP port used for the connection
restAuthenticationOptionalStringAuthentication type. This can be one of the following values.
  • basic. (default) Authenticates to the specified server using the specified user ID (authUser) and password (authPassword).
  • none. (default) No authentication is used.
restPathOptionalStringResource 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

CodeDescriptionComments
200OKThe request completed successfully.
404Not foundA specified resource cannot be found. A descriptive error message is returned in the response body.
500Internal Server ErrorAn internal error occurred. A descriptive error message is returned in the response body.

Response body

ParametersTypeDescription
idStringMetrics forwarder (subscription) ID
The following example is returned if the request is successful.
{
"id": "5e3279917f30b2de48e905b5"
}