Data source instance operations allow you to refresh a data source instance.
POST /datasource-instances/{id}/@/refresh
Description | Refresh the specified data source instance. This refresh operation queues the data source for refresh, but it does not necessarily refresh it instantly. |
Permissions | dashboard.library |
Resource URL | https://app.klipfolio.com/api/1.0/datasource-instances/{id}/@/refresh |
Parameters | id={datasource-instance id} Note: The no_refresh parameter creates a data source with no instance, then creates an instance that doesn't refresh and then push data to it. |
Example Request
POST https://app.klipfolio.com/api/1/datasource-instances/0123456789abcdef0123456789abcdef/@/refresh
Example Response
{
"data": {
"op_requested":"refresh"
},
"meta": {
"status": 200,
"success": true
}
}
POST /datasources/@/refresh
Description | Queue multiple data sources for refresh in one API call. |
Permissions | datasource.edit |
Resource URL | https://app.klipfolio.com/api/1.0/datasources/@/refresh |
Parameters | "datasources" : ["datasourceId1", "datasourceId2", ..., "datasourceIdN"] List the data source IDs in your request body. |
Example Request
POST https://app.klipfolio.com/api/1.0/datasources/@/refresh { "datasources" : ["1a12bc34de56abc12de3ab4c45de12a3", "2a12bc34de12abc12de3ab3c45de32a1", "3a12bc34de56cba32de1ab5c45de12b3"] }
Example Responses
{
"meta": {
"success": true,
"status": 200
},
"data": {
"op_requested": "refresh",
"success": true,
"total_datasources_requested": 3,
"total_instances_requested": 5,
"queue_status": 200,
"total_instances_queued": 3,
}
}
{
"meta": {
"success": true,
"status": 200
},
"data": {
"op_requested": "refresh",
"success": true,
"total_datasources_requested": 2,
"total_instances_requested": 1,
"queue_status": 200,
"total_instances_queued": 1,
"failed_results": {
"description": "Some datasources/instances failed to queue.",
"invalid_datasources": {
"1234a1b23bc4d12345abc1a123ab2a2c": {
"error": "Data source not found: 1234a1b23bc4d12345abc1a123ab2a2c",
"status": 404,
"success": false
}
}
}
}
}