The FIWARE NGSI version 2 API has reached the release candidate status. That means that we consider the current specification quite stable and mature, although there are still open issues. However, we expect that the resolution of those issues will not affect the main design principles and backbone of the API. Meanwhile, Orion Context Broker 1.2.0, released at the beginning of June, fully implements such version of the API.
If you are a developer probably you are wondering whether you should start using this brand new API. The answer is undoubtedly ‘yes’. Why? Because it makes your life easier, but at the same time opens up a new world of possibilities. The advantages of NGSI version 2 can be outlined in three bullet points:
-
Simplified payloads. NGSI version 2 has defined simpler JSON payloads. That means less lines of code to parse the NGSI messages. We have removed unneeded envelops and now data can be consumed straightforwardly. Furthermore, different payload flavours (normalized, keyValues, values) allow to build different kinds of clients. Notifications and subscriptions are now easier than ever.
-
RESTful approach. NGSI version 1 was based on HTTP POST for all operations, whereas NGSI version 2 fully adopts REST, and all the semantics of the HTTP protocol: GET for querying data, POST for adding data, PATCH for updating data and DELETE for removing data.
-
Powerful queries. A query language has been added to the API allowing to filter and sort data by different criteria, including geographical relationships such as intersection or coverage. Furthermore entity’s location can be now represented by different geometries (point, polygon, line), encoded as GeoJSON or as an encoding similar to GeoRSS.
Probably you are eager to know more about the API and start doing hands-on work with it. The good news is there is now plenty of documentation and tutorials. A good starting point is the FIWARE Tour Guide. Then you can continue reading the NGSI version 2 cookbook and playing with the data offered by the Tour Guide Application. Last but not least this presentation can enable you to master the API. Documentation is, as usual, at readthedocs. Support is provided through the Stackoverflow (tag fiware-orion) and askbot channels.
But what happens with NGSI version 1? NGSI version 1 is here to stay. Interoperability between different FIWARE enablers still depends on it, thus we plan to maintain and fix version 1 bugs. However no new features will be added to such version.
And what are the plans for fully releasing NGSI version 2? That should happen by the end of the year. One major feature that will be added to the final specification is support for context registrations and linked data. The latter will introduce another encoding called JSON-LD, already used by browser vendors and the schema.org initiative.
The last thing to say is that it has been a long journey since we started the NGSI version 2 effort one year ago. Congratulations to all the team (specially the development engineers) for the effort and enthusiasm demonstrated during these months. Now it is time to enjoy and to create amazing applications for the smart world!
José Manuel Cantera – Technological Expert. FIWARE Team