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
Semantic Support Open RESTful API Specification - FIWARE Forge Wiki

Semantic Support Open RESTful API Specification

From FIWARE Forge Wiki

Jump to: navigation, search

Contents

Introduction to the Ontology Registry API

Please check the FI-WARE Open Specification Legal Notice (implicit patents license) to understand the rights to use FI-WARE Open Specifications.

Ontology Registry API Core

The Ontology Registry API is a RESTful, resource-oriented API accessed via HTTP that uses XML-based representations for information interchange. This API provides the means to effectively manage ontolgies and their related metadata, enhancing ontology development lifecycle. This API is part of the set of APIs provided by the Semmantic Application Support GE.

Intended Audience

This specification is intended for ontology practitioners or ontology engineering application developers. For the former, this document provides a full specification of how to interoperate with Ontology Registries that implements Ontology Registry API. To use this information, the reader should firstly have a general understanding of the Semmantic Application Support GE.

API Change History

This version of the Ontology Registry API Guide replaces and obsoletes all previous versions. The most recent changes are described in the table below:

Revision Date Changes Summary
Apr 24, 2012 Initial API version

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. For a description of some terms used along this document, see Semantic Application Support GE Architecture.

Aditional Resources

For more details about the Semantic Web Application Support GE that this API is based upon, please refer to Semantic Web Application Support documentation. Related documents, including an Architectural Description, are available at the same site.

General Ontology Registry API Information

Resources Summary

Representation Format

The Ontology Registry API supports XML based representation formats.

Representation Transport

Resource representation is transmitted between client and server by using HTTP 1.1 protocol, as defined by IETF RFC-2616. Each time an HTTP request contains payload, a Content-Type header shall be used to specify the MIME type of wrapped representation. In addition, both client and server may use as many HTTP headers as they consider necessary.

Resource Identification

This section must explain which would be the resource identification used by the API in order to identify unambiguously the resource. For HTTP transport, this is made using the mechanisms described by HTTP protocol specification as defined by IETF RFC-2616.

Links and References

No additional links or references are provided in this version.


API Operations

The following section provides the detail for each RESTful operation giving the expected input and output for each URI.

Ontology Operations

GetOntologyVersion

Verb URI Description
GET /ontologies/{ontologyIRI}/{versionIRI} Retrieves the ontology field identified by a given ontology IRI and version IRI

Response codes:

  • HTTP/1.1 200 - If the ontology is succesfully retrieved from the registry
  • HTTP/1.1 404 - If there is no ontology in the registry identified by given ontology IRI and version IRI
  • HTTP/1.1 500 - If there are some unidentified error.

Request example:

GET /ontology-registry-service/webresources/ontology-registry/ontologies/merm.owl/7 HTTP/1.1
Host: localhost:8080
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8

Response example:

HTTP/1.1 200 OK
Content-Type: application/xml
 
<?xml version="1.0"?>
 
 <!DOCTYPE rdf:RDF [
    <!ENTITY sioc "http://rdfs.org/sioc/ns#" >
    <!ENTITY dcterms "http://purl.org/dc/terms/" >
    <!ENTITY foaf "http://xmlns.com/foaf/0.1/" >
    <!ENTITY sawsdl "http://www.w3.org/ns/sawsdl#" >
    <!ENTITY owl "http://www.w3.org/2002/07/owl#" >
    <!ENTITY swrl "http://www.w3.org/2003/11/swrl#" >
    <!ENTITY owl2 "http://www.w3.org/2006/12/owl2#" >
    <!ENTITY dc "http://purl.org/dc/elements/1.1/" >
    <!ENTITY posm "http://www.wsmo.org/ns/posm/0.1#" >
    <!ENTITY swrlb "http://www.w3.org/2003/11/swrlb#" >
    <!ENTITY swrlx "http://www.w3.org/2003/11/swrlx#" >
    <!ENTITY xsd "http://www.w3.org/2001/XMLSchema#" >
    <!ENTITY rdfs "http://www.w3.org/2000/01/rdf-schema#" >
    <!ENTITY rdf "http://www.w3.org/1999/02/22-rdf-syntax-ns#" >
    <!ENTITY so "http://knoesis.wright.edu/ssw/ont/sensor-observation.owl#" >
 ]>
 
 <rdf:RDF xmlns="http://www.tatoo-fp7.eu/tatooweb/merm#"
     xml:base="http://www.tatoo-fp7.eu/tatooweb/merm"
     xmlns:dc="http://purl.org/dc/elements/1.1/"
     xmlns:foaf="http://xmlns.com/foaf/0.1/"
     xmlns:so="http://knoesis.wright.edu/ssw/ont/sensor-observation.owl#"
     xmlns:swrlx="http://www.w3.org/2003/11/swrlx#"
     xmlns:sawsdl="http://www.w3.org/ns/sawsdl#"
     xmlns:owl2="http://www.w3.org/2006/12/owl2#"
     xmlns:dcterms="http://purl.org/dc/terms/"
     xmlns:sioc="http://rdfs.org/sioc/ns#"
     xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#"
     xmlns:swrl="http://www.w3.org/2003/11/swrl#"
     xmlns:xsd="http://www.w3.org/2001/XMLSchema#"
     xmlns:owl="http://www.w3.org/2002/07/owl#"
     xmlns:swrlb="http://www.w3.org/2003/11/swrlb#"
     xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
     xmlns:posm="http://www.wsmo.org/ns/posm/0.1#">
 
    <owl:Ontology rdf:about="http://www.tatoo-fp7.eu/tatooweb/merm">
        <owl:imports rdf:resource="http://www.tatoo-fp7.eu/tatooweb/foaf_pruned"/>
        <owl:imports rdf:resource="http://www.tatoo-fp7.eu/tatooweb/V1_0/sioc_pruned"/>
    </owl:Ontology>
 
    <!-- 
    ///////////////////////////////////////////////////////////////////////////////////////
    //
    // Annotation properties
    //
    ///////////////////////////////////////////////////////////////////////////////////////
     -->
  
    <owl:DatatypeProperty rdf:about="http://www.tatoo-fp7.eu/tatooweb/merm#hasEvaluationMetric">
        <rdfs:label xml:lang="en">has Evaluation Metric</rdfs:label>
        <rdfs:range rdf:resource="&xsd;String"/>
    </owl:DatatypeProperty>
    <owl:ObjectProperty rdf:about="http://www.tatoo-fp7.eu/tatooweb/merm#dateEvaluated">
        <rdfs:label xml:lang="en">date evaluated</rdfs:label>
        <rdfs:domain rdf:resource="http://www.tatoo-fp7.eu/tatooweb/merm#Evaluation"/>
        <rdfs:subPropertyOf rdf:resource="http://www.tatoo-fp7.eu/tatooweb/merm#dateProvided"/>
    </owl:ObjectProperty>
 
    <owl:ObjectProperty rdf:about="&dc;publisher">
        <rdfs:label xml:lang="en">publisher</rdfs:label>
        <rdfs:comment>The person who publishes the resource in real world</rdfs:comment>
        <rdfs:domain rdf:resource="http://www.tatoo-fp7.eu/tatooweb/merm#Resource"/>
        <rdfs:range rdf:resource="&foaf;Agent"/>
    </owl:ObjectProperty>
 ...

