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

Description

Enable the specific datasource id.

Permissions

datasource.edit

Resource URL

https://app.klipfolio.com/api/1.0/datasources/{id}/@/enable

Parameters

id={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

Description

Disable the specific datasource ID.

Permissions

datasource.edit

Resource URL

https://app.klipfolio.com/api/1.0/datasources/{id}/@/disable

Parameters

id={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

Description

Import 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.

Permissions

datasource.import

Resource URL

https://app.klipfolio.com/api/1.0/datasources/{id}/@/import

Parameters

id={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

Description

Delete instances related to a specified data source.

Permissions

datasource.delete

Resource URL

https://app.klipfolio.com/api/1.0/datasources/{id}/@/delete_instances

Parameters

last_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": {}
}