Perform tasks related to the data source including refresh the data source, enable or disable the data source and import a data source.

POST /datasources/{id}/@/enable

DescriptionEnable the specific datasource id.
Permissionsdatasource.edit
Resource URLhttps://app.klipfolio.com/api/1.0/datasources/{id}/@/enable
Parametersid={datasource id}

Example Request

POST https://app.klipfolio.com/api/1/datasources/0123456789abcdef0123456789abcdef/@/enable

Example Response

{
"data": {
     "op_requested":"enable"
},
"meta": {
    "status": 200,
    "success": true
}
}

POST /datasources/{id}/@/disable

DescriptionDisable the specific datasource ID.
Permissionsdatasource.edit
Resource URLhttps://app.klipfolio.com/api/1.0/datasources/{id}/@/disable
Parametersid={datasource id}

Example Request

POST https://app.klipfolio.com/api/1/datasources/0123456789abcdef0123456789abcdef/@/disable

Example Response

{
"data": {
    "op_requested":"disable"
},
"meta": {
   "status": 200,
   "success": true
}
}

POST /datasources/{id}/@/import

DescriptionImport the data source into the client account specified in the post data by the client id. The location of the newly imported data source is returned on successful completion.
Permissionsdatasource.import
Resource URLhttps://app.klipfolio.com/api/1.0/datasources/{id}/@/import
Parametersid={datasource id}

Example Request

POST https://app.klipfolio.com/api/1/datasources/abc01234567/@/import -d
"{'client_id': '0123456789abcdef0123456789abcdef'}"

Example Response

{
 "meta": { "success": true, 
 "status": 201,
 “location”: “/datasources/abc01234567”},
 "data": { "op_requested": "import" }
}

POST /datasources/{id}/@/delete_instances

DescriptionDelete instances related to a specified data source.
Permissionsdatasource.delete
Resource URLhttps://app.klipfolio.com/api/1.0/datasources/{id}/@/delete_instances
Parameterslast_access (optional: Unix time) Only deletes instances that haven't been accessed since the specified time. If not specified, deletes all instances of the specified data source.
keep_latest_instance (boolean). Deletes all specified instances except the one most recently accessed.

Example Request

POST https://app.klipfolio.com/api/1/datasources/1234asdfg1234asdfg/@/delete_instances?last_access=50004

Example Response

{
  "meta": {
    "success": true,
    "status": 200
  },
  "data": {}
}