Web Service Method: Request Paths Between Concept and Concept Schemes
Web Service Method: Request Paths Between Concept and Concept Schemes
Description |
---|
Returns a list of all existing paths between the requested concept and all concept schemes it is located in. |
URL: /PoolParty/api/thesaurus/{project}/paths
This service can be used to provide hierarchical breadcrumb functionality, which is often used as navigation element: https://en.wikipedia.org/wiki/Breadcrumb_(navigation)
The list always starts with a Concept Scheme, with the title as preferred label. Multiple paths can emerge when a polyhierarchy exists.
Note
This request is the opposite of the Web Service Method: Request Subtree of Concept or Concept Scheme where you use for example a concept scheme to retrieve all the concepts it contains.
Supported Methods |
---|
GET |
Variable | Comment |
---|---|
| The UUID or the URI supplement (textual identifier) of the project to be used. |
Parameter | Comment | Type | Required |
---|---|---|---|
concept | URI of the concept | String | true |
properties | List of concept properties that should be fetched. E.g. you can choose a list like: See full list of Retrieve Properties in API Requests. | String | false |
language | Only labels and titles in selected language will be displayed. | String | false |
defaultLanguageAsFallback | If nolanguageis given, the defaultlanguageof the project will be used. The default value is | boolean | false |
workflowStatus | Include workflow status information. The default value is | boolean | false |
List of arrays, containing concept schemes and concepts describing all existing paths between the requested concept and all concept schemes, the concept is related to.
Attribute | Type | Comment |
---|---|---|
conceptScheme | object | Contains information (uri, title, authors, etc.) of the specific concept scheme. |
conceptPath | array | Contains an array, including concept information |
Request Pattern
https://<server-url>/PoolParty/api/thesaurus/<project>/paths?concept=<concept-uri>
Example Request
https://preview.poolparty.biz/PoolParty/api/thesaurus/1DDFC7E2-57E2-0001-DDA1-3FDB1F601B9D/paths?concept=http://e-learning.poolparty.biz/cocktails/21b94d69-280e-4546-be1a-fdd1d9aa5d32&properties=skos:definition
Example Response
[ { "conceptScheme": { "uri": "http://e-learning.poolparty.biz/cocktails/8d052dfc-44bf-4985-8ce3-4564570a161b", "title": "Cocktails", "authors": [ "https://preview.poolparty.biz/user/Andreas-Blumauer" ], "publishers": [ "https://preview.poolparty.biz/user/Semantic-Web-Company" ], "contributors": [ "https://preview.poolparty.biz/user/turdeant" ], "properties": { "http://www.w3.org/2004/02/skos/core#definition": [] } }, "conceptPath": [ { "uri": "http://e-learning.poolparty.biz/cocktailsII/9d1e9f22-a47a-434f-8889-117bb2fe8883", "prefLabel": "Trio cocktails" }, { "uri": "http://e-learning.poolparty.biz/cocktails/21b94d69-280e-4546-be1a-fdd1d9aa5d32", "prefLabel": "Alexander", "definitions": [ "The Alexander is a gin cocktail consisting of gin, Chocolate Liqueur, and Cream." ] } ] }, { "conceptScheme": { "uri": "http://e-learning.poolparty.biz/cocktails/8d052dfc-44bf-4985-8ce3-4564570a161b", "title": "Cocktails", "authors": [ "https://preview.poolparty.biz/user/Andreas-Blumauer" ], "publishers": [ "https://preview.poolparty.biz/user/Semantic-Web-Company" ], "contributors": [ "https://preview.poolparty.biz/user/turdeant" ], "properties": { "http://www.w3.org/2004/02/skos/core#definition": [] } }, "conceptPath": [ { "uri": "http://e-learning.poolparty.biz/cocktails/5ac37bec-e4b9-4d43-9bcc-8d6954903c25", "prefLabel": "IBA official cocktails", "definitions": [ "An IBA Official Cocktail is one of many cocktails selected by the International Bartenders Association for use in the annual World Cocktail Competition (WCC) in bartending. As such, these mixed drinks are some of the most notable and frequently-made cocktails by professional bartenders around the world. IBA Cocktails are specified in centilitres (cl) rather than the more commonly used millilitres (ml). 3 cl are approximately equivalent to 1 U.S. fluid ounce (1.4% more)." ] }, { "uri": "http://e-learning.poolparty.biz/cocktails/caae2ea0-7e60-400b-a2bb-14ef79720668", "prefLabel": "The Unforgettables" }, { "uri": "http://e-learning.poolparty.biz/cocktails/21b94d69-280e-4546-be1a-fdd1d9aa5d32", "prefLabel": "Alexander", "definitions": [ "The Alexander is a gin cocktail consisting of gin, Chocolate Liqueur, and Cream." ] } ] } ]