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.fda.moph.go.th/sq/api/3/action/datastore_create |
---|---|
Përditso / shto | https://catalog.fda.moph.go.th/sq/api/3/action/datastore_upsert |
Kërkesa | https://catalog.fda.moph.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: '00b23746-856b-4a75-9cce-58629406b4e4', // the resource id limit: 5, // get 5 results q: 'jones' // query for 'jones' }; $.ajax({ url: 'https://catalog.fda.moph.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.fda.moph.go.th/sq/api/3/action/datastore_search?limit=5&resource_id=00b23746-856b-4a75-9cce-58629406b4e4&q=title:jones' fileobj = urllib.urlopen(url) print fileobj.read()