Events api v2 has no validation for routing key

I tried to fire a pager duty event.
api endpoint: https://events.pagerduty.com/v2/enqueue
payload:
{
“routing_key”: “d3a4e02ee8e846b49b58b19e54068a0Z”,
“event_action”: “trigger”,
“payload”: {
“summary”: “test”,
“severity”: “info”,
“source”: “test”,
“timestamp”: “2015-07-17T08:42:58.315+0000”
}
}

If you see here, the routing key is not a valid hexadecimal, so I was expecting the api to throw an error, but it returns with success
{
“status”: “success”,
“message”: “Event processed”,
“dedup_key”: “df6bdc65402f4a5fb4407ba2ee052a61”
}

with an invalid key, where is the event being processed and its associated with which service.
Also, there should be validation if the routing key is a valid hexadecimal but is not linked to any existing service in Pager duty.

The validation in place on the Events V2 API is against the number of characters of the routing key provided and not the actual routing key itself. It is the responsibility of the user to provide a valid routing key in order to successfully trigger an Incident.
Our documentation would be updated to reflect this. I do apologise for the confusion.

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.