Schedule an automatic Insights-Refresh
This endpoint is used to schedule an automatic refresh call for a specific account or all accounts of a consumer.
If a schedule call affects an account, that was already scheduled, the schedule parameters (like refresh_days
, data_retention_minutes
, refresh_interval_minutes
and refresh_interval
) for it will be updated to the new ones. This changes already scheduled refreshs to be run after the new refresh in refresh_interval_minutes
or refresh_interval
.
Starting the Consent Insights Refresh
POST /insights/v1/autorefresh/schedule HTTP/1.1
Content-Type: application/json; charset=utf-8
Authorization: Token <Token>
Host: <Host>
{
"insights_consumer_id" : String,
"insights_account_ids" : ?Array<String>,
"intended_reports" : ?Array<IntendedReport>,
"refresh_days": ?Integer,
"data_retention_minutes" : ?Integer,
"refresh_interval_minutes" : ?Integer,
"refresh_interval" : ?Enum<'DAILY', 'WEEKLY', 'AS_OFTEN_AS_POSSIBLE'>
}
The insights_consumer_id
of the consumer which accounts should be scheduled for an automatic refresh. If the insights_account_ids
property is not set all accounts of this consumer are scheduled to auto refresh.
The insights_account_ids
specify which accounts of the consumer should be automatically refreshed.
The intended_reports
specifies which reports should later be generated with the extracted data. Using this property reduces the amount of data that is extracted from the consumers account. As default data for all available reports are extracted.
Defines how many days of data (eg. for transactions) should be received during the auto refresh. The default is 62 days.
The number of minutes that the data are stored. Default is 10 minutes.
Schedules automatic refresh:
DAILY
: Schedule automatic refresh once per day.WEEKLY
: Schedule automatic refresh once per week.AS_OFTEN_AS_POSSIBLE
: Schedule automatic refresh as often as possible according to the consumer's bank policy with a minimum boundary of 4 hours between each refresh.
Please note that you must set one of the parameters refresh_interval_minutes
or refresh_interval
but not both.
Response
The response body is empty if the scheduling was successful. For unsuccessful requests the error format can be found here.
{}
Example Request
In the follwing example an auto refresh is scheduled for all accounts of the consumer, that is identified by the given insights_consumer_id
, and the refresh is done every 8 hours. The data are kept for 24 hours.
{
"insights_consumer_id": "d5e12345-6f7b-4b03-b018-6c158f0b281d",
"refresh_interval_minutes": 480,
"data_retention_minutes": 1440
}