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...")
 
 
(5 intermediate revisions by one user not shown)
Line 1: Line 1:
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
+
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. SameAs API's endpoint is
  
 
  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 either '''topic''' or '''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
  
 
  [
 
  [
Line 18: Line 22:
 
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.
 
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 [http://sameas.org 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.
+
The response format is compatible with the JSON format of [http://sameas.org sameas.org]. Thus, applications using the JSON endpoint of [http://sameas.org sameas.org] should be compatible with Wandora's SameAs service. Specifically, Wandora's [[Sameas subject expander]] can be used with the SameAs service too.

Latest revision as of 12:45, 20 December 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. SameAs API's endpoint is

http://127.0.0.1:8898/sameas

The service accepts either topic or 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 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 Sameas subject expander can be used with the SameAs service too.

Personal tools