CKAN ckanext-ngsiview
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.
Requirements
- OAuth2 CKAN Extension. OAuth2 CKAN Extension. This extension might be needed since some the requests sent to the ContextBroker must include the OAuth2 credentials to identify the user that is creating the offering.
Installation
Install this extension in your CKAN is instance is as easy as install any other CKAN extension.
- Download the source from this GitHub repo.
- Activate your virtual environment (generally by running
. /usr/lib/ckan/default/bin/activate)
- Install the extension by running
python setup.py develop
- Modify your configuration file (generally in
/etc/ckan/default/production.ini) and add ngsiview to the ckan.plugins and to ckan.views.default_views.
- Restart your apache server (
sudo service apache2 restart)
How it works?
The way to create a NGSI resource is fairly simple:
1. 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 e