Appearance
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
GET
https://transkribus.eu/TrpServer/rest/collections/{collId}/{id}/fulldocRead 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
GET
https://transkribus.eu/TrpServer/rest/collections/{collId}/{id}/{page}/currGET /collections/{collId}/{id}/{page}/text
GET
https://transkribus.eu/TrpServer/rest/collections/{collId}/{id}/{page}/textUpload
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
POST
https://transkribus.eu/TrpServer/rest/uploadsAnnounces 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
PUT /uploads/{uploadId}
PUT
https://transkribus.eu/TrpServer/rest/uploads/{uploadId}GET /uploads/{uploadId}
GET
https://transkribus.eu/TrpServer/rest/uploads/{uploadId}POST /collections/{collId}/createDocFromIiifUrl
POST
https://transkribus.eu/TrpServer/rest/collections/{collId}/createDocFromIiifUrlExport
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
POST
https://transkribus.eu/TrpServer/rest/collections/{collId}/{id}/exportParameters
Path Parameters
collId*
Type
Requiredinteger
Format
"int32"id*
Type
Requiredinteger
Format
"int32"Query Parameters
pages
Type
string
doWriteMets
Type
boolean
Default
truedoWriteImages
Type
boolean
Default
truedoExportPageXml
Type
boolean
Default
truedoExportAltoXml
Type
boolean
Default
truesplitIntoWordsInAltoXml
Type
boolean
Default
truedoWritePdf
Type
boolean
Default
falsedoWriteTei
Type
boolean
Default
falsedoWriteDocx
Type
boolean
Default
falsedoWriteTagsXlsx
Type
boolean
Default
falsedoWriteTablesXlsx
Type
boolean
Default
falsedoPdfImagesOnly
Type
boolean
Default
falsedoPdfImagesPlusText
Type
boolean
Default
truedoPdfWithTextPages
Type
boolean
Default
falsedoPdfWithTags
Type
boolean
Default
falsedoTeiWithNoZones
Type
boolean
Default
falsedoTeiWithZonePerRegion
Type
boolean
Default
falsedoTeiWithZonePerLine
Type
boolean
Default
truedoTeiWithZonePerWord
Type
boolean
Default
falsedoTeiWithLineTags
Type
boolean
Default
truedoTeiWithLineBreaks
Type
boolean
Default
falsedoDocxWithTags
Type
boolean
Default
falsedoDocxPreserveLineBreaks
Type
boolean
Default
falsedoDocxForcePageBreaks
Type
boolean
Default
falsedoDocxMarkUnclear
Type
boolean
Default
falsedoDocxKeepAbbrevs
Type
boolean
Default
truedoDocxExpandAbbrevs
Type
boolean
Default
falsedoDocxSubstituteAbbrevs
Type
boolean
Default
falsedoWordBased
Type
boolean
Default
falsedoBlackening
Type
boolean
Default
falsedoCreateTitle
Type
boolean
Default
falseuseVersionStatus
Type
string
Default
"Latest"Request Body
*/*
Responses
default response
*/*
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.