Skip to main content

Web Service Method: Export and Download Project Data

Abstract

Web Service Method: Export and Download Project Data

Description

Export and download data of a project in RDF format.

Note

This service is the equivalent to the PoolParty frontend functionality Export RDF Project Data

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

Content-Type

application/json

Request

Supported Methods

POST

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

format

The RDF format in which the returned data should be serialized.

You can use these RDF Serialization Formats as parameter value.

String

false

modules

The list of project modules that should be exported.

You can use these PoolParty Project Modules as parameter value.

Array of String

true

Note

To learn more about the syntax to request a list of modules in a single request, please see: Using a List of Request Parameters

prettyPrint

Pretty prints the exported data

boolean

true

properties

List of properties to exclude from export

Array of String

false

Note

Export of multiple modules only works when you use serialization formats that support named graphs. See comments in the section on RDF Serialization Formats.

If you try to export multiple modules in a single request using a serialization format that does not support graphs, you will get the following error response:

{
 "errorMessage": "Serialization formats that do not support named graphs can only export exactly one module",
 "status": 400
}

Response

Selected project data in RDF format.

Example

Example Request

curl --location --request POST 'https://<server>/PoolParty/api/projects/<project>/export'
--header 'Content-Type: application/json'
--data-raw '{
  "prettyPrint" : false,
  "modules" : [ "concepts" ],
  "format": "trig"
}'

Example Response

@prefix csw: <http://semantic-web.at/ontologies/csw.owl#> .
@prefix dbpedia: <http://dbpedia.org/resource/> .
@prefix freebase: <http://rdf.freebase.com/ns/> .
@prefix opencyc: <http://sw.opencyc.org/concept/> .
@prefix cyc: <http://sw.cyc.com/concept/> .
@prefix ctag: <http://commontag.org/ns#> .

<http://vocabulary.semantic-web.at/cocktails/thesaurus> {<http://vocabulary.semantic-web.at/cocktails/2ea18d11-7415-4282-9608-7a3f497a0928> skos:related <http://vocabulary.semantic-web.at/cocktails/b0885ae3-68e1-453d-8669-119e8464ff5f> .
...