Skip to main content

Web Service Method: Import Project Data

Abstract

Web Service Method: Import Project Data

Description

Import RDF into the PoolParty project. The format of the RDF data has to be denoted in the Content-Type header.

Note

This service is an equivalent to the user interface functionality Importing a Project or Concept Scheme in RDF Format. Find more information here: Prerequisites for Importing non-PoolParty SKOS Thesauri.

Imports that are performed with this method are not reflected in the PoolParty History or in the Approval Workflow. Therefore consider alternatives, as for example more fine granular services like Web Service Method: Add Literal to a Concept or Concept Scheme, Web Service Method: Add Relation Between Two Concepts, Web Service Method: Update Literal of a Concept or Concept Scheme, etc.

URL: /PoolParty/api/projects/{project}/import

Request

Supported Methods

POST

Content-Type

Select the format of the RDF data that is sent via call, for example text/turtle

Note

Find a list of content-type headers for all supported serialization formats here: RDF Serialization Formats

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

overwrite

Project data is cleared before import. At the end, project data will be fully replaced by the imported data set.

Note

Default value is false

Warning

Choosing overwrite=true can lead to invalid or incomplete data and even to loss of data and should be used with caution.

See also: Importing a Project or Concept Scheme in RDF Format

boolean

false

content-type

Content Types (has to be provided in the Content-Type header):

  • TriG: application/trig, application/x-trig

  • TriX: application/trix

  • N3: text/n3, text/rdf+n3

  • Turtle: text/turtle, application/x-turtle

  • N-Triples: application/n-triples, text/plain

  • RDF/XML: application/rdf+xml, application/xml

  • BinaryRDF: application/x-binary-rdf

  • N-Quads: application/n-quads, text/x-nquads, text/nquads

  • JSON-LD: application/ld+json

  • RDF/JSON: application/rdf+json

String

false

importModule

This parameter is only required if you import a non-context supporting format.

You can use these PoolParty Project Modules as parameter value.

String

false

Request Object

  • RDF data to be imported. A file or rdf raw text can be used for upload.

Response

Returns status 200 when import was performed successfully.

Example

Usage of a REST Client

The following screenshots show the usage of the import service using Postman:

1) Usage of header: Content-Type text/turtle

23901057.png

2) Selection of file:

23901056.png

or, as alternative use the option to import RDF statements as raw:

23901058.png