Viewing, creating, updating and managing data sources.
GET /datasources
| Description | Get a list of all the data sources to which the user has access. |
| Permissions | dashboard.library |
| Resource URL | https://app.klipfolio.com/api/1.0/datasources |
| Parameters | optional: client_id (string) — show only datasources that belong to a specific client |
Example Request
GET https://app.klipfolio.com/api/1/datasourcesGET https://app.klipfolio.com/api/1/datasources?client_id=0123456789abcdef0123456789abcdefExample Response
{
"meta": {
"success": true,
"status": 200,
"count": 4,
"total": 4
},
"data": {
"datasources": [
{
"id": "c98bad42a8c8a63e0b5e6c0f7aca9898",
"name": "Example: Marketing Web Analytics",
"description": "Sample data you can use when trying out Klipfolio. This is an example of typical web analytics data that you might pull out of services like Google Analytics, GoSquared or Adobe Analytics.",
"refresh_interval": 0,
"date_last_refresh": "2016-06-17T13:33:57Z",
"is_dynamic": false
},
]
}
}
GET /datasources/{id}
| Description | Get the details for the specific data source id. |
| Permissions | dashboard.library |
| Resource URL | https://app.klipfolio.com/api/1.0/datasources/{id} |
| Parameters | id={datasource id} optional: client_id (string) — show only datasource that belong to a specific client |
Example Request
GET https://app.klipfolio.com/api/1/datasources/0123456789abcdef0123456789abcdefGET https://app.klipfolio.com/api/1/datasources/0123456789abcdef0123456789abcdef?client_id=0123456789abcdef0123456789abcdefExample Response
{
"data": {
"id":"0123456789abcdef0123456789abcdef",
"company":"Self",
"name":"Sample Datasource",
"description":"Datasource sample details",
"connector":"google_adwords",
"format":"csv",
"refresh_interval":432000,
"created_by":"98765432109876543210987654321",
"is_dynamic":false,
"disabled":false,
"date_created":"2014-11-04T20:26:22Z",
"date_last_refresh":"2014-11-12T21:43:10Z"
},
"meta": {
"status": 200,
"success": true
}
POST /datasources
| Description | Create a data source. Data source properties can optionally be specified in the post data. |
| Permissions | datasource.create |
| Resource URL | https://app.klipfolio.com/api/1.0/datasources/{id} |
| Fields | name, description, format, connector, refresh_interval, properties, client_id (optional) Where connector could be: 'box', 'comscore', 'db', 'dropbox', 'facebook', 'ftp', 'google_adwords', 'google_analytics', 'google_drive', 'google_spreadsheets', 'hubspot', 'iformbuilder', 'marketo', 'omniture', 'radian6', 'salesforce', 'searchMetrics', 'shopify', 'simple_rest', 'survey_monkey', 'versature', 'xero', 'xmla' |
Example Requests
Note: optionally include 'client_id' in the post data to create a data source for a client.

POST https://app.klipfolio.com/api/1/datasources
{'name': 'Example',
'description': 'This is a new data source',
'format': 'xml',
'connector': 'simple_rest',
'refresh_interval': 1800,
'properties': {'endpoint_url': 'http\://test/data/scatter.xml', 'method': 'GET'}
}POST https://app.klipfolio.com/api/1/datasources -d
{
"name": "TESTPostman POST Klipfolio API",
"description": "Post man test",
"connector": "simple_rest",
"format": "json",
"refresh_interval": 14400,
"properties": {
"endpoint_url": "https://yourUniqueEndpoint.com/api/values",
"method": "get",
"parameters": "[{\"name\":\"x-api- key\",\"value\":\"1aBCDefgHi2JkLmnOpqrs3TuvwX4yZAB5CdE67fg\",\"type\":\"header\"]",
}
}Example Response
Note that both the data source id and the corresponding data source instance id is returned.
{
"meta": {
"success": true,
"status": 201,
"location": "/datasources/5d8821caa9ac3b2a291496e182de13e2",
"instance_location": "/datasource_instances/5d8821caa9ac3b2a291496e182de13e2"
},
"data": { }
}
PUT /datasources/{id}
| Description | Update the specified data source. |
| Permissions | datasource.edit |
| Resource URL | https://app.klipfolio.com/api/1.0/datasources |
| Fields | name, description, refresh_interval optional: client_id (string) — update only datasources that belong to a specific client |
Example Request
PUT https://app.klipfolio.com/api/1/datasources/8ea607c46ba6a7ba6e4c16ee292d7608 -d
{'name': 'Updated Data Source Name',
'description': 'This is cool info',
'refresh_interval': 14400}GET https://app.klipfolio.com/api/1/datasources/0123456789abcdef0123456789abcdef?client_id=0123456789abcdef0123456789abcdef -d
{'name': 'Updated Data Source Name',
'description': 'This is cool info',
'refresh_interval': 14400}Example Response:
{ "meta": { "success": true, "status": 200 }, "data": { } }
Note: UseData Source Instances Data to update the specified data source with data.
DELETE /datasources/{id}
| Description | Delete the data source associated with a specific data source ID. |
| Permissions | datasource.delete |
| Resource URL | https://app.klipfolio.com/api/1.0/datasources/{id} |
| Parameters | id={datasource id} optional: client_id (string) — delete datasources that belong to a specific client |
Example Request
DELETE https://app.klipfolio.com/api/1/datasources/0123456789abcdef0123456789abcdefDELETE https://app.klipfolio.com/api/1/datasources/0123456789abcdef0123456789abcdef?client_id=0123456789abcdef0123456789abcdefExample Response
{
"data": {},
"meta": {
"status": 200,
"success": true
}
}