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://catalog.moe.go.th/sq/api/3/action/datastore_create |
---|---|
Përditso / shto | https://catalog.moe.go.th/sq/api/3/action/datastore_upsert |
Kërkesa | https://catalog.moe.go.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: '2da46882-9ae2-4dc2-91ee-3ae996cdf212', // the resource id limit: 5, // get 5 results q: 'jones' // query for 'jones' }; $.ajax({ url: 'https://catalog.moe.go.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://catalog.moe.go.th/sq/api/3/action/datastore_search?limit=5&resource_id=2da46882-9ae2-4dc2-91ee-3ae996cdf212&q=title:jones' fileobj = urllib.urlopen(url) print fileobj.read()