CKAN extension that will give you the ability to generate real-time resources provided by a Context broker. Some resources may need your IDM token, so you must be logged in to be able to see those resources properly.
Note: This extension has been tested in CKAN 2.2 and 2.3. It may not work in other versions.
Install this extension in your CKAN is instance is as easy as install any other CKAN extension.
python setup.py develop
/etc/ckan/default/production.ini) and add
ckan.pluginsand to ckan.views.default_views.
sudo service apache2 restart)
The way to create a NGSI resource is fairly simple:
Firstly you have to access to the resource create section and choose the option Link.
Fill the URL field with a Context Broker query, if your query is a convenience operation, you only have to fill the URL field with it. If instead, it is a standard operation query, you have to do an additional step after create the resource in order to add a payload to de query. You can control the results pagination at the same way that in a common Context Broker query.
Complete the Format field with ngsi9 or ngsi10 and click on add resource. This is an important step, and without it the extension won’t do anything with your resource.
Finally set the OAuth-token field to required if you are working with Orion ContextBroker at http://orion.lab.fiware.org:1026. Additionally you can also manage the tenant and the service path as the same way that it is explained at Orion Context Broker documentation.
If your query is a convenience type, your resource has already been created, on the contrary if it is a standard operation you have to do the next step.
Ckanext-ngsiview is being adapted to allow to load and preview of historic data provided by STH, the new format associated to that kind of resources is named as ngsi-h.
By now there isn’t a stable version of STH, and its API may be modified, but the intention is to keep the same structure and data creation process that an standard ngsi resource.