Zugriff auf Ressourcen per Web-Schnittstelle mit umfangreichen Suchmöglichkeiten. Weiterführende Information in der zentralen CKAN Data API und DataStore Dokumentation.
Die Daten-Schnittstelle (Data-API) kann über folgende Schnittstellenbefehle der CKAN Action API erreicht werden.
Erstellen | https://nonthaburi.gdcatalog.go.th/de/api/3/action/datastore_create |
---|---|
Aktualisieren / Einfügen | https://nonthaburi.gdcatalog.go.th/de/api/3/action/datastore_upsert |
Abfrage | https://nonthaburi.gdcatalog.go.th/de/api/3/action/datastore_search |
Eine einfache AJAX (JSONP) Abfrage des Data API mit jQuery.
var data = { resource_id: '44fec409-5da4-4838-ade2-3df78d1aa39e', // the resource id limit: 5, // get 5 results q: 'jones' // query for 'jones' }; $.ajax({ url: 'https://nonthaburi.gdcatalog.go.th/de/api/3/action/datastore_search', data: data, dataType: 'jsonp', success: function(data) { alert('Total results found: ' + data.result.total) } });
import urllib url = 'https://nonthaburi.gdcatalog.go.th/de/api/3/action/datastore_search?limit=5&resource_id=44fec409-5da4-4838-ade2-3df78d1aa39e&q=title:jones' fileobj = urllib.urlopen(url) print fileobj.read()