GetOntology

Verb URI Description
GET /ontologies/{ontologyIRI} Retrieves the last version of the ontology identified by a given ontology IRI

Response codes:

  • HTTP/1.1 200 - If the ontology is succesfully retrieved from the registry
  • HTTP/1.1 404 - If there is no ontology in the registry identified by given ontology IRI
  • HTTP/1.1 500 - If there are some unidentified error.

Request example:

GET /ontology-registry-service/webresources/ontology-registry/ontologies/merm.owl HTTP/1.1
Host: localhost:8080
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8

Response example:

HTTP/1.1 200 OK
Content-Type: application/xml
 
<?xml version="1.0"?>
 
 <!DOCTYPE rdf:RDF [
    <!ENTITY sioc "http://rdfs.org/sioc/ns#" >
    <!ENTITY dcterms "http://purl.org/dc/terms/" >
    <!ENTITY foaf "http://xmlns.com/foaf/0.1/" >
    <!ENTITY sawsdl "http://www.w3.org/ns/sawsdl#" >
    <!ENTITY owl "http://www.w3.org/2002/07/owl#" >
    <!ENTITY swrl "http://www.w3.org/2003/11/swrl#" >
    <!ENTITY owl2 "http://www.w3.org/2006/12/owl2#" >
    <!ENTITY dc "http://purl.org/dc/elements/1.1/" >
    <!ENTITY posm "http://www.wsmo.org/ns/posm/0.1#" >
    <!ENTITY swrlb "http://www.w3.org/2003/11/swrlb#" >
    <!ENTITY swrlx "http://www.w3.org/2003/11/swrlx#" >
    <!ENTITY xsd "http://www.w3.org/2001/XMLSchema#" >
    <!ENTITY rdfs "http://www.w3.org/2000/01/rdf-schema#" >
    <!ENTITY rdf "http://www.w3.org/1999/02/22-rdf-syntax-ns#" >
    <!ENTITY so "http://knoesis.wright.edu/ssw/ont/sensor-observation.owl#" >
 ]>
 
 <rdf:RDF xmlns="http://www.tatoo-fp7.eu/tatooweb/merm#"
     xml:base="http://www.tatoo-fp7.eu/tatooweb/merm"
     xmlns:dc="http://purl.org/dc/elements/1.1/"
     xmlns:foaf="http://xmlns.com/foaf/0.1/"
     xmlns:so="http://knoesis.wright.edu/ssw/ont/sensor-observation.owl#"
     xmlns:swrlx="http://www.w3.org/2003/11/swrlx#"
     xmlns:sawsdl="http://www.w3.org/ns/sawsdl#"
     xmlns:owl2="http://www.w3.org/2006/12/owl2#"
     xmlns:dcterms="http://purl.org/dc/terms/"
     xmlns:sioc="http://rdfs.org/sioc/ns#"
     xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#"
     xmlns:swrl="http://www.w3.org/2003/11/swrl#"
     xmlns:xsd="http://www.w3.org/2001/XMLSchema#"
     xmlns:owl="http://www.w3.org/2002/07/owl#"
     xmlns:swrlb="http://www.w3.org/2003/11/swrlb#"
     xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
     xmlns:posm="http://www.wsmo.org/ns/posm/0.1#">
 
    <owl:Ontology rdf:about="http://www.tatoo-fp7.eu/tatooweb/merm">
        <owl:imports rdf:resource="http://www.tatoo-fp7.eu/tatooweb/foaf_pruned"/>
        <owl:imports rdf:resource="http://www.tatoo-fp7.eu/tatooweb/V1_0/sioc_pruned"/>
    </owl:Ontology>
 
    <!-- 
    ///////////////////////////////////////////////////////////////////////////////////////
    //
    // Annotation properties
    //
    ///////////////////////////////////////////////////////////////////////////////////////
     -->
  
    <owl:DatatypeProperty rdf:about="http://www.tatoo-fp7.eu/tatooweb/merm#hasEvaluationMetric">
        <rdfs:label xml:lang="en">has Evaluation Metric</rdfs:label>
        <rdfs:range rdf:resource="&xsd;String"/>
    </owl:DatatypeProperty>
    <owl:ObjectProperty rdf:about="http://www.tatoo-fp7.eu/tatooweb/merm#dateEvaluated">
        <rdfs:label xml:lang="en">date evaluated</rdfs:label>
        <rdfs:domain rdf:resource="http://www.tatoo-fp7.eu/tatooweb/merm#Evaluation"/>
        <rdfs:subPropertyOf rdf:resource="http://www.tatoo-fp7.eu/tatooweb/merm#dateProvided"/>
    </owl:ObjectProperty>
 
    <owl:ObjectProperty rdf:about="&dc;publisher">
        <rdfs:label xml:lang="en">publisher</rdfs:label>
        <rdfs:comment>The person who publishes the resource in real world</rdfs:comment>
        <rdfs:domain rdf:resource="http://www.tatoo-fp7.eu/tatooweb/merm#Resource"/>
        <rdfs:range rdf:resource="&foaf;Agent"/>
    </owl:ObjectProperty>
 ...

DeleteOntology

Verb URI Description
DELETE /ontologies/{ontologyIRI} Removes from the registry the last version of the ontology identified by a given ontology IRI

Response codes:

  • HTTP/1.1 200 - If the ontology is succesfully removed from the registry
  • HTTP/1.1 404 - If there is no ontology in the registry identified by given ontology IRI
  • HTTP/1.1 500 - If there are some unidentified error.

Request example:

DELETE /ontology-registry-service/webresources/ontology-registry/ontologies/owl_time_pruned.owl HTTP/1.1
Accept: application/xml
Host: localhost:8080

Response example:

HTTP/1.1 200 OK

DeleteOntologyVersion

