Skip to main content

Web Service Method: Request Document Data of a Corpus

Abstract

Web Service Method: Request Document Data of a Corpus

Description

Returns document data of the selected corpus.

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

Request

Supported Methods

GET

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

corpusId

The corpus that contains requested documents.

Note

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

An example for corpusID value could be corpus:a7b55be0-17c6-44b6-807c-064c6734f03e

String

true

fromTime

Start of the requested time frame (dd.MM.yyyy). Document creation date is used as timestamp.

String

false

toTime

End of the requested time frame (dd.MM.yyyy). Documentcreation date is used as timestamp.

String

false

Response

Returns

Array of corpora (JSON) in requested PoolParty project.

Attribute

Type

Comment

fileName

String

Name of the file

documentId

String

Id of the document

title

String

Title of the document

creationDate

Date

Date when document was created

Example

Example Request

http://<server-url>/PoolParty/api/corpusmanagement/1DCE489D-9695-0001-E272-285217B0181E/documents?corpusId=corpus:e62d3b7e-ce07-48c0-b2c3-696a159227e2&fromTime=01.01.2010&toTime=30.12.2015

Example Response

[
    {
        "message": "Getting documents for corpus was successful.",
        "success": true,
        "fileName": "Launchy_Readme.pdf",
        "documentId": "corpusDocument:9a494f23-aafd-4c47-839d-81ba0694370c",
        "title": "Launchy 0",
        "creationDate": "Sat Apr 03 19:28:55 CEST 2010"
    },
    {
        "message": "Getting documents for corpus was successful.",
        "success": true,
        "fileName": "publishable_en.pdf",
        "documentId": "corpusDocument:f1ab631f-2548-4cc7-b66e-d5fbf431710d",
        "title": "The Moscow Treaty (12 August 1970)",
        "creationDate": "Fri Jul 03 06:56:37 CEST 2015"
    }
]