Skip to main content

Web Service Method: Add Relation Between Two Concepts

Abstract

Web Service Method: Add Relation Between Two Concepts

Description

Adds a SKOS relation between two concepts. This is the opposite functionality of Web Service Method: Remove Relation Between Two Concepts

URL: /PoolParty/api/thesaurus/{project}/addRelation

Note

This service is restricted to SKOS relations. If you want to create a custom relation between concepts, you may consider to use Web Service Method: Add a Custom Relation to a Resource

Request

Supported Methods

POST

Content-Type

application/x-www-form-urlencoded

Path Variables

Variable

Comment

{project}

The UUID or the URI supplement (textual identifier) of the project to be used.

HTTP Parameters

Parameter

Comment

Type

Required

sourceConcept

URI of the source Concept

String

true

targetConcept

URI of the target Concept

String

true

property

The relation type. E.g. you can choose a property like: skos:altLabel, skos:hiddenLabel, skos:definition, skos:broader

See full list of Retrieve Properties in API Requests.

String

true

Response

http status code: 200if OK.

Note

The service checks if operation is SKOS compatible. For example you can not add a relationship that causes circles in the hierarchy. In such cases a http status code 400 is returned, together with a message about the causes for the bad request error.

Example

POST Request

http://<server-url>/PoolParty/api/thesaurus/APItests/addRelation?sourceConcept=http://test.info/glossary/2614&targetConcept=http://test.info/glossary/1365&property=related