We are trying to build some automation to recover from REST Service notification failures.
After 3 retries, Kobo will send an email notification with the list of failed notifications.
This list includes the error and response code, as well as some ID, which we were hoping to be able to use to fetch individual failed submissions via API.
Unfortunately it looks like this unique id is not the form submission id, and we therefore cannot use this to retrieve the submission. It seems to be an id specific to the REST Service invocation (?).
Can someone explain what this id is appearing in the REST Service failure email notifications, and how this could help us identify the undelivered submissions?
Hi @yjouanique, the UID you are referring to is the hook log UID that looks like hlGKQir5k8Ef2SMs7FNo7eH (starting with hl). You can associate this with the submission by the following:
Find the UID of your REST Service at https://[kf_url]/api/v2/assets/[asset_uid]/hooks.json, for example: hdQBCLmJVzoVCJtFWPqtqk
Make a request to https://[kf_url]/api/v2/assets/[asset_uid]/hooks/[hook_uid]/logs/[uid from the email].json
You will see the submission_id in the JSON response that looks something like this:
This actually got me thinking: it looks like rather than manually copy-pasting the hook log id from the mail notification to a sheet, and then doing my own processing, I can probably just query the failed hooks from the API and just trigger the retry!