Create corpus
Add a private user corpus.
URL : /blacklab-server
Method : POST
(will fail if you are not logged in or not authorized)
Parameters
| Parameter | Description |
|---|---|
name | name for the new corpus. Must start with the user id, followed by a :, followed by a short index name (which must consist of letters, digits, underscore _, dash - or period .). Will become part of the URL. Example: (e.g. jan.niestadt@ivdnt.org:my-fun-corpus) |
display | display name for the new corpus (e.g. My fun corpus!) |
format | default input format name for the new corpus (e.g. tei-p5). Must refer to an available input format. |
Success Response
HTTP response code: 201 Created
Content example
json
{
code: "SUCCESS",
message: "Index created succesfully."
}Error Response
HTTP response code: 403 Forbidden
Content example
json
{
code: "FORBIDDEN_REQUEST",
message: "You can only create indices in your own private area."
}Notes
The URL for the new corpus will be /blacklab-server/userid:name/, so e.g. /blacklab-server/jan.niestadt@ivdnt.org:my-fun-corpus/.
To add documents, POST to /blacklab-server/userid:name/docs/. See here.
TODO
- The response should probably return the URL for the new corpus.