Verb URI Description
DELETE /ontologies/{ontologyIRI}/{versionIRI} Removes from the registry the ontology identified by a given ontology IRI and version IRI

Response codes:

  • HTTP/1.1 200 - If the ontology is succesfully removed from the registry
  • HTTP/1.1 404 - If there is no ontology in the registry identified by given ontology IRI and version IRI
  • HTTP/1.1 500 - If there are some unidentified error.

Request example:

DELETE /ontology-registry-service/webresources/ontology-registry/ontologies/owl_time_pruned.owl HTTP/1.1
Accept: application/xml
Host: localhost:8080

Response example:

HTTP/1.1 200 OK

UploadOntology

Verb URI Description
POST /ontologies/{ontologyIRI} Upload an ontology file to the repository. Uploaded file is labeled as last ontology version

Response codes:

  • HTTP/1.1 200 - If the ontology is succesfully stored at the registry
  • HTTP/1.1 500 - If there are some unidentified error.

Request example:

POST /ontology-registry-service/webresources/ontology-registry/ontologies/sioc_pruned.owl?create=true HTTP/1.1
Content-Type: multipart/form-data; boundary=Boundary_30_4446747_1334759773635
Accept: application/xml
MIME-Version: 1.0
Host: localhost:8080
--Boundary_30_4446747_1334759773635
Content-Type: application/octet-stream
Content-Disposition: form-data; filename="sioc_pruned.owl"; modification-date="Mon, 28 Nov 2011 14:14:52 GMT"; size=8268; name="sioc_pruned.owl"
<?xml version="1.0"?>
 
 <!DOCTYPE rdf:RDF [
    <!ENTITY sioc "http://rdfs.org/sioc/ns#" >
    <!ENTITY terms "http://purl.org/dc/terms/" >
    <!ENTITY foaf "http://xmlns.com/foaf/0.1/" >
    <!ENTITY owl "http://www.w3.org/2002/07/owl#" >
    <!ENTITY swrl "http://www.w3.org/2003/11/swrl#" >
    <!ENTITY owl2 "http://www.w3.org/2006/12/owl2#" >
    <!ENTITY swrlb "http://www.w3.org/2003/11/swrlb#" >
    <!ENTITY swrlx "http://www.w3.org/2003/11/swrlx#" >
    <!ENTITY xsd "http://www.w3.org/2001/XMLSchema#" >
    <!ENTITY rdfs "http://www.w3.org/2000/01/rdf-schema#" >
    <!ENTITY rdf "http://www.w3.org/1999/02/22-rdf-syntax-ns#" >
 ]>
 
 <rdf:RDF xmlns="http://www.tatoo-fp7.eu/tatooweb/ns_module1#"
     xml:base="http://www.tatoo-fp7.eu/tatooweb/ns_module1"
     xmlns:foaf="http://xmlns.com/foaf/0.1/"
     xmlns:swrlx="http://www.w3.org/2003/11/swrlx#"
     xmlns:terms="http://purl.org/dc/terms/"
     xmlns:owl2="http://www.w3.org/2006/12/owl2#"
     xmlns:sioc="http://rdfs.org/sioc/ns#"
     xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#"
     xmlns:swrl="http://www.w3.org/2003/11/swrl#"
     xmlns:owl="http://www.w3.org/2002/07/owl#"
     xmlns:xsd="http://www.w3.org/2001/XMLSchema#"
     xmlns:swrlb="http://www.w3.org/2003/11/swrlb#"
     xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
    <owl:Ontology rdf:about="http://www.tatoo-fp7.eu/tatooweb/sioc_pruned"/>
    
    <!-- 
    ///////////////////////////////////////////////////////////////////////////////////////
    //
    // Annotation properties
    //
    ///////////////////////////////////////////////////////////////////////////////////////
     -->
 ...

Response example:

HTTP/1.1 200 OK

UploadOntologyVersion

Verb URI Description
POST /ontologies/{ontologyIRI}/{versionIRI} Upload an ontology file to the repository. Uploaded file is labeled with given ontology IRI and version IRI

Response codes:

  • HTTP/1.1 200 - If the ontology is succesfully stored at the registry
  • HTTP/1.1 500 - If there are some unidentified error.

Request example:

POST /ontology-registry-service/webresources/ontology-registry/ontologies/sioc_pruned.owl/1.0?create=true HTTP/1.1
Content-Type: multipart/form-data; boundary=Boundary_30_4446747_1334759773636
Accept: application/xml
MIME-Version: 1.0
Host: localhost:8080
--Boundary_30_4446747_1334759773636
Content-Type: application/octet-stream
Content-Disposition: form-data; filename="sioc_pruned.owl"; modification-date="Mon, 28 Nov 2011 14:14:52 GMT"; size=8268; name="sioc_pruned.owl"
<?xml version="1.0"?>
 
 <!DOCTYPE rdf:RDF [
    <!ENTITY sioc "http://rdfs.org/sioc/ns#" >
    <!ENTITY terms "http://purl.org/dc/terms/" >
    <!ENTITY foaf "http://xmlns.com/foaf/0.1/" >
    <!ENTITY owl "http://www.w3.org/2002/07/owl#" >
    <!ENTITY swrl "http://www.w3.org/2003/11/swrl#" >
    <!ENTITY owl2 "http://www.w3.org/2006/12/owl2#" >
    <!ENTITY swrlb "http://www.w3.org/2003/11/swrlb#" >
    <!ENTITY swrlx "http://www.w3.org/2003/11/swrlx#" >
    <!ENTITY xsd "http://www.w3.org/2001/XMLSchema#" >
    <!ENTITY rdfs "http://www.w3.org/2000/01/rdf-schema#" >
    <!ENTITY rdf "http://www.w3.org/1999/02/22-rdf-syntax-ns#" >
 ]>
 
 <rdf:RDF xmlns="http://www.tatoo-fp7.eu/tatooweb/ns_module1#"
     xml:base="http://www.tatoo-fp7.eu/tatooweb/ns_module1"
     xmlns:foaf="http://xmlns.com/foaf/0.1/"
     xmlns:swrlx="http://www.w3.org/2003/11/swrlx#"
     xmlns:terms="http://purl.org/dc/terms/"
     xmlns:owl2="http://www.w3.org/2006/12/owl2#"
     xmlns:sioc="http://rdfs.org/sioc/ns#"
     xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#"
     xmlns:swrl="http://www.w3.org/2003/11/swrl#"
     xmlns:owl="http://www.w3.org/2002/07/owl#"
     xmlns:xsd="http://www.w3.org/2001/XMLSchema#"
     xmlns:swrlb="http://www.w3.org/2003/11/swrlb#"
     xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
    <owl:Ontology rdf:about="http://www.tatoo-fp7.eu/tatooweb/sioc_pruned"/>
    
    <!-- 
    ///////////////////////////////////////////////////////////////////////////////////////
    //
    // Annotation properties
    //
    ///////////////////////////////////////////////////////////////////////////////////////
     -->
 ...

