Veri API'si aşağıdaki API aksiyonundan erişilebilir
Oluştur | https://acikveri.konya.bel.tr/tr/api/3/action/datastore_create |
---|---|
Güncelle / Ekle | https://acikveri.konya.bel.tr/tr/api/3/action/datastore_upsert |
Sorgu | https://acikveri.konya.bel.tr/tr/api/3/action/datastore_search |
Sorgu (SQL ile) | https://acikveri.konya.bel.tr/tr/api/3/action/datastore_search_sql |
jQuery kullanarak veri API'sine basit ajax(JSONP) isteği.
var data = { resource_id: 'b2b1b84a-09a7-4b59-88dc-27c85ad8ebd5', // the resource id limit: 5, // get 5 results q: 'jones' // query for 'jones' }; $.ajax({ url: 'https://acikveri.konya.bel.tr/tr/api/3/action/datastore_search', data: data, dataType: 'jsonp', success: function(data) { alert('Total results found: ' + data.result.total) } });
import urllib url = 'https://acikveri.konya.bel.tr/tr/api/3/action/datastore_search?resource_id=b2b1b84a-09a7-4b59-88dc-27c85ad8ebd5&limit=5&q=title:jones' fileobj = urllib.urlopen(url) print fileobj.read()