Resend several trigger deliveries
Changed onQueues a new delivery attempt for up to 50 trigger events, each to one delivery endpoint, and reports what happened to each target separately. Use this to retry deliveries that failed, for example a selection from ListTriggerDeliveriesByEndpoint, instead of resending them one at a time. Pass the targets in the body; each names a message ID and the endpoint to deliver that event to again. QUEUED means a new manual attempt was accepted for delivery, not that the event was delivered: the attempt and its outcome appear in ListTriggerDeliveryAttemptsByMessage as a TRIGGER_DELIVERY_ATTEMPT_TRIGGER_TYPE_MANUAL attempt. The call is best-effort: a target that fails does not undo one that was queued. Resending is not idempotent: each time a target is sent it queues one more attempt, so after a partial failure retry only the targets that came back RATE_LIMITED, FAILED or NOT_ATTEMPTED, never the whole request. A FAILED target whose request timed out may still have been queued, so retrying it can queue a second attempt. A FAILED target whose event payload is no longer stored can never be resent; its reason says so. When a target is rate limited the batch stops: targets not yet started come back NOT_ATTEMPTED, while a target already in flight finishes with its own outcome. Returns one result per target, in the order sent, each with its outcome and a reason, plus queued_count. The event payload is never returned.
Request
- Base URLhttps://$SCALEKIT_ENVIRONMENT_URL
- AuthOAuth 2Client credentialsToken URLhttps://$SCALEKIT_ENVIRONMENT_URL/oauth/token
- TypeScriptA function with typed inputs. Its response is checked against the schema.
Request body
Example request
{
"targets": [
{
"endpoint_id": "ep_2yAqUuFkqbL5nXvC7HhWJRY6Gg9",
"msg_id": "msg_2yAqUxVq4mTt8jHZ3fWbKcN1Pd0"
}
]
}Response
Request processed; every target has its own result in results, in the order sent, and queued_count says how many new attempts this call queued
Example response
{
"queued_count": 12,
"results": [
{
"endpoint_id": "ep_2yAqUuFkqbL5nXvC7HhWJRY6Gg9",
"msg_id": "msg_2yAqUxVq4mTt8jHZ3fWbKcN1Pd0",
"reason": "not attempted: an earlier target was rate limited; resend this target shortly"
}
]
}Changes
- info
endpoint added
- info