Skip to content

Documents ​

A document is an ordered sequence of pages, each backed by one image and carrying its transcription and layout. Documents live in a collection and are addressed by collId and docId; pages by their number, starting at 1.

Authentication is the same as for every other API: a Transkribus account and a Bearer token, see Authentication.

Read a document ​

The full document lists its pages with image URLs and the current transcript of each.

GET /collections/{collId}/{id}/fulldoc ​

GEThttps://transkribus.eu/TrpServer/rest/collections/{collId}/{id}/fulldoc

Parameters​

Path Parameters

collId*
Type
integer
Required
Format
"int32"
id*
Type
integer
Required
Format
"int32"

Query Parameters

nrOfTranscripts
Type
integer
Format
"int32"
Default
-1
status
Type
string
stats
Type
boolean
Default
true

Responses​

default response

Try it out

Playground​

Authorization
Variables
Key
Value

Samples​

Read a page's text ​

Every page keeps a history of transcript versions; curr is the current one, text returns it as plain text.

GET /collections/{collId}/{id}/{page}/curr ​

GEThttps://transkribus.eu/TrpServer/rest/collections/{collId}/{id}/{page}/curr

Parameters​

Path Parameters

collId*
Type
integer
Required
Format
"int32"
id*
Type
integer
Required
Format
"int32"
page*
Type
integer
Required
Format
"int32"

Responses​

default response

application/json
Try it out

Playground​

Authorization
Variables
Key
Value

Samples​

GET /collections/{collId}/{id}/{page}/text ​

GEThttps://transkribus.eu/TrpServer/rest/collections/{collId}/{id}/{page}/text

Parameters​

Path Parameters

collId*
Type
integer
Required
Format
"int32"
id*
Type
integer
Required
Format
"int32"
page*
Type
integer
Required
Format
"int32"

Responses​

default response

application/xml
Try it out

Playground​

Authorization
Variables
Key
Value

Samples​

Upload ​

An upload is announced first and filled page by page: create the upload with the document's metadata and the list of page images, send each image, then poll the upload until every page is in. JPEG, PNG and PDF are accepted. Documents already hosted elsewhere come in from a IIIF manifest.

Create an upload from a document structure ​

POSThttps://transkribus.eu/TrpServer/rest/uploads

Announces a new document: its metadata and the list of page images that will follow. Returns the upload with its uploadId; then send each image with PUT /uploads/{uploadId} and poll GET /uploads/{uploadId} until every page is uploaded.

Parameters​

Query Parameters

collId
Type
integer
Format
"int32"

Request Body​

application/json
Format"int32"

This is the parameter class for starting a recognition job (TrHtr or PyLaia), it contains all possible parameters for both engines. Depending on which engine is used, some parameters will be ignored. The comment{$fieldName}-Fields are just there to provide some documentation and to be able to determine if that field is used by the decoding Type (so far TrHtr and PyLaia) .

Responses​

default response

Try it out

Playground​

Authorization
Variables
Key
Value
Body

Samples​

PUT /uploads/{uploadId} ​

PUThttps://transkribus.eu/TrpServer/rest/uploads/{uploadId}

Parameters​

Path Parameters

uploadId*
Type
integer
Required
Format
"int32"

Request Body​

multipart/form-data

Responses​

default response

*/*
Try it out

Playground​

Authorization
Variables
Key
Value
Body

Samples​

GET /uploads/{uploadId} ​

GEThttps://transkribus.eu/TrpServer/rest/uploads/{uploadId}

Parameters​

Path Parameters

uploadId*
Type
integer
Required
Format
"int32"

Responses​

default response

Try it out

Playground​

Authorization
Variables
Key
Value

Samples​

POST /collections/{collId}/createDocFromIiifUrl ​

POSThttps://transkribus.eu/TrpServer/rest/collections/{collId}/createDocFromIiifUrl

Parameters​

Path Parameters

collId*
Type
integer
Required
Format
"int32"

Query Parameters

fileName
Type
string
canvasFilenameReference
Type
string

Responses​

default response

*/*
Try it out

Playground​

Authorization
Variables
Key
Value

Samples​

Export ​

Export produces a downloadable artifact from a document. The format is a parameter, not a separate job type: PAGE XML, ALTO, plain text, DOCX, PDF and others are the same export with a different value. Export runs as a job; follow it with the Jobs operations and fetch the result when it is finished.

POST /collections/{collId}/{id}/export ​

POSThttps://transkribus.eu/TrpServer/rest/collections/{collId}/{id}/export

Parameters​

Path Parameters

collId*
Type
integer
Required
Format
"int32"
id*
Type
integer
Required
Format
"int32"

Query Parameters

pages
Type
string
doWriteMets
Type
boolean
Default
true
doWriteImages
Type
boolean
Default
true
doExportPageXml
Type
boolean
Default
true
doExportAltoXml
Type
boolean
Default
true
splitIntoWordsInAltoXml
Type
boolean
Default
true
doWritePdf
Type
boolean
Default
false
doWriteTei
Type
boolean
Default
false
doWriteDocx
Type
boolean
Default
false
doWriteTagsXlsx
Type
boolean
Default
false
doWriteTablesXlsx
Type
boolean
Default
false
doPdfImagesOnly
Type
boolean
Default
false
doPdfImagesPlusText
Type
boolean
Default
true
doPdfWithTextPages
Type
boolean
Default
false
doPdfWithTags
Type
boolean
Default
false
doTeiWithNoZones
Type
boolean
Default
false
doTeiWithZonePerRegion
Type
boolean
Default
false
doTeiWithZonePerLine
Type
boolean
Default
true
doTeiWithZonePerWord
Type
boolean
Default
false
doTeiWithLineTags
Type
boolean
Default
true
doTeiWithLineBreaks
Type
boolean
Default
false
doDocxWithTags
Type
boolean
Default
false
doDocxPreserveLineBreaks
Type
boolean
Default
false
doDocxForcePageBreaks
Type
boolean
Default
false
doDocxMarkUnclear
Type
boolean
Default
false
doDocxKeepAbbrevs
Type
boolean
Default
true
doDocxExpandAbbrevs
Type
boolean
Default
false
doDocxSubstituteAbbrevs
Type
boolean
Default
false
doWordBased
Type
boolean
Default
false
doBlackening
Type
boolean
Default
false
doCreateTitle
Type
boolean
Default
false
useVersionStatus
Type
string
Default
"Latest"

Request Body​

*/*

Responses​

default response

*/*
Try it out

Playground​

Authorization
Variables
Key
Value
Body

Samples​

The remaining operations, document metadata, the transcript history of a page and deleting a document, are in the groups beneath this page in the sidebar.

Transkribus Developer Platform