Response example:

HTTP/1.1 200 OK

Management Operations

GetOntologyList

Verb URI Description
GET /mgm/list Retrieves a list of the ontologies and their versions contained within the registry

Response codes:

  • HTTP/1.1 200 - If the ontology list is succesfully generated and retrieved
  • HTTP/1.1 500 - If there are some unidentified error.

Request example:

GET /ontology-registry-service/webresources/ontology-registry/mgm/list HTTP/1.1
Host: localhost:8080
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8

Response example:

HTTP/1.1 200 OK
Content-Type: application/xml

<?xml version="1.0" encoding="UTF-8"?>
   <ontologies>
      <ontology name="AITAlignments.owl">
         <version name="1"/>
      </ontology>
      <ontology name="AIT_ClimateTwins_Domain.owl">
         <version name="2"/>
      </ontology>
      <ontology name="ICD_neoplasms_pruned.owl">
         <version name="6"/>
         <version name="15"/>
         <version name="24"/>
      </ontology>
...

GetOntologyVersions

Verb URI Description
GET /mgm/list/{ontologyIRI} Retrieves a list of versions of ontology identified by given ontology IRI contained within the registry

Response codes:

  • HTTP/1.1 200 - If the ontology is succesfully stored at the registry
  • HTTP/1.1 404 - If there is no ontology identified by given ontology IRI.
  • HTTP/1.1 500 - If there are some unidentified error.

Request example:

GET /ontology-registry-service/webresources/ontology-registry/mgm/list/merm.owl HTTP/1.1
Host: localhost:8080
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8

Response example:

HTTP/1.1 200 OK
Content-Type: application/xml

<?xml version="1.0" encoding="UTF-8"?>
<ontology name="merm.owl">
   <version name="7"/>
   <version name="16"/>
   <version name="25"/>
</ontology>

Metadata Operations

GetOntologyVersionMetadata

Verb URI Description
GET /metadata/{ontologyIRI}/{versionIRI} Retrieves the metadata related with the ontology identified by a given ontology IRI and version IRI

Response codes:

  • HTTP/1.1 200 - If the metadata is succesfully retrieved from the registry
  • HTTP/1.1 404 - If there is no ontology in the registry identified by given ontology IRI and version IRI
  • HTTP/1.1 500 - If there are some unidentified error.

Request example:

GET /ontology-registry-service/webresources/ontology-registry/metadata/bridge.owl/3 HTTP/1.1
Host: localhost:8080
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8

Response example:

HTTP/1.1 200 OK
Content-Type: application/xml
 
<?xml version="1.0" encoding="UTF-8"?>
<rdf:RDF
	xmlns="http://omv.ontoware.org/2005/05/ontology#"
	xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#"
	xmlns:owl="http://www.w3.org/2002/07/owl#"
	xmlns:xsd="http://www.w3.org/2001/XMLSchema#"
	xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
	xmlns:swrl="http://www.w3.org/2003/11/swrl#"
	xmlns:swrlx="http://www.w3.org/2003/11/swrlx#"
	xmlns:swrlb="http://www.w3.org/2003/11/swrlb#"
	xmlns:owl2="http://www.w3.org/2006/12/owl2#"
	xmlns:bridge="http://localhost:8080/ontology-registry-service/webresources/ontology-registry/ontologies/bridge.owl/3#"
	xmlns:geonames_pruned="http://localhost:8080/ontology-registry-service/webresources/ontology-registry/ontologies/geonames_pruned.owl/5#">

<rdf:Description rdf:about="http://eu.atosresearch.ontology-registry/instance">
	<rdf:type rdf:resource="http://www.w3.org/2002/07/owl#Ontology"/>
</rdf:Description>

<rdf:Description rdf:about="http://localhost:8080/ontology-registry-service/webresources/ontology-registry/ontologies/bridge.owl/3#metadata">
	<rdf:type rdf:resource="http://omv.ontoware.org/2005/05/ontology#Ontology"/>
	<rdf:type rdf:resource="http://www.w3.org/2002/07/owl#NamedIndividual"/>
	<usedOntologyEngineeringTool rdf:resource="http://omv.ontoware.org/2005/05/ontology#NeOn-Toolkit"/>
	<hasCreator rdf:resource="http://omv.ontoware.org/2005/05/ontology#individual1333110758440"/>
	<hasOntologyLanguage rdf:resource="http://omv.ontoware.org/2005/05/ontology#OWL"/>
</rdf:Description>

</rdf:RDF>

GetOntologyMetadata

Verb URI Description
GET /metadata/{ontologyIRI} Retrieves the metadata related to the last version of the ontology identified by a given ontology IRI

Response codes:

  • HTTP/1.1 200 - If the metadata is succesfully retrieved from the registry
  • HTTP/1.1 404 - If there is no ontology in the registry identified by given ontology IRI
  • HTTP/1.1 500 - If there are some unidentified error.

Request example:

GET /ontology-registry-service/webresources/ontology-registry/metadata/bridge.owl HTTP/1.1
Host: localhost:8080
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8

Response example:

HTTP/1.1 200 OK
Content-Type: application/xml
 
<?xml version="1.0" encoding="UTF-8"?>
<rdf:RDF
	xmlns="http://omv.ontoware.org/2005/05/ontology#"
	xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#"
	xmlns:owl="http://www.w3.org/2002/07/owl#"
	xmlns:xsd="http://www.w3.org/2001/XMLSchema#"
	xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
	xmlns:swrl="http://www.w3.org/2003/11/swrl#"
	xmlns:swrlx="http://www.w3.org/2003/11/swrlx#"
	xmlns:swrlb="http://www.w3.org/2003/11/swrlb#"
	xmlns:owl2="http://www.w3.org/2006/12/owl2#"
	xmlns:bridge="http://localhost:8080/ontology-registry-service/webresources/ontology-registry/ontologies/bridge.owl/3#"
	xmlns:geonames_pruned="http://localhost:8080/ontology-registry-service/webresources/ontology-registry/ontologies/geonames_pruned.owl/5#">

