Stanbol Home

The RESTful Semantic Engine

Entityhub LDPath

Subresource /ldpath (/ldpath?ldpath={ldpath}&context={context})

Description This service can be used to execute an LDPath program on one or more Entities (contexts). Both a POST and a GET version are available.
Request
  • GET /entityhub/ldpath?ldpath=ldpath&context={context1}[&context={contextn}]
  • POST -d "ldpath=ldpath&context={context1}[&context={contextn}]" /entityhub/ldpath
Parameter
  • ldpath: The LDPath program to execute.
  • context: The id of the entity used as context for the execution of the LDPath program. This parameter can occur multiple times
Produces: Produces an RDF Graph with the parsed context(s) as subject the field selected by the LDPath program as properties and the selected values as object. All RDF serialisations are supported however JSON-LD seams to be a natural fit for the data created by LDPath. JSON-LD is also the default encoding.

Example

The following LDPath statement will be executed on the defined contexts

curl -X POST -d "context=http://dbpedia.org/resource/Paris&ldpath=name%20%3D%20rdfs%3Alabel%5B%40en%5D%3B" http://demo2.fogbeam.org:8080/entityhub/ldpath

NOTE: the LDPath MUST BE URLEncoded. The decoded string of the above example is "name = rdfs:label[@en];" and would select the english label of Paris in the field "name".

Test

Execute the LDPath on the Context:

Context:
LD-Path:

Format: (Accept header set to the request)