Opnaðu tilfangsgögn í gegnum nettengt API með öflugum leitarstuðningi. Further information in the main CKAN Data API and DataStore documentation.
Hægt er opna Data API með eftirfarandi aðgerðum CKAN action API.
Stofna | https://data.kaltimprov.go.id/is/api/3/action/datastore_create |
---|---|
Uppfæra / Færa inn | https://data.kaltimprov.go.id/is/api/3/action/datastore_upsert |
Fyrirspurn | https://data.kaltimprov.go.id/is/api/3/action/datastore_search |
Fyrirspurn (með SQL) | https://data.kaltimprov.go.id/is/api/3/action/datastore_search_sql |
Einföld ajax (JSONP) fyrirspurn til data API með jQuery.
var data = { resource_id: '02cff033-af49-4147-a3f0-ff3c2533c984', // the resource id limit: 5, // get 5 results q: 'jones' // query for 'jones' }; $.ajax({ url: 'https://data.kaltimprov.go.id/is/api/3/action/datastore_search', data: data, dataType: 'jsonp', success: function(data) { alert('Total results found: ' + data.result.total) } });
import urllib url = 'https://data.kaltimprov.go.id/is/api/3/action/datastore_search?resource_id=02cff033-af49-4147-a3f0-ff3c2533c984&limit=5&q=title:jones' fileobj = urllib.urlopen(url) print fileobj.read()