@@ -3623,16 +3623,50 @@ pub trait NexusExternalApi {
36233623 /// "true" are included in the response.
36243624 #[ endpoint {
36253625 method = GET ,
3626- path = "/v1/alert-deliveries" ,
3626+ path = "/v1/alert-receivers/{receiver}/ deliveries" ,
36273627 tags = [ "system/alerts" ] ,
36283628 } ]
36293629 async fn alert_delivery_list (
36303630 rqctx : RequestContext < Self :: Context > ,
3631- receiver : Query < params:: AlertReceiverSelector > ,
3631+ path_params : Path < params:: AlertReceiverSelector > ,
36323632 state_filter : Query < params:: AlertDeliveryStateFilter > ,
36333633 pagination : Query < PaginatedByTimeAndId > ,
36343634 ) -> Result < HttpResponseOk < ResultsPage < views:: AlertDelivery > > , HttpError > ;
36353635
3636+ /// Send liveness probe to alert receiver
3637+ ///
3638+ /// This endpoint synchronously sends a liveness probe to the selected alert
3639+ /// receiver. The response message describes the outcome of the probe:
3640+ /// either the successful response (as appropriate), or indication of why
3641+ /// the probe failed.
3642+ ///
3643+ /// The result of the probe is represented as an `AlertDelivery` model.
3644+ /// Details relating to the status of the probe depend on the alert delivery
3645+ /// mechanism, and are included in the `AlertDeliveryAttempts` model. For
3646+ /// example, webhook receiver liveness probes include the HTTP status code
3647+ /// returned by the receiver endpoint.
3648+ ///
3649+ /// Note that the response status is `200 OK` as long as a probe request was
3650+ /// able to be sent to the receiver endpoint. If an HTTP-based receiver,
3651+ /// such as a webhook, responds to the another status code, including an
3652+ /// error, this will be indicated by the response body, *not* the status of
3653+ /// the response.
3654+ ///
3655+ /// The `resend` query parameter can be used to request re-delivery of
3656+ /// failed events if the liveness probe succeeds. If it is set to true and
3657+ /// the liveness probe succeeds, any alerts for which delivery to this
3658+ /// receiver has failed will be queued for re-delivery.
3659+ #[ endpoint {
3660+ method = POST ,
3661+ path = "/v1/alert-receivers/{receiver}/probe" ,
3662+ tags = [ "system/alerts" ] ,
3663+ } ]
3664+ async fn alert_receiver_probe (
3665+ rqctx : RequestContext < Self :: Context > ,
3666+ path_params : Path < params:: AlertReceiverSelector > ,
3667+ query_params : Query < params:: AlertReceiverProbe > ,
3668+ ) -> Result < HttpResponseOk < views:: AlertProbeResult > , HttpError > ;
3669+
36363670 /// Request re-delivery of alert
36373671 #[ endpoint {
36383672 method = POST ,
@@ -3674,34 +3708,6 @@ pub trait NexusExternalApi {
36743708 params : TypedBody < params:: WebhookReceiverUpdate > ,
36753709 ) -> Result < HttpResponseUpdatedNoContent , HttpError > ;
36763710
3677- /// Send liveness probe to webhook receiver
3678- ///
3679- /// This endpoint synchronously sends a liveness probe request to the
3680- /// selected webhook receiver. The response message describes the outcome of
3681- /// the probe request: either the response from the receiver endpoint, or an
3682- /// indication of why the probe failed.
3683- ///
3684- /// Note that the response status is `200 OK` as long as a probe request was
3685- /// able to be sent to the receiver endpoint. If the receiver responds with
3686- /// another status code, including an error, this will be indicated by the
3687- /// response body, *not* the status of the response.
3688- ///
3689- /// The `resend` query parameter can be used to request re-delivery of
3690- /// failed events if the liveness probe succeeds. If it is set to true and
3691- /// the webhook receiver responds to the probe request with a `2xx` status
3692- /// code, any events for which delivery to this receiver has failed will be
3693- /// queued for re-delivery.
3694- #[ endpoint {
3695- method = POST ,
3696- path = "/v1/webhook-receivers/{receiver}/probe" ,
3697- tags = [ "system/alerts" ] ,
3698- } ]
3699- async fn webhook_receiver_probe (
3700- rqctx : RequestContext < Self :: Context > ,
3701- path_params : Path < params:: AlertReceiverSelector > ,
3702- query_params : Query < params:: WebhookProbe > ,
3703- ) -> Result < HttpResponseOk < views:: WebhookProbeResult > , HttpError > ;
3704-
37053711 /// List webhook receiver secret IDs
37063712 #[ endpoint {
37073713 method = GET ,
0 commit comments