We are happy to announce the first official release of the PoolParty SKOS API. This API can be installed in addition to a PoolParty Thesaurus Server 3.2 and offers an easy way to programmatically access data of a SKOS thesaurus via RESTful services. The SKOS API can be used without any knowledge about SPARQL .
This first release of the API offers web services to access thesaurus projects, concept schemes, concepts and SPARQL lists. In addition to basic SKOS querying, the API also supports the import of RDF data, SPARQL update and a service to push candidate terms into a thesaurus project triggered by any kind of application (like a CMS or a wiki).
The documentation of the PPT API is part of the Thesaurus Server documentation and publicly available. PoolParty customers can download the PPT API for free in the customer download area. The following example shows how to access data of a SKOS thesaurus project via the API (Note: The API is password protected so the requests work but won’t be executable without the respective credentials).
With “http://prod.poolparty.biz/api/projects” you get all projects available on the server e.g.
[ { "id": "6164ae08-5557-46e6-97c1-256cf59ac7f3", "description": null, "subject": "Traditions, songs, food typical for Christmas", "title": "Christmas", "uri": "http://vocabulary.semantic-web.at/xmas", "availableLanguages": [ "en" ], "defaultLanguage": "en" }, ... { "id": "f281abfd-f967-4ac8-b687-47185deb6190", "description": "Concepts in the semantic web and social web domain.", "subject": "places, persons, principles, products, projects, specifiations, resources", "title": "Social Semantic Web Thesaurus", "uri": "http://vocabulary.semantic-web.at/semweb", "availableLanguages": [ "de", "en" ], "defaultLanguage": "en" } ]
As you can see, a list of all projects and related information will be returned. One of the projects stored on the server is the Social Semantic Web Thesaurus which has the following ID: f281abfd-f967-4ac8-b687-47185deb6190
As a next step, we want to get all concept schemes of this project. The request “http://prod.poolparty.biz/api/thesaurus/f281abfd-f967-4ac8-b687-47185deb6190/schemes” provides exactly this information e.g.
[ { "title": "Places", "uri": "http://vocabulary.semantic-web.at/semweb/1" }, { "title": "Persons", "uri": "http://vocabulary.semantic-web.at/semweb/3" }, { "title": "Organisations", "uri": "http://vocabulary.semantic-web.at/semweb/2" }, { "title": "Products", "uri": "http://vocabulary.semantic-web.at/semweb/4" }, { "title": "Information Sources", "uri": "http://vocabulary.semantic-web.at/semweb/5" }, { "title": "Specifications", "uri": "http://vocabulary.semantic-web.at/semweb/6" }, { "title": "Principles", "uri": "http://vocabulary.semantic-web.at/semweb/7" }, { "title": "Data resources", "uri": "http://vocabulary.semantic-web.at/semweb/8" }, { "title": "Projects", "uri": "http://vocabulary.semantic-web.at/semweb/239" } ]
Now we will get top concepts for one of those concept schemes.
The following request provides all top concepts for the concept scheme “Organisations”: “http://prod.poolparty.biz/api/thesaurus/f281abfd-f967-4ac8-b687-47185deb6190/topconcepts?scheme=http://vocabulary.semantic-web.at/semweb/2”
[ { "prefLabel": "Educational institutions", "uri": "http://vocabulary.semantic-web.at/semweb/56", "altLabels": [ ], "hiddenLabels": [ ], "definition": null }, { "prefLabel": "Scientific institutions", "uri": "http://vocabulary.semantic-web.at/semweb/42", "altLabels": [ ], "hiddenLabels": [ ], "definition": null }, { "prefLabel": "Other organisations", "uri": "http://vocabulary.semantic-web.at/semweb/10", "altLabels": [ ], "hiddenLabels": [ ], "definition": null }, { "prefLabel": "Companies", "uri": "http://vocabulary.semantic-web.at/semweb/134", "altLabels": [ ], "hiddenLabels": [ ], "definition": null } ]
Now we could go to the next level and get narrower concepts, their labels, relations and definitions etc. As you can see it is quite easy to make queries over a SKOS thesaurus via the API without the need for using SPARQL. The result format is JSON. This makes it easy for many web developers to access the data and to use it to improve applications like search, autocomplete, concept based tagging etc.