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 finer 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.

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

On import, replaces all data in the target graph with the contents of the imported RDF file.

boolean

false

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

defaultGraph

Target graph to use for imported statements, mandatory for context free formats (for instance Turtle or RDF). The given graph will be assigned to all statements as context.

string

false

You can use the names of the PoolParty Project Modules as a parameter value.

modules

A list of project modules to be imported.

string

false

You can use these PoolParty Project Modules as a parameter value.

Request Object

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

Response

Content-Type: application/json

Table 2. Response Schema

Attribute

Type

Required

Comment

message

string

false

short descriptive message of the operation result, or an error description

result

object

false

the actual response content body defined by the resultType.

resultType

string

false

MIME type of the result if successful or Exception type if an error occurred

status

int

true

indicates the success or error of the HTTP request on the protocol layer

Returns status 200 when import was performed successfully.

success

boolean

false

true if the operation was successful on the application layer



Example response:

{
  "result" : { },
  "success" : false,
  "message" : "some message",
  "resultType" : "some resultType",
  "status" : 13385
}