Download integrator.io Postman collection
Error Management enables you to access your flows’ errors using the integrator.io API and then take action programmatically.
Contents
/errors
Within the /errors endpoint, you can add the following query parameters when making a GET method call, to narrow down the results you want to see:
Tip: Take note of the retryDataKey so you can retry your errors via the /retry endpoint.
- occurredAt_lte (time value is UTC in ISO format)
- occurredAt_gte (time value is UTC in ISO format)
- Source
Errors endpoints
Relative URI | Method | Success code | Description |
/flows/<_flowid>/<_exportId>/errors | GET | 200 | Get all open errors for an export. |
/flows/<_flowid>/<_importId>/errors | GET | 200 | Get all open errors for an import. |
"errors": [
{
"occurredAt": "2021-06-15T21:21:30.538Z",
"source": "application",
"code": "response_failure",
"message": "\"response failed using path: \\\"ok\\\". Value found: \\\"false\\\". Response body: {\\\"ok\\\":false,\\\"error\\\":\\\"channel_not_found\\\"}\"",
"traceKey": "53968",
"exportDataURI": "53968 Winifred Arathorn",
"oIndex": "1",
"retryDataKey": "332••••••••••••••••••••••••••81fe",
"errorId": "•••••••••",
"_flowJobId": "60c•••••••••••••••••e77",
"classification": "missing",
"classifiedBy": "autopilot",
"reqAndResKey": "5634326309435-9a2aeeaaec51494cb1ed2206f34116c8-200-POST"
}
]
/resolved
Relative URI | Method | Success code | Description |
/flows/<_flowid>/<_exportId>/resolved | GET | 200 | Retrieve resolved errors for an export. |
/flows/<_flowid>/<_importId>/resolved | GET | 200 | Retrieve resolved errors for an import. |
/flows/<_flowid>/<_exportId>/resolved | PUT | 204 | Resolve specified errors for an export. |
/flows/<_flowid>/<_importId>/resolved | PUT | 204 | Resolve specified errors for an import. |
For the /resolved endpoint, send the error object in the request body with the following format:
Request body: { "errors": ["<_errorId1>", ... , "<_errorIdn>"]}
/retry
Relative URI | Method | Success code | Description |
/flows/<_flowid>/<_exportId>/retry | POST | 200 |
Retry specified errors for an export. |
/flows/<_flowid>/<_importId>/retry | POST | 200 |
Retry specified errors for an import. |
For the /retry endpoint, send the retry keys in the request body with the following format:
Request body: { "retryDataKeys": ["<_retryDataKey1>", ... , "<_retryDataKeyn>"]}
/data
The <_retryDataKey> value is available from the /errors endpoint (see sample data, above) for an export or import. A GET call to the /data endpoint with this key will return the error retry data.
Relative URI | Method | Success code | Description |
/flows/<_flowid>/<_exportId>/<_retryDataKey>/data | GET | 200 | Get error retry data for an export. |
/flows/<_flowid>/<_importId>/<_retryDataKey>/data | GET | 200 | Get error retry data for an import. |
/flows/<_flowid>/<_exportId>/<_retryDataKey>/data | PUT | 200 | Update error retry data for an export. |
/flows/<_flowid>/<_importId>/<_retryDataKey>/data | PUT | 200 | Update error retry data for an import. |
{ "data": { "_id": ••••, "role": "Student", "firstname": "Winifred", "lastname": "Arathorn", "age": 73 }, "files": { "fileMeta": { "fileName": "School_name_randomid.json", "modifiedTime": "2021-03-12T19:23:40.560Z", "id": "1A_UwQGRxSRX5BaMjpBeTRwrAxytARJnc", "type": "application/json" } }, "stage": "page_processor_import", "traceKey": "53968", "dataURI": "53968 Winifred Arathorn" }
Then, via the integrator.io API, you can attempt to retry the error with the same or modified fields. Place a PUT call to the /data endpoint, passing all of the data returned from the GET method in the request body.
{ "data": { "_id": 53968, "role": "Student", "firstname": "Winifred_updated_via_put", "lastname": "Arathorn_updated_via_put", "age": 73 }, "files": { "fileMeta": { "fileName": "School_name_randomid.json", "modifiedTime": "2021-03-12T19:23:40.560Z", "id": "1A_UwQGRxSRX5BaMjpBeTRwrAxytARJnc", "type": "application/json" } }, "stage": "page_processor_import", "traceKey": "53968", "dataURI": "53968 Winifred Arathorn" }
Errors API paging
The Errors API endpoint returns up to 1000 errors per call, but there may be occasions when an import or export has more than 1000 errors. To get the remaining errors for an import or export, use the returned nextPageURL value from the response. For example, your initial call (with more than 1000 results) will return the following payload:
{ "errors": [...], "nextPageURL": "/v1/flows/:flowId/:exportOrImportId/errors?startAtErrorId=123456789" }
Use the nextPageURL until a nextPageURL is no longer returned in the response. In an integrator.io export this would look as follows:
Paging Method: nextPageUrl
Path to next page URL field in HTTP response body: nextPageURL
Check out the Error automation via integrator.io APIs template in the Celigo Marketplace that demonstrates error handling automation via the integrator.io error REST API. This template contains two example flows that use Error Management features to automate retrying or resolving errors that meet certain conditions. This template is most useful for integration scenarios where errors do not need further resolution other than to retry the record as-is or for known issues that can be automatically resolved.
Comments
3 comments
Is there a maximum size for the errors array in the PUT body of the /resolved endpoint?
Similarly, is there a max size for the retryDataKeys array in the POST body of the /retry endpoint?
Jason Haslow No such max limit is defined however the standard platform limit of 5MB applies to any API requests. Hope this answers your question.
It does, thank you very much.
Please sign in to leave a comment.