Articles in this section

Errors API endpoints

download.svg​​ Download Postman collection

Error Management enables you to access your flows’ errors using the integrator.io API and then take action programmatically.

/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.

Sample GET response

"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.

PUT

200

Update error retry data for an export.

/flows/<_flowid>/<_importId>/<_retryDataKey>/data

GET

200

Get error retry data for an import.

PUT

200

Update error retry data for an import.

/data sample GET response

Sample GET response

{
  "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"
}

/data sample PUT response

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"
}

/tags

This endpoint allows you to get and update Error tags. You can choose to update the entire tag or a specific part of the tag.

Relative URI

Method

Success code

Description

/tags

GET

200

Get all tags.

/tags/<id>

GET

200

Get a specific tag.

PUT

204

Update a tag.

PATCH

204

Update a specific part of a tag.

You can update one field of a tag:

Field

Data type

tag

string

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

Screenshot 2023-09-27 215116.png

Check out template in the Celigo Marketplace that demonstrates error handling automation via the Celigo platform error REST API

  • the Error automation via integrator.io APIs

    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.

Was this article helpful?
0 out of 0 found this helpful

Comments

7 comments
Date Votes
  • 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?

    0
  • 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. 

    0
  • It does, thank you very much.

    0
  • What is the format for the body of the PUT call on the /data endpoint? The body in the postman collection is empty. I have tried with an unnamed object that contains the updated error data but it updated the error data to be blank. 

    0
  • Hi Cole Seymour,

    The request body sample is not provided in the collection for the PUT api. What you can do is do a GET for /retry data and use the response in the PUT api body. 

    Please let us know if you need any further assistance

    0
  • Hi Naveen, 

    Thanks for looking into this. For anyone wondering, ended up naming the object "data" and it updated correctly. The GET for the /data endpoint returns the below body:

    {
       "page_of_records": [
          {
             "record": {
                "childIndex": null,
                "data": {errorDataHere},
                "pathToMany": null,
                "oneToMany": false,
                "retryDataKey": "...",
                "stage": "page_processor_import",
                "traceKey": null
             }
          }
       ]
    }
     
    ...But what ended up working for the PUT call was this format:

    {
      "data": {{{jsonDataHere}}}
    }

    1
  • Thanks for sharing Cole Seymour

    0

Please sign in to leave a comment.