Get the status of a scheduled Insights-Refresh

This endpoint returns the status of a scheduled insights refresh.

POST /insights/v1/autorefresh/list HTTP/1.1
Content-Type: application/json; charset=utf-8
Authorization: Bearer <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.

{
    "data": {
        "status": [
            {
                "last_refresh_at": DateTime,
                "last_refresh_state": enum<'SUCCESS', 'EXCEPTION'>,
                "last_successful_refresh_at": ?DateTime,
                "next_refresh_at": DateTime,
                "refresh_interval_minutes": int,
                "data_retention_minutes": int,
                "intended_insights": Array<IntendedReport>,
                "refresh_days": ?int,
                "insights_account_id": string
            }
        ]
    }
}

last_refresh_at DateTime, always present

The ISO 8601 date time of the last automatic refresh.

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, optional

The ISO 8601 date time of the last successful automatic refresh.

next_refresh_at DateTime, always present

The ISO 8601 date time of the next automatic refresh

refresh_interval_minutes int, always present

The interval minutes that were configured for this automatic refresh.

data_retention_minutes int, 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 int, 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.

Example response

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

results matching ""

    No results matching ""