Skip to main content

Web Service Method: Suggest Multiple Concepts

Abstract

Web Service Method: Suggest Multiple Concepts

Description

This service allows to suggest multiple concepts in one request.

It returns the generated URIs of the created concepts that are accessible in the "Workflow Dashboard". Please see: Suggested Concepts Workflow

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

Note

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

Note

Using this service might be useful in case you want to prevent to use the request Web Service Method: Suggest Concept multiple times.

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

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

Attribute

Type

Required

Comment

conceptSuggestRequests

true

Envelope for an array of suggested concepts

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: Suggest Two Concepts at Once
POST https://preview.poolparty.biz/PoolParty/api/thesaurus/1DDFD8F0-F0B1-0001-254A-1A3047C67540/suggestConcepts
Content-Type: application/json

{
        "conceptSuggestRequests": [
                {
                        "prefLabels": [
                                {
                                        "label":"Hillary Clinton",
                                        "language":"en"
                                        
                                }
                        ],
                        "definition" : [
                        {
                                "label":"Democratic Party presidential candidate",
                                "language":"en"
                        }
                ]
                }, 
                {
                        "prefLabels": [
                                {
                                        "label":"Donald Trump",
                                        "language":"en"
                                }
                        ],
                        "definition" : [
                        {
                                "label":"Republican Party presidential candidate",
                                "language":"en"
                        }
                ]
                }
        ]
}

Example Response

 [
  {
    "uri": "https://preview.poolparty.biz/TestCooccurrences/167"
  },
  {
    "uri": "https://preview.poolparty.biz/TestCooccurrences/168"
  }
]
Usage of a REST Client

The following screenshot shows how two concepts are suggested, using Postman:

23901138.png