Skip to main content

Web Service Method: Upload Text to a Corpus

Abstract

Web Service Method: Upload Text to a Corpus

Description

Add text content 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

text

Text content to be added

String

true

title

Title of the textual content

String

true

corpusId

The corpus to add the text to.

Note

The provided value has to start with 'corpus:'. The id alone is not sufficient.

Example for the 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 200 if OK

Example

POST Request

http://<server-URL>/PoolParty/api/corpusmanagement/1DCE489D-9695-0001-E272-285217B0181E/add?corpusId=corpus%3Ae62d3b7e-ce07-48c0-b2c3-696a159227e2&filename=This is more a title than a filename&text=Content of this text come here.