የ CKAN የመረጃ ኤፒአይ

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

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

ፍጠር https://homologa.cge.mg.gov.br/am/api/3/action/datastore_create
አሻሽል / አስገባ https://homologa.cge.mg.gov.br/am/api/3/action/datastore_upsert
መጠይቅ https://homologa.cge.mg.gov.br/am/api/3/action/datastore_search
መጠይቅ (በ SQL) https://homologa.cge.mg.gov.br/am/api/3/action/datastore_search_sql

የመጠይቅ ምሳሌ (የመጀመሪያ 5 ውጤቶች)

https://homologa.cge.mg.gov.br/am/api/3/action/datastore_search?resource_id=681a2275-fea6-4544-bbad-75b541f6bbb2&limit=5

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

https://homologa.cge.mg.gov.br/am/api/3/action/datastore_search?resource_id=681a2275-fea6-4544-bbad-75b541f6bbb2&q=jones

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

https://homologa.cge.mg.gov.br/am/api/3/action/datastore_search_sql?sql=SELECT * from "681a2275-fea6-4544-bbad-75b541f6bbb2" WHERE title LIKE 'jones'

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

          var data = {
            resource_id: '681a2275-fea6-4544-bbad-75b541f6bbb2', // the resource id
            limit: 5, // get 5 results
            q: 'jones' // query for 'jones'
          };
          $.ajax({
            url: 'https://homologa.cge.mg.gov.br/am/api/3/action/datastore_search',
            data: data,
            dataType: 'jsonp',
            success: function(data) {
              alert('Total results found: ' + data.result.total)
            }
          });
        import urllib.request
        url = 'https://homologa.cge.mg.gov.br/am/api/3/action/datastore_search?resource_id=681a2275-fea6-4544-bbad-75b541f6bbb2&limit=5&q=title:jones'  
        fileobj = urllib.request.urlopen(url)
        print(fileobj.read())