<rdf:Description rdf:about="http://eu.atosresearch.ontology-registry/instance">
	<rdf:type rdf:resource="http://www.w3.org/2002/07/owl#Ontology"/>
</rdf:Description>

<rdf:Description rdf:about="http://localhost:8080/ontology-registry-service/webresources/ontology-registry/ontologies/bridge.owl/3#metadata">
	<rdf:type rdf:resource="http://omv.ontoware.org/2005/05/ontology#Ontology"/>
	<rdf:type rdf:resource="http://www.w3.org/2002/07/owl#NamedIndividual"/>
	<usedOntologyEngineeringTool rdf:resource="http://omv.ontoware.org/2005/05/ontology#NeOn-Toolkit"/>
	<hasCreator rdf:resource="http://omv.ontoware.org/2005/05/ontology#individual1333110758440"/>
	<hasOntologyLanguage rdf:resource="http://omv.ontoware.org/2005/05/ontology#OWL"/>
</rdf:Description>

</rdf:RDF>

DeleteOntologyMetadata

Verb URI Description
DELETE /metadata/{ontologyIRI} Removes from the registry the metadata related to the last version of the ontology identified by a given ontology IRI

Response codes:

  • HTTP/1.1 200 - If the metadata is succesfully removed from the registry
  • HTTP/1.1 404 - If there is no ontology in the registry identified by given ontology IRI
  • HTTP/1.1 500 - If there are some unidentified error.

Request example:

DELETE /ontology-registry-service/webresources/ontology-registry/metadata/bridge.owl HTTP/1.1
Accept: application/xml
Host: localhost:8080

Response example:

HTTP/1.1 200 OK

DeleteOntologyVersionMetadata

Verb URI Description
DELETE /metadata/{ontologyIRI}/{versionIRI} Removes from the registry the metadata related to the ontology identified by a given ontology IRI and version IRI

Response codes:

  • HTTP/1.1 200 - If the metadata is succesfully removed from the registry
  • HTTP/1.1 404 - If there is no ontology in the registry identified by given ontology IRI and version IRI
  • HTTP/1.1 500 - If there are some unidentified error.

Request example:

DELETE /ontology-registry-service/webresources/ontology-registry/metadata/bridge.owl HTTP/1.1
Accept: application/xml
Host: localhost:8080

Response example:

HTTP/1.1 200 OK

UploadOntologyMetadata

Verb URI Description
POST /metadata/{ontologyIRI} Upload an metadata file to the repository. This file should be a RDF/XML serialization of a valid instance of OMV Ontology class.

Response codes:

  • HTTP/1.1 200 - If the metadata is succesfully stored at the registry
  • HTTP/1.1 500 - If there are some unidentified error.

Request example:

POST /ontology-registry-service/webresources/ontology-registry/metadata/bridge.owl?create=true HTTP/1.1
Content-Type: multipart/form-data; boundary=Boundary_30_4446747_1334759773635
Accept: application/xml
MIME-Version: 1.0
Host: localhost:8080
--Boundary_30_4446747_1334759773635
Content-Type: application/octet-stream
Content-Disposition: form-data; filename="bridge_metadata.owl"; modification-date="Mon, 28 Nov 2011 14:14:52 GMT"; size=8268; name="bridge_metadata.owl"
<?xml version="1.0" encoding="UTF-8"?>
<rdf:RDF
	xmlns="http://omv.ontoware.org/2005/05/ontology#"
	xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#"
	xmlns:owl="http://www.w3.org/2002/07/owl#"
	xmlns:xsd="http://www.w3.org/2001/XMLSchema#"
	xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
	xmlns:swrl="http://www.w3.org/2003/11/swrl#"
	xmlns:swrlx="http://www.w3.org/2003/11/swrlx#"
	xmlns:swrlb="http://www.w3.org/2003/11/swrlb#"
	xmlns:owl2="http://www.w3.org/2006/12/owl2#"
	xmlns:bridge="http://localhost:8080/ontology-registry-service/webresources/ontology-registry/ontologies/bridge.owl/3#"
	xmlns:geonames_pruned="http://localhost:8080/ontology-registry-service/webresources/ontology-registry/ontologies/geonames_pruned.owl/5#">

<rdf:Description rdf:about="http://eu.atosresearch.ontology-registry/instance">
	<rdf:type rdf:resource="http://www.w3.org/2002/07/owl#Ontology"/>
</rdf:Description>

<rdf:Description rdf:about="http://localhost:8080/ontology-registry-service/webresources/ontology-registry/ontologies/bridge.owl/3#metadata">
	<rdf:type rdf:resource="http://omv.ontoware.org/2005/05/ontology#Ontology"/>
	<rdf:type rdf:resource="http://www.w3.org/2002/07/owl#NamedIndividual"/>
	<usedOntologyEngineeringTool rdf:resource="http://omv.ontoware.org/2005/05/ontology#NeOn-Toolkit"/>
	<hasCreator rdf:resource="http://omv.ontoware.org/2005/05/ontology#individual1333110758440"/>
	<hasOntologyLanguage rdf:resource="http://omv.ontoware.org/2005/05/ontology#OWL"/>
</rdf:Description>

</rdf:RDF>

Response example:

HTTP/1.1 200 OK

UploadOntologyVersionMetadata

Verb URI Description
POST /metadata/{ontologyIRI}/{versionIRI} Upload an metadata file to the repository. The file should be an RDF/XML serialization containing an instance of OMV Ontology class. Uploaded file will be related to the ontology identified by given ontology IRI and version IRI

Response codes:

  • HTTP/1.1 200 - If the metadata is succesfully stored at the registry
  • HTTP/1.1 500 - If there are some unidentified error.

Request example:

POST /ontology-registry-service/webresources/ontology-registry/metadata/bridge.owl/3?create=true HTTP/1.1
Content-Type: multipart/form-data; boundary=Boundary_30_4446747_1334759773636
Accept: application/xml
MIME-Version: 1.0
Host: localhost:8080
--Boundary_30_4446747_1334759773636
Content-Type: application/octet-stream
Content-Disposition: form-data; filename="brdige_metadata.owl"; modification-date="Mon, 28 Nov 2011 14:14:52 GMT"; size=8268; name="brdige_metadata.owl"
<?xml version="1.0" encoding="UTF-8"?>
<rdf:RDF
	xmlns="http://omv.ontoware.org/2005/05/ontology#"
	xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#"
	xmlns:owl="http://www.w3.org/2002/07/owl#"
	xmlns:xsd="http://www.w3.org/2001/XMLSchema#"
	xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
	xmlns:swrl="http://www.w3.org/2003/11/swrl#"
	xmlns:swrlx="http://www.w3.org/2003/11/swrlx#"
	xmlns:swrlb="http://www.w3.org/2003/11/swrlb#"
	xmlns:owl2="http://www.w3.org/2006/12/owl2#"
	xmlns:bridge="http://localhost:8080/ontology-registry-service/webresources/ontology-registry/ontologies/bridge.owl/3#"
	xmlns:geonames_pruned="http://localhost:8080/ontology-registry-service/webresources/ontology-registry/ontologies/geonames_pruned.owl/5#">

<rdf:Description rdf:about="http://eu.atosresearch.ontology-registry/instance">
	<rdf:type rdf:resource="http://www.w3.org/2002/07/owl#Ontology"/>
</rdf:Description>

<rdf:Description rdf:about="http://localhost:8080/ontology-registry-service/webresources/ontology-registry/ontologies/bridge.owl/3#metadata">
	<rdf:type rdf:resource="http://omv.ontoware.org/2005/05/ontology#Ontology"/>
	<rdf:type rdf:resource="http://www.w3.org/2002/07/owl#NamedIndividual"/>
	<usedOntologyEngineeringTool rdf:resource="http://omv.ontoware.org/2005/05/ontology#NeOn-Toolkit"/>
	<hasCreator rdf:resource="http://omv.ontoware.org/2005/05/ontology#individual1333110758440"/>
	<hasOntologyLanguage rdf:resource="http://omv.ontoware.org/2005/05/ontology#OWL"/>
</rdf:Description>

</rdf:RDF>

Response example:

HTTP/1.1 200 OK

General Workspace Management API Information

Resources Summary

Representation Format

The Workspace Management API supports XML based representation formats.

Representation Transport

Resource representation is transmitted between client and server by using HTTP 1.1 protocol, as defined by IETF RFC-2616. Each time an HTTP request contains payload, a Content-Type header shall be used to specify the MIME type of wrapped representation. In addition, both client and server may use as many HTTP headers as they consider necessary.

Resource Identification

This section must explain which would be the resource identification used by the API in order to identify unambiguously the resource. For HTTP transport, this is made using the mechanisms described by HTTP protocol specification as defined by IETF RFC-2616.

Links and References

No additional links or references are provided in this version.

Limits

Limits section and operations will be provided in further FI-WARE releases.

Versions

Versions section and operations will be provided in further FI-WARE releases.

Extensions

Extensions section and operations will be provided (if needed) in further FI-WARE releases.

Faults

Faults section and operations will be provided (if needed) in further FI-WARE releases.

API Operations

The following section provides the detail for each RESTful operation giving the expected input and output for each URI.

Workspace Operations

ListWorkpsaces

Verb URI Description
GET /semantic-workspaces-service/rest/workspaces/mgm/list List all available workspaces.

Response codes:

  • HTTP/1.1 200 - If the list of workspace is succesfully provided
  • HTTP/1.1 500 - If there are some unidentified error.

Request example:

POST /semantic-workspaces-service/rest/workspaces/mgm/list HTTP/1.1
Host: localhost:8080
Accept: text/xml;q=0.9,*/*;q=0.8

Response example:

HTTP/1.1 200 OK
Content-Type: text/xml
<?xml version="1.0" encoding="UTF-8"?>
<response><workspaces><workspace><name>test</name><description>This is a test</description><type>eu.atosresearch.jsrc.sesame2610.Sesame2610Driver</type><endpoint>http://semanticas.lab.fi-ware.eu:8080/openrdf-sesame</endpoint></workspace><workspace><name>Test1</name><description>This is a test</description><type>eu.atosresearch.jsrc.sesame2610.Sesame2610Driver</type><endpoint>http://semanticas.lab.fi-ware.eu:8080/openrdf-sesame</endpoint></workspace><workspace><name>TestWorkspace</name><description>Workspace created to unit test the server</description><type>eu.atosresearch.jsrc.sesame2610.Sesame2610Driver</type><endpoint>http://semanticas.lab.fi-ware.eu:8080/openrdf-sesame</endpoint></workspace><workspace><name>TestWorkspaceDuplicate</name><description>Duplicate of the test workspace</description><type>eu.atosresearch.jsrc.sesame2610.Sesame2610Driver</type><endpoint>http://semanticas.lab.fi-ware.eu:8080/openrdf-sesame</endpoint></workspace></workspaces></response>

Create Workpsace

Verb URI Description
POST /semantic-workspaces-service/rest/workspaces/{WORKSPACE_NAME} Creates a new semantic workspace

Response codes:

  • HTTP/1.1 200 - If the workspace is succesfully created
  • HTTP/1.1 500 - If there are some unidentified error.

Request example:

POST /semantic-workspaces-service/rest/workspaces/test HTTP/1.1
Host: localhost:8080
Accept: application/xml;q=0.9,*/*;q=0.8

Response example:

HTTP/1.1 200 OK
Content-Type: application/xml

Remove Workpsace

Verb URI Description
DELETE /semantic-workspaces-service/rest/workspaces/{WORKSPACE_NAME} Remove an existing semantic workspace

Response codes:

  • HTTP/1.1 200 - If the worhspace was succesfully deleted
  • HTTP/1.1 500 - If there are some unidentified error.

Request example:

DELETE /semantic-workspaces-service/rest/workspaces/test HTTP/1.1
Host: localhost:8080
Accept: text/xml;q=0.9,*/*;q=0.8

Response example:

HTTP/1.1 200 OK
Content-Type: text/xml

Duplicate Workpsace

Verb URI Description
PUT /semantic-workspaces-service/rest/workspaces/{WORKSPACE_NAME}/duplicate Creates a duplicate of a existing workspace with his metadata (ontologies and triples)

Response codes:

  • HTTP/1.1 200 - If the workspace was succesfully duplpicated.
  • HTTP/1.1 500 - If there are some unidentified error.

Request example:

PUT /semantic-workspaces-service/rest/workspaces/test/duplicate HTTP/1.1
Host: localhost:8080
Accept: text/xml;q=0.9,*/*;q=0.8

Response example:

HTTP/1.1 200 OK
Content-Type: text/xml

Execute Query

Verb URI Description
POST /semantic-workspaces-service/rest/workspaces/{WORKSPACE_NAME}/sparql/ Execute a SPARQL query into a existing workspace

Response codes:

  • HTTP/1.1 200 - If the query was succesfully executed
  • HTTP/1.1 500 - If there are some unidentified error.

