The Open Data Portal of the City Council of Sant Feliu de Llobregat, through OGoov, offers a REST API to access the data catalog and to obtain all the information in a dataset and their distributions.
This API is implemented by CKAN. The following list are some examples of using the API:
- Simple Data Catalog : http://apiopendata.santfeliu.cat/api/3/action/package_list
- Extended data catalog: http://apiopendata.santfeliu.cat/api/3/action/package_search
- List of groups (sectors): http://apiopendata.santfeliu.cat/api/3/action/group_list
- List of tag: http://apiopendata.santfeliu.cat/api/3/action/tag_list
- All information in a dataset: http://apiopendata.santfeliu.cat/api/3/action/package_show?id=[id_distribución]
All documentation CKAN REST API is available at the following address: http://docs.ckan.org/en/latest/api/index.html
Real Time Open Data (RTOD)
In addition to this API served by CKAN, Real Time Open Data (RTOD) middleware, used to serve distributions with periodic updates, offers a REST-based API from which both the list of available distributions and their resources can be accessed. The system has a control of extensions on the HTTP requests, which allows returning the representations in the requested formats. For example:
- Listed with the set of collections available in RTOD: http://preapirtod.santfeliu.cat/rest/collections.[ext] Ex: http://apirtod.santfeliu.cat/rest/collections.json
- Set of resources for a collection: http://apirtod.santfeliu.cat/rest/datos/[id_collection].[ext]
- Supports requests (ext) in the formats RDF (.rdf), HTML (.html), JSON (.json), N3 (.n3), XML (.xml), TURTLE (.ttl), CSV (.csv), ATOM (.atom) and JSON-LD (.jsonld).
- Resource of a collection: http://apirtod.santfeliu.cat/rest/datos/[ id_collection]/[id_resource].[ext]