We use proprietary and third party's cookies to improve your experience and our services, identifying your Internet Browsing preferences on our website; develop analytic activities and display advertising based on your preferences. If you keep browsing, you accept its use. You can get more information on our Cookie Policy
Cookies Policy
Publish/Subscribe Semantic Extension Open RESTful API Specification - FIWARE Forge Wiki

Publish/Subscribe Semantic Extension Open RESTful API Specification

From FIWARE Forge Wiki

Jump to: navigation, search


Introduction to the Context Broker (CB) Semantic Extension GE REST API

The Semantic Extension API

This API enables applications to retrieve context information using the semantic web standard protocol SPARQL and modeling language RDF.

Intended Audience

This document is primarily intended for Future Internet application developers who want to interface their application with the context broker using semantic web protocols, mainly using SPARQL. To use this information, the reader should have a general understanding of the GE [Open Specification] and be familiar to the following technologies:

  • RESTful web services
  • HTTP/1.1
  • XML

API Change History

Revision Date Changes Summary
March 05, 2014 Creation

How to Read This Document

All FI-WARE RESTful API specifications will follow the same list of conventions and will support certain common aspects. Please check Common aspects in FI-WARE Open Restful API Specifications.

Additional Resources

API Operations

Context Semantic query

The CB semantic extension provides a REST API. It can be invoked by using the GET method with the unique and mandatory "query" parameter, which value should be a SPARQL query.

Verb URI example Description
GET http://{SemanticExtensionIPAddress}:{SemExtPort}/queryservice/sparql?query={SPARQLQuery} Get results of a {SPARQLQuery} request


is the IP address of the SemanticExtension service. In the testbed, the global instance of this service can be used for testing purposes. Its IP address is:
is the portnumber where the SemanticExtension service will listen to its clients. The default portnumber is 9000.
is the SPARQL query.


is a protocol for querying RDF documents. It includes:

  • a language for expressing queries
  • a set of methods for submitting these queries
  • interaction structures for organising the interaction between the server managing the RDF documents and the client querying about these documents.

CB Semantic Extension adopts the language part of the specification. For a detailed and complete description of SPARQL you could refer to: [[1]]


OWL is a language for specifying ontologies. An ontology is a formal description of the conceptualization of a application domain. Basically it enables to define classes (e.g. the class of "human") and instances (e.g. "John Smith"), properties (e.g. "age"), relations (e.g. "isFatherOf") between concepts and properties of relations (e.g. "bijective".

For a detailed and complete description of OWL you could refer to: [[2]]

CB Semantic Extension adopt the OWL language. Its architecture is designed in such a way that, although few domain ontologies (such as geographical location and postal address ontologies) are already supported, it is possible to integrate new domain ontologies (see CB Semantic Extension programming guide document). The best practice recommendation here is to search for an existing ontology, preferably one coming from a large base community (e.g. the geographical location ontology that CB Semantic Extension support is the one published by the OGC), or a defacto standard, instead of creating one from scratch.

In the following section we describe the domain ontologies that CB Semantic Extension currently supports:

Geographical Location Ontology

Source: W3C Geospatial Vocabulary [[3]]

Postal Addressing Ontology

Source: C-CAST IST EU project [[4]]

Personal tools
Create a book