Get the status of a scheduled Insights-Refresh

This endpoint returns the status of a scheduled insights refresh.

URL and Request Body Structure

POST /insights/v1/autorefresh/list HTTP/1.1
Content-Type: application/json; charset=utf-8
Authorization: Token <Token>
Host: <Host>
{
    "insights_consumer_id" : String,
    "insights_account_ids" : ?Array<String>
}

insights_consumer_id String, required

The insights_consumer_id of the consumer which the automatic refresh status should be returned. If the insights_account_ids property is not set the status of all scheduled auto refreshs of this consumer are returned.

insights_account_ids String[], optional

The insights_account_ids specify the accounts of which the status should be returned.

Response Structure

{
    "data": {
        "status": [
            {
                "last_refresh_at": DateTime,
                "last_refresh_error_category": ?Enum,
                "last_refresh_state": Enum<'SUCCESS', 'EXCEPTION'>,
                "last_refresh_error_message": ?String,
                "last_successful_refresh_at": ?DateTime,
                "next_refresh_at": DateTime,
                "refresh_interval_minutes": ?Integer,
                "data_retention_minutes": Integer,
                "intended_insights": Array<IntendedReport>,
                "refresh_days": ?Integer,
                "insights_account_id": String,
                "refresh_failed_counter": Integer,
                "refresh_interval": ?Enum<'DAILY', 'WEEKLY', 'AS_OFTEN_AS_POSSIBLE'>,
                "consent_authorization_required": Boolean
            }
        ]
    }
}

last_refresh_at DateTime (String: "YYYY-MM-DDThh:mm:ss.sssZ), always present

The date and time of the last automatic refresh.

last_refresh_error_category Enum, optional

In case that the last refresh was unsuccessful, i.e., last_refresh_state : EXCEPTION, this field can contain an error category according to the Error Handling documentation.

last_refresh_state Enum, always present

The state of the last automatic refresh.

last_refresh_error_message String, optional

In case of a non successful last_refresh_state the error message can be set.

last_successful_refresh_at DateTime (String: "YYYY-MM-DDThh:mm:ss.sssZ), optional

The date and time of the last successful automatic refresh.

next_refresh_at DateTime (String: "YYYY-MM-DDThh:mm:ss.sssZ), always present

The date and time of the next automatic refresh.

refresh_interval_minutes Integer, optional

The interval minutes that were configured for this automatic refresh.

data_retention_minutes Integer, always present

The minutes that data of this automatic refresh are stored.

intended_insights IntendedReport[], always present

The intented insights that were configured for this automatic refresh.

refresh_days Integer, optional

The number of days for transactions that are configured to be refreshed for this automatic refresh.

insights_account_id String, always present

The identifier of the account for which this automatic refresh status is.

refresh_failed_counter Integer, always present

Counts how many times a refresh has failed without a successful refresh in between. Once a successful refresh occurs, this counter is reset to 0.

refresh_interval Enum, optional

The refresh_interval property holds the current scheduled automatic refresh that was set for this consumer.

consent_authorization_required Boolean, always present

A flag that informs if the consent needs to be re-authorized or not. true if needed, else false.

Example response of an auto-refresh status where the last refresh was successful

{
    "data": {
        "status": [
            {
                "last_refresh_at": "2021-01-14T16:13:32.745Z",
                "last_refresh_state": "SUCCESS",
                "last_successful_refresh_at": "2021-01-14T16:13:32.745Z",
                "next_refresh_at": "2021-01-14T16:43:32.448Z",
                "refresh_interval_minutes": 30,
                "data_retention_minutes": 129600,
                "intended_insights": [],
                "refresh_days": 62,
                "insights_account_id": "c312345-f72a-487b-b6aa-a7c796deeac1",
                "refresh_failed_counter": 0,
                "consent_authorization_required": "false"
            }
        ]
    }
}

Example response of an auto-refresh status where the last refresh was not successful

{
    "data": {
        "status": [
            {
                "last_refresh_at": "2021-01-14T16:13:32.785Z",
                "last_refresh_error_category": "CONSENT.LIMIT_EXCEEDED",
                "last_refresh_state": "EXCEPTION",
                "last_refresh_error_message": "The consent provided has been used too many times during the last 24 hours.",
                "last_successful_refresh_at": "2021-01-12T15:43:32.785Z",
                "next_refresh_at": "2021-01-14T16:43:32.785Z",
                "refresh_interval_minutes": 30,
                "data_retention_minutes": 129600,
                "refresh_days": 62,
                "insights_account_id": "c312345-f72a-487b-b6aa-a7c796deeac1",
                "refresh_failed_counter": 5,
                "consent_authorization_required": "true"
            }
        ]
    }
}

results matching ""

    No results matching ""