CKAN Data API

Access resource data via a web API with powerful query support. Further information in the main CKAN Data API and DataStore documentation.

Endpoints »

The Data API can be accessed via the following actions of the CKAN action API.

Oluştur https://opendata.tisi.go.th/tr/api/3/action/datastore_create
Update / Insert https://opendata.tisi.go.th/tr/api/3/action/datastore_upsert
Query https://opendata.tisi.go.th/tr/api/3/action/datastore_search
Query (via SQL) https://opendata.tisi.go.th/tr/api/3/action/datastore_search_sql
Sorgulama »
Sorgu örnekleri (ilk 5 sonuç)

https://opendata.tisi.go.th/tr/api/3/action/datastore_search?limit=5&resource_id=e60fbec6-d19f-4686-a48d-89af0f26c307

Sorgu örnekleri ('jones' içeren sonuçlar)

https://opendata.tisi.go.th/tr/api/3/action/datastore_search?q=jones&resource_id=e60fbec6-d19f-4686-a48d-89af0f26c307

Sorgu örnekleri (SQL ile)

https://opendata.tisi.go.th/tr/api/3/action/datastore_search_sql?sql=SELECT * from "e60fbec6-d19f-4686-a48d-89af0f26c307" WHERE title LIKE 'jones'

Örnek: Javascript »

A simple ajax (JSONP) request to the data API using jQuery.

        var data = {
          resource_id: 'e60fbec6-d19f-4686-a48d-89af0f26c307', // the resource id
          limit: 5, // get 5 results
          q: 'jones' // query for 'jones'
        };
        $.ajax({
          url: 'https://opendata.tisi.go.th/tr/api/3/action/datastore_search',
          data: data,
          dataType: 'jsonp',
          success: function(data) {
            alert('Total results found: ' + data.result.total)
          }
        });
Örnek: Python »
      import urllib
      url = 'https://opendata.tisi.go.th/tr/api/3/action/datastore_search?limit=5&resource_id=e60fbec6-d19f-4686-a48d-89af0f26c307&q=title:jones'  
      fileobj = urllib.urlopen(url)
      print fileobj.read()