Достъп до ресурсни данни чрез уеб API със силна поддръжка на заявки.. Further information in the main CKAN Data API and DataStore documentation.
Това Data API е достъпно само чрез следните действия от CKAN API за действия.
| Създаване | https://lincolnshire.ckan.io/bg/api/3/action/datastore_create |
|---|---|
| Обновяване / Вмъкване | https://lincolnshire.ckan.io/bg/api/3/action/datastore_upsert |
| Заявка | https://lincolnshire.ckan.io/bg/api/3/action/datastore_search |
| Заявка (чрез SQL) | https://lincolnshire.ckan.io/bg/api/3/action/datastore_search_sql |
Обикновена заявка по технологията ajax (JSONP) към API на данните чрез jQuery.
var data = {
resource_id: 'f779c375-0450-42fe-826d-278eaf5c454d', // the resource id
limit: 5, // get 5 results
q: 'jones' // query for 'jones'
};
$.ajax({
url: 'https://lincolnshire.ckan.io/bg/api/3/action/datastore_search',
data: data,
dataType: 'jsonp',
success: function(data) {
alert('Total results found: ' + data.result.total)
}
});
import urllib url = 'https://lincolnshire.ckan.io/bg/api/3/action/datastore_search?resource_id=f779c375-0450-42fe-826d-278eaf5c454d&limit=5&q=title:jones' fileobj = urllib.urlopen(url) print fileobj.read()