የ CKAN የመረጃ ኤፒአይ

ጠንካራ የጠያቂ ድጋፍ ባለው የድር ኤፒአይ በመጠቀም መረጃ ያግኙ።. ለበለጠ መረጃ የ CKAN የመረጃ ኤፒአይ እና የመረጃ ማከማቻ መግለጫ ሰነድ.

ማገባደጃ »

የመረጃው ኤፒአይ በሚከተሉት የ CKAN ኤፒአይ ድርጊት ሂደቶች ማግኝት ይችላሉ።

ፍጠር https://datos.cnbs.gob.hn/am/api/3/action/datastore_create
አሻሽል / አስገባ https://datos.cnbs.gob.hn/am/api/3/action/datastore_upsert
መጠይቅ https://datos.cnbs.gob.hn/am/api/3/action/datastore_search
መጠይቅ (በ SQL) https://datos.cnbs.gob.hn/am/api/3/action/datastore_search_sql
በመጠይቅ ላይ »
የመጠይቅ ምሳሌ (የመጀመሪያ 5 ውጤቶች)

https://datos.cnbs.gob.hn/am/api/3/action/datastore_search?resource_id=68d30103-0f2b-49e1-9e59-cf37d97a5d17&limit=5

የመጠይቅ ምሳሌ ('ጆንስ'ን የያዙ ውጤቶች)

https://datos.cnbs.gob.hn/am/api/3/action/datastore_search?resource_id=68d30103-0f2b-49e1-9e59-cf37d97a5d17&q=jones

የመጠይቅ ምሳሌ (በ SQL አረፍተ ነገር በኩል)

https://datos.cnbs.gob.hn/am/api/3/action/datastore_search_sql?sql=SELECT * from "68d30103-0f2b-49e1-9e59-cf37d97a5d17" WHERE title LIKE 'jones'

ምሳሌ: ጃቫስክሪፕት »

jQuery በመጠቀም ወደ መረጃ ኤፒአይ ቀላል የአጃክስ (JSONP) ጥያቄ

        var data = {
          resource_id: '68d30103-0f2b-49e1-9e59-cf37d97a5d17', // the resource id
          limit: 5, // get 5 results
          q: 'jones' // query for 'jones'
        };
        $.ajax({
          url: 'https://datos.cnbs.gob.hn/am/api/3/action/datastore_search',
          data: data,
          dataType: 'jsonp',
          success: function(data) {
            alert('Total results found: ' + data.result.total)
          }
        });
ምሳሌ: ፓይቶን »
      import urllib
      url = 'https://datos.cnbs.gob.hn/am/api/3/action/datastore_search?resource_id=68d30103-0f2b-49e1-9e59-cf37d97a5d17&limit=5&q=title:jones'  
      fileobj = urllib.urlopen(url)
      print fileobj.read()