Web Service Method: Update a Suggested Concept
Web Service Method: Update a Suggested Concept
Description |
---|
Updates an existing suggested concept. |
Note
This service is equivalent to the list of the Suggested Concepts in the Workflow Dashboard tab in PoolParty frontend. For details refer to:Suggested Concepts Workflow
URL: /PoolParty/api/thesaurus/{project}/suggestedConcept?uri={uri}
Supported Methods |
---|
PATCH |
Content-Type: application/json
Parameter | Type | Required | Description |
---|---|---|---|
{project} | String | true | The UUID or the URI supplement (textual identifier) of the project to be used. |
| String | true | URI of the concept to be updated. If no concept with given URI exists, an error will be thrown. |
Request object to suggest a new concept.
Attribute | Type | Required | Comment |
prefLabels | Array of LanguageLiterals | false | Object consisting of label (String) and language (String). |
checkForDuplicates | boolean | false | If another concept with the same preferred label already exists, an error will be thrown. (Default: true). |
broaderConcept | Array of URIs | false | Parent concept of the suggested concept. |
topConceptOf | Array of URIs | false | Parent concept scheme of the suggested concept. This means, the suggested concept will become a top concept. |
relatedConcept | Array of URIs | false | Related concepts of the suggested concept. |
definition | Array of LanguageLiterals | false | Object consisting oflabel(String) andlanguage(String) |
note | String | false | Notes describing the suggested concept. |
score | float | false | Custom score for the new concept between0and1. |
suffix | String | false | Optional parameter that lets the client define the URI suffix in case the project has aManual ID generation pattern. |
HTTP status code 204 if OK.
PATCH <server-url>/PoolParty/api/thesaurus/{project}/suggestedConcept Content-Type: application/json { "prefLabels": [ { "label":"Headache", "language":"en" } ], "broaderConcept": [ { "uri":"http://id.nlm.nih.gov/mesh/D006257" } ], "checkForDuplicates" : true, "note" : "Suggested by florian", "definition" : [ { "label":"Pain in the head.", "language":"en" } ] }
Use Case II: Suggest Concept with a Concept Scheme as Parent - topConceptOf Used
PATCH <server-url>/PoolParty/api/thesaurus/{project}/suggestedConcept Content-Type: application/json { "prefLabels": [ { "label":"Asia", "language":"en" } ], "topConceptOf": [ { "uri":"http://vocabulary.poolparty.biz/geo/0" } ], "note" : "Asia as new top concept of our geo project.", "definition" : [ { "label":"Continent", "language":"en" } ] }
The following screenshot shows the usage of the update service using Postman: