Skip to main content

Web Service Method: Apply a Custom Type to a Resource

Abstract

Web Service Method: Apply a Custom Type to a Resource

Description

Applies a custom type to a resource.

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

Note

The resource that can receive a custom type can be a concept scheme, a concept or a collection.

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

resource

The resource that the type should be applied to

String

true

type

URI of the custom type

String

true

propagate

Defines, if the type should be applied transitively to all narrower Concepts. This flag is ignored if the resource URI is not a Concept.

Boolean

false

Response

http status code: 200if OK.

Note

The service checks if operation is compatible with defined custom types. For example you can not apply a custom type to a resource that is not defined in the custom scheme of the respective project. In such cases an 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/applyType?resource=http://test.info/glossary/2614&type=http://vocabulary.poolparty.biz/PoolParty/schema/Geonames/Continent