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: '462b6234-5a0d-4ebc-86f8-f2bdd24ae8f9', // 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=462b6234-5a0d-4ebc-86f8-f2bdd24ae8f9&limit=5&q=title:jones' fileobj = urllib.urlopen(url) print fileobj.read()