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>
}
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.
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
}
]
}
}
The date and time of the last automatic refresh.
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.
In case of a non successful last_refresh_state
the error message can be set.
The date and time of the last successful automatic refresh.
The date and time of the next automatic refresh.
The interval minutes that were configured for this automatic refresh.
The minutes that data of this automatic refresh are stored.
The intented insights that were configured for this automatic refresh.
The number of days for transactions that are configured to be refreshed for this automatic refresh.
The identifier of the account for which this automatic refresh status is.
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.
The refresh_interval
property holds the current scheduled automatic refresh that was set for this consumer.
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"
}
]
}
}