Web Service Method: Upload a Document to a Corpus

Description

Adds a document to a corpus.

URL: /PoolParty/api/corpusmanagement/{project}/add

Request

Supported Methods

POST

Content-Type

multipart/form data

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

file

[file] File to be added (word, excel, powerpoint, pdf, open document)

Note

PoolParty technically allows for you to import .zip files, yet textual content will not be extracted at this point in time.

MultipartFile

true

filename

Filename

String

true

corpusId

The corpus to add a file to.

Note

Please note that the provided value should start with 'corpus:'. The ID alone is not sufficient.

Example for a valid corpusId value:

corpus:a7b55be0-17c6-44b6-807c-064c6734f03e

String

true

checkLanguage

Checks if the language of the uploaded file and the language of the corpus are the same. Default true.

boolean

false

Response

http status code 200if OK.

JSON formatted response:

Attribute

Type

success

boolean

message

String

Example

Screenshot of an example request, done with Postman:

23901191.png