Konya Acik Veri API'si

Sorgu Adresleri »

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
Sorgulama »
Sorgu örnekleri (ilk 5 sonuç)

https://acikveri.konya.bel.tr/tr/api/3/action/datastore_search?resource_id=abb73cab-e814-48f3-b845-ab03b47e636e&limit=5

Sorgu örnekleri ('jones' içeren sonuçlar)

https://acikveri.konya.bel.tr/tr/api/3/action/datastore_search?resource_id=abb73cab-e814-48f3-b845-ab03b47e636e&q=jones

Sorgu örnekleri (SQL ile)

https://acikveri.konya.bel.tr/tr/api/3/action/datastore_search_sql?sql=SELECT * from "abb73cab-e814-48f3-b845-ab03b47e636e" WHERE title LIKE 'jones'

Örnek: Javascript »

jQuery kullanarak veri API'sine basit ajax(JSONP) isteği.

        var data = {
          resource_id: 'abb73cab-e814-48f3-b845-ab03b47e636e', // 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)
          }
        });
Örnek: Python »
      import urllib
      url = 'https://acikveri.konya.bel.tr/tr/api/3/action/datastore_search?resource_id=abb73cab-e814-48f3-b845-ab03b47e636e&limit=5&q=title:jones'  
      fileobj = urllib.urlopen(url)
      print fileobj.read()