Skip to main content

Web Service Method: Suggest Concept

Abstract

Web Service Method: Suggest Concept

Description

This service provides a way to suggest a new concept.

Note

This method returns the generated URI of the created concept that appears under "Suggested Concepts" in the targeted project in tab "Workflow Dashboard". For details refer to: Suggested Concepts Workflow

If you want to create a narrower concept directly, without using the Suggested Concepts List, you may consider to use the Web Service Method: Create New Concept.

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

Note

You have to provide a prefLabel in the default language. You can only suggest labels in languages that are defined as project language.

Request

Supported Methods

POST

Content-Type: application/json

Path Variables

Variable

Comment

{project}

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

JSON Request Object

Request object to suggest a new concept.

Attribute

Type

Required

Comment

prefLabels

Array of LanguageLiterals

true

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 of label (String) and language (String)

note

String

false

Notes describing the suggested concept.

score

float

false

Custom score for the new concept between 0 and 1.

suffix

String

false

Optional parameter that lets the client define the URI suffix in case the project has a Manual ID generation pattern.

Response

HTTP status code 200 if OK + the URL of the suggested concept.

ExamplesUse Case I: Suggest Concept with a Concept as Parent - broaderConcept Used
POST <server-url>/PoolParty/api/thesaurus/{project}/suggestConcept
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
POST <server-url>/PoolParty/api/thesaurus/{project}/suggestConcept
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"
    }
    ]
}
Usage of a REST Client

The following screenshot shows the usage of the suggest concept service with the Advanced REST Client:

23901132.png

The following screenshot shows the usage of the import service using Postman:

23901133.png