SameAs service module

From WandoraWiki
(Difference between revisions)
Jump to: navigation, search
(Created page with "SameAs service is part of Wandora's embedded server. It is basically an API that returns all subject identifiers of a given topic. The topic is regocnized with a single subjec...")
 
Line 3: Line 3:
 
  http://127.0.0.1:8898/sameas
 
  http://127.0.0.1:8898/sameas
  
The service accepts '''uri''' parameter. The parameter should contain subject identifier URI of addressed topic. The response is a JSON data structure similar to
+
The service accepts '''uri''' parameter. The parameter should contain subject identifier URI of addressed topic, for example
 +
 
 +
http://127.0.0.1:8898/sameas/?uri=http://www.wandora.org/core/wandoraclass
 +
 
 +
The response is a JSON data structure similar to
  
 
  [
 
  [

Revision as of 19:41, 19 August 2014

SameAs service is part of Wandora's embedded server. It is basically an API that returns all subject identifiers of a given topic. The topic is regocnized with a single subject identifier URI. Thus, the service returns all subject URIs that reify the same topic as the given one. SameAs API's endpoint is

http://127.0.0.1:8898/sameas

The service accepts uri parameter. The parameter should contain subject identifier URI of addressed topic, for example

http://127.0.0.1:8898/sameas/?uri=http://www.wandora.org/core/wandoraclass

The response is a JSON data structure similar to

[
  {  
    "uri": "http:\/\/www.wandora.org\/core\/wandoraclass",
    "numDuplicates": "2",
    "duplicates": [
      "http:\/\/www.wandora.org\/core\/wandoraclass",
      "http:\/\/wandora.org\/si\/core\/wandora-class"
    ]
  }
]

where the uri value is requested subject identifier URI and duplicates an array of subject URI of addressed topic. Notice, the requested subject URI is enclosed in duplicates also. Value of numDuplicates contains the number of duplicates.

The response JSON format is compatible with the JSON format of sameas.org. Thus, applications using the JSON endpoint of sameas.org should be compatible with Wandora's SameAs service. Specifically, Wandora's Subject expander can be used to expand subjects with SameAs services hosted in third party Wandoras.

Personal tools