Qasu në burimin e të dhënave përmes API të uebfaqes me mbështetje të fuqishme të kërkesës. Further information in the main CKAN Data API and DataStore documentation.
API i të dhënave mund të qaset përmes veprimeve në vijim të API-s të veprimit të CKAN-it
Krijo | https://gdcatalognhic.nha.co.th/sq/api/3/action/datastore_create |
---|---|
Përditso / shto | https://gdcatalognhic.nha.co.th/sq/api/3/action/datastore_upsert |
Kërkesa | https://gdcatalognhic.nha.co.th/sq/api/3/action/datastore_search |
Një AJAX kërkesë (JSONP) në API e të dhënave duke përdorur jQuery
var data = { resource_id: '081f76b8-bc53-43cc-b3d3-52db005a42af', // the resource id limit: 5, // get 5 results q: 'jones' // query for 'jones' }; $.ajax({ url: 'https://gdcatalognhic.nha.co.th/sq/api/3/action/datastore_search', data: data, dataType: 'jsonp', success: function(data) { alert('Total results found: ' + data.result.total) } });
import urllib url = 'https://gdcatalognhic.nha.co.th/sq/api/3/action/datastore_search?limit=5&resource_id=081f76b8-bc53-43cc-b3d3-52db005a42af&q=title:jones' fileobj = urllib.urlopen(url) print fileobj.read()