Request example:

POST /semantic-workspaces-service/rest/workspaces/test/sparql HTTP/1.1
Host: localhost:8080
Accept: text/xml;q=0.9,*/*;q=0.8
FormParam: query=SELECT%20DISTINCT%20*%20WHERE%20%7B%20%20%20%3Fs%20%3Fp%20%3Fo%20%7D%20%20LIMIT%201

Response example:

HTTP/1.1 200 OK
Content-Type: application/xml
<?xml version="1.0" encoding="UTF-8"?>
<sparql xmlns='http://www.w3.org/2005/sparql-results#'>
    <head>
        <variable name='s'/>
        <variable name='p'/>
        <variable name='o'/>
    </head>
    <results>
        <result>
            <binding name='s'>
                <uri>http://www.w3.org/1999/02/22-rdf-syntax-ns#type</uri>
            </binding>
            <binding name='p'>
                <uri>http://www.w3.org/1999/02/22-rdf-syntax-ns#type</uri>
            </binding>
            <binding name='o'>
                <uri>http://www.w3.org/1999/02/22-rdf-syntax-ns#Property</uri>
            </binding>
        </result>       
    </results>
</sparql>


Get Workspace

Verb URI Description
GET /semantic-workspaces-service/rest/workspaces/{WORKSPACE_NAME} Retrieves the RDF from a specific workspace

Response codes:

  • HTTP/1.1 200 - If the workspace was succesfully retrieved.
  • HTTP/1.1 500 - If there are some unidentified error.

Request example:

GET /semantic-workspaces-service/rest/workspaces/test HTTP/1.1
Host: localhost:8080
Accept: text/xml;q=0.9,*/*;q=0.8

Response example:

HTTP/1.1 200 OK
Content-Type: text/xml
<?xml version="1.0" encoding="UTF-8"?>
<rdf:RDF
    xmlns:gn="http://www.geonames.org/ontology#"
    xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#"
    xmlns:wgs84_pos="http://www.w3.org/2003/01/geo/wgs84_pos#"
    xmlns:foaf="http://xmlns.com/foaf/0.1/"
    xmlns:xsd="http://www.w3.org/2001/XMLSchema#"
    xmlns:owl="http://www.w3.org/2002/07/owl#"
    xmlns:www="http://www.geonames.org/"
    xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
    xmlns:ontology="http://www.geonames.org/ontology/"
    xmlns:skos="http://www.w3.org/2004/02/skos/core#"
    xmlns:dcterms="http://purl.org/dc/terms/">
</rdf:RDF>

Get ontologies updates

Verb URI Description
GET /semantic-workspaces-service/rest/workspaces/{WORKSPACE_NAME}/checkupdates Retrieves a list of available updates for the ontologies included in a workspace

Response codes:

  • HTTP/1.1 200 - If the list of available updates was succesfully retrieved.
  • HTTP/1.1 500 - If there are some unidentified error.

Request example:

GET /semantic-workspaces-service/rest/workspaces/test/checkupdates HTTP/1.1
Host: localhost:8080
Accept: text/xml;q=0.9,*/*;q=0.8

Response example:

HTTP/1.1 200 OK
Content-Type: application/xml
<?xml version="1.0" encoding="UTF-8"?>
<response><outofdate></outofdate></response>

Load Ontology

Verb URI Description
POST /semantic-workspaces-service/rest/workspaces/{WORKSPACE_NAME}/ontology/{ONTOLOGY_NAME} Load an ontology into a workspace from a specific ontology registry

Response codes:

  • HTTP/1.1 200 - If the ontology was succesfully loaded into workspace.
  • HTTP/1.1 500 - If there are some unidentified error.

Request example:

POST /semantic-workspaces-service/rest/workspaces/test/ontology/foaf.owl HTTP/1.1
Host: localhost:8080
Form-Param: version=303
Accept: application/xml;q=0.9,*/*;q=0.8

Response example:

HTTP/1.1 200 OK
Content-Type: application/xml
<?xml version="1.0" encoding="UTF-8"?>
<response><loaded>true</loaded></response>

List Ontologies

Verb URI Description
GET /semantic-workspaces-service/rest/workspaces/{WORKSPACE_NAME}/ontology/list Retrieves a list with the ontologies included in a workspace

Response codes:

  • HTTP/1.1 200 - If the ontologies list included in a workspaceworkspace was succesfully retrieved.
  • HTTP/1.1 500 - If there are some unidentified error.

Request example:

GET /semantic-workspaces-service/rest/workspaces/test/ontology/list HTTP/1.1
Host: localhost:8080
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8

Response example:

HTTP/1.1 200 OK
Content-Type: application/xml
<?xml version="1.0" encoding="UTF-8"?>
<response>
<ontologies>
<ontology><name>foaf.owl</name><version>303</version>
<context>http://semanticas.lab.fi-ware.eu/semantic-workspaces/foaf.owl</context>
</ontology>
</ontologies>
</response>

Update ontology

Verb URI Description
PUT /semantic-workspaces-service/rest/workspaces/[WORKSPACE_NAME]/ontology/{ONTOLOGY_NAME}/update Update an ontology included in a workspace using a specific ontology registry

Response codes:

  • HTTP/1.1 200 - If the ontology was succesfully updated in the workspace.
  • HTTP/1.1 500 - If there are some unidentified error.

Request example:

PUT /semantic-workspaces-service/rest/workspaces/test/ontology/foaf.owl/update HTTP/1.1
Host: localhost:8080
Form-Param: version=404
Accept: application/xml;q=0.9,*/*;q=0.8

Response example:

HTTP/1.1 200 OK
Content-Type: application/xml
<?xml version="1.0" encoding="UTF-8"?>
<response><updated>true</updated></response>

Delete Ontology

Verb URI Description
DELETE /semantic-workspaces-service/rest/workspaces/{WORKSPACE_NAME}/ontology/{ONTOLOGY_NAME} Delete an ontology from a workspace

Response codes:

  • HTTP/1.1 200 - If the ontoloy was succesfully deleted from workspace.
  • HTTP/1.1 500 - If there are some unidentified error.

Request example:

DELETE /semantic-workspaces-service/rest/workspaces/test/ontology/foaf.owl HTTP/1.1
Host: localhost:8080
Accept: application/xml;q=0.9,*/*;q=0.8

Response example:

HTTP/1.1 200 OK
Content-Type: application/xml
<?xml version="1.0" encoding="UTF-8"?>
<response><cleared>true</cleared></response>

Create Context with RDF

Verb URI Description
POST /semantic-workspaces-service/rest/workspaces/{WORKSPACE_NAME}/context/{CONTEXT_NAME} Create a context with RDF data into an existing workspace

Response codes:

  • HTTP/1.1 200 - If the context with RDF data was succesfully created.
  • HTTP/1.1 500 - If there are some unidentified error.

Request example:

POST /semantic-workspaces-service/rest/workspaces/test/context/testContext HTTP/1.1
Host: localhost:8080
Form-Param: rdf=<rdf:RDF    

xmlns:gn="http://www.geonames.org/ontology#" xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#" xmlns:wgs84_pos="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:foaf="http://xmlns.com/foaf/0.1/" xmlns:xsd="http://www.w3.org/2001/XMLSchema#" xmlns:owl="http://www.w3.org/2002/07/owl#" xmlns:www="http://www.geonames.org/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:ontology="http://www.geonames.org/ontology/" xmlns:skos="http://www.w3.org/2004/02/skos/core#" xmlns:dcterms="http://purl.org/dc/terms/"> <foaf:Person rdf:about="#danbri" xmlns:foaf="http://xmlns.com/foaf/0.1/"> <foaf:name>Dan Brickley</foaf:name><foaf:homepage rdf:resource="http://danbri.org/" /> <foaf:openid rdf:resource="http://danbri.org/" /> <foaf:img rdf:resource="/images/me.jpg" /></foaf:Person> </rdf:RDF>

Accept: application/xml;q=0.9,*/*;q=0.8

Response example: HTTP/1.1 200 OK

Content-Type: application/xml
<?xml version="1.0" encoding="UTF-8"?>
<response><loaded>true</loaded></response>

Load RDF into Context

Verb URI Description
PUT /semantic-workspaces-service/rest/workspaces/{WORKSPACE_NAME}/context/{CONTEXT_NAME} Load RDF data into a context of an existing workspace

Response codes:

  • HTTP/1.1 200 - If the RDF data was succesfully loaded into the context.
  • HTTP/1.1 500 - If there are some unidentified error.

Request example:

PUT /semantic-workspaces-service/rest/workspaces/test/context/testContext HTTP/1.1
Host: localhost:8080
Form-Param: rdf=<rdf:RDF     xmlns:gn="http://www.geonames.org/ontology#"     xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#"     xmlns:wgs84_pos="http://www.w3.org/2003/01/geo/wgs84_pos#"     xmlns:foaf="http://xmlns.com/foaf/0.1/"     xmlns:xsd="http://www.w3.org/2001/XMLSchema#"     xmlns:owl="http://www.w3.org/2002/07/owl#"     xmlns:www="http://www.geonames.org/"     xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"     xmlns:ontology="http://www.geonames.org/ontology/"     xmlns:skos="http://www.w3.org/2004/02/skos/core#"     xmlns:dcterms="http://purl.org/dc/terms/"> <foaf:Group>  <foaf:name>ILRT staff</foaf:name>  <foaf:member>   <foaf:Person>    <foaf:name>Martin Poulter</foaf:name>    <foaf:homepage rdf:resource="http://www.ilrt.bris.ac.uk/aboutus/staff/staffprofile/?search=plmlp"/>    <foaf:workplaceHomepage rdf:resource="http://www.ilrt.bris.ac.uk/"/>   </foaf:Person>  </foaf:member> </foaf:Group> </rdf:RDF>
Accept: application/xml;q=0.9,*/*;q=0.8

Response example: HTTP/1.1 200 OK

Content-Type: application/xml
<?xml version="1.0" encoding="UTF-8"?>
<response><loaded>true</loaded></response>

Delete Context

Verb URI Description
DELETE /semantic-workspaces-service/rest/workspaces/{WORKSPACE_NAME}/context/{CONTEXT_NAME} Removes a context of a specific workspace

Response codes:

  • HTTP/1.1 200 - If the context was succesfully deleted from the workspace.
  • HTTP/1.1 500 - If there are some unidentified error.

Request example:

DELETE /semantic-workspaces-service/rest/workspaces/test/context/testCentext HTTP/1.1
Host: localhost:8080
Accept: application/xml;q=0.9,*/*;q=0.8

Response example: HTTP/1.1 200 OK

Content-Type: application/xml
<?xml version="1.0" encoding="UTF-8"?>
<response><cleared>true</cleared></response>

List Contexts

Verb URI Description
GET /semantic-workspaces-service/rest/workspaces/{WORKSPACE_NAME}/context/list List the contexts included in a specific workspace

Response codes:

  • HTTP/1.1 200 - If the contexts list was succesfully retrieved from the workspace.
  • HTTP/1.1 500 - If there are some unidentified error.

Request example:

 GET /semantic-workspaces-service/rest/workspaces/test/context/list HTTP/1.1
Host: localhost:8080
Accept: application/xml;q=0.9,*/*;q=0.8

Response example:

HTTP/1.1 200 OK
Content-Type: application/xml
<?xml version="1.0" encoding="UTF-8"?>
<response><contexts><context>http://semanticas.lab.fi-ware.eu/semantic-workspaces/testContext</context></contexts></response>

Add Statement

Verb URI Description
POST /semantic-workspaces-service/rest/workspaces/{WORKSPACE_NAME}/context/{CONTEXT_NAME}/statement Add a statement (RDF triple) into a specific workspace

Response codes:

  • HTTP/1.1 200 - If the statemetn was succesfully added into the workspace.
  • HTTP/1.1 500 - If there are some unidentified error.

Request example:

POST /semantic-workspaces-service/rest/workspaces/{WORKSPACE_NAME}/context/{CONTEXT_NAME}/statement HTTP/1.1
Host: localhost:8080
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8

Response example:

HTTP/1.1 200 OK
Content-Type: application/xml

Remove Statement

Verb URI Description
DELETE /semantic-workspaces-service/rest/workspaces/{WORKSPACE_NAME}/context/{CONTEXT_NAME}/statement Remove a statement (RDF triple) from a specific workspace

Response codes:

  • HTTP/1.1 200 - If the statement was succesfully deleted from the workspace.
  • HTTP/1.1 500 - If there are some unidentified error.

Request example:

DELETE /semantic-workspaces-service/rest/workspaces/{WORKSPACE_NAME}/context/{CONTEXT_NAME}/statement HTTP/1.1
Host: localhost:8080
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8

Response example:

HTTP/1.1 200 OK
Content-Type: application/xml
Personal tools
Create a book