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

VariableComment
{project}The UUID or the URI supplement (textual identifier) of the project to be used.

HTTP Parameters


ParameterCommentTypeRequired
file

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

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


MultipartFiletrue
filenameFilenameStringtrue
corpusId

The corpus to add a file to.

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

Stringtrue
checkLanguageChecks if the language of the uploaded file and the language of the corpus are the same. Default true.booleanfalse

Response

http status code 200 if OK.

JSON formatted response:

AttributeType
successboolean
messageString

Example

Screenshot of an example request, done with Postman: