REST - Document
REST-Interface
Get document by instance-name and cas-id (pdf-conversion)
Special method to get document from instance without any permission checks, which does only work on localhost. This logs in as ‘system’ and performs the query on the given instance.
The result is a DocumentForPdfConversion-object which contains:
- Document
- MainFile as HTML with rewritten attachment-links
This method is intended to be used for pdf-conversion!
URL
GET <application-url>/api/document/pdfconversion/<instanceName>/<documentLanguageVersionCasId>
Path parameter
-
instanceName
AKA dataSourceName - documentLanguageVersionCasId
Produces
application/json
application/xml
com.matterial.mtr.api.object.DocumentForPdfConversion
- 200 OK
- 403 FORBIDDEN
- 500 INTERNAL_SERVER_ERROR
Permission
localhost only
Sample
GET http://localhost:8080/mtr-backend/api/document/pdfconversion/MtrDS/XXX
Get related image by instance-name and cas-id (pdf-conversion)
Special method to load files (related images) from instance without any permission checks, which does only work on localhost. This logs in as ‘system’ and performs the query on the given instance.
The result is the original file content (image).
This method is intended to be used for pdf-conversion!
URL
GET <application-url>/api/document/pdfconversion/<instanceName>/<documentLanguageVersionCasId>/file
Path parameter
-
instanceName
AKA dataSourceName - documentLanguageVersionCasId
Produces
File as stream
- 200 OK
- 403 FORBIDDEN
- 500 INTERNAL_SERVER_ERROR
Permission
localhost only
Sample
GET http://localhost:8080/mtr-backend/api/document/pdfconversion/MtrDS/XXX/file
Get complete file by instance-name and cas-id (pdf-conversion)
Special method to get the title, abstract and main-file as html from instance without any permission checks, which does only work on localhost. This logs in as ‘system’ and performs the query on the given instance.
The result is a complete document-view as html.
This method is intended to be used for pdf-conversion!
URL
GET <application-url>/api/document/pdfconversion/<instanceName>/<documentLanguageVersionCasId>/complete
Path parameter
-
instanceName
AKA dataSourceName - documentLanguageVersionCasId
Produces
File as stream
- 200 OK
- 403 FORBIDDEN
- 500 INTERNAL_SERVER_ERROR
Permission
localhost only
Sample
GET http://localhost:8080/mtr-backend/api/document/pdfconversion/MtrDS/XXX/complete
Get duplicate of document by id
Get duplicate of a stored document by id.
This copies the main-file and all attachments of the current version (the user is allowed to see) of all languages as temp-files.
All attachment-links within the main-file will be updated with their new temp-file equivalents.
Finally this returns all duplicated documents (one for each language) and the generated TempFileDescriptors.
You have to use the documents and the context-token of the TempFileDescriptors to store a new document.
Be aware to POST the first language and PUT the following languages with the first document-id.
URL
GET <application-url>/api/document/<documentId>/duplicate
Path parameter
- documentId
Query parameter
-
templateToDocument
possible: true, false
default: false
Activate special mode to create document out of a template -
documentToTemplate
possible: true, false
default: false
Activate special mode to create template out of a document
Produces
application/json
application/xml
com.matterial.mtr.api.object.DocumentDuplicate
- 200 OK
- 400 BAD_REQUEST
- 404 NOT_FOUND
- 500 INTERNAL_SERVER_ERROR
Permission
EDIT_DOCUMENT
Sample
GET http://localhost:8080/mtr-backend/api/document/2/duplicate
Get duplicates
Get all session-stored duplicates.
URL
GET <application-url>/api/document/duplicate
Produces
application/json
application/xml
com.matterial.mtr.api.object.DocumentDuplicates> - key of internal map: contextToken
- 200 OK
- 500 INTERNAL_SERVER_ERROR
Permission
EDIT_DOCUMENT
Sample
GET http://localhost:8080/mtr-backend/api/document/duplicate
Remove duplicate from session by context-token
Remove duplicate from session including all temp-files.
URL
DELETE <application-url>/api/document/<contextToken>/duplicate
Path parameter
-
contextToken
The contextToken, that represents one duplicated document in session.
Produces
text/plain
Integer - count
- 202 ACCEPTED
- 500 INTERNAL_SERVER_ERROR
Permission
EDIT_DOCUMENT
Sample
DELETE http://localhost:8080/mtr-backend/api/document/ebd9dece-d065-4733-995d-6a8f22c5ba54/duplicate
Get document by id
URL
GET <application-url>/api/document/<documentId>
Path parameter
- documentId
Query parameter
-
languagePrefer
possible: true, false
default: false
return doc in preffered language, otherwise any language.
does only work with “disable rights”! -
languageExclude
possible: true, false
default: false
exclude given language-key.
does only work with “disable rights”! -
languageKey
possible: de, en, fr, it, …
default: de
language key -
updateReadTime
possible: de, en, fr, …, all
This i18n-languagekey specifies which of the loaded documents should be updated as read. The default behaviour is that no document is marked as “read”. -
loadRoleRights
possible: true, false
default: false -
loadCategoriesPublicOnly
possible: true, false
default: false -
loadCategories
possible: true, false
default: false -
loadResponsibles
possible: true, false
default: false -
loadAuthors
possible: true, false
default: false -
loadLastAuthorOnly
possible: true, false
default: false -
loadFollowers
possible: true, false
default: false -
loadAmIFollowing
possible: true, false
default: false
This does only try to load the currently logged-in user as follower. -
loadMarkedAsHelpfulBy
possible: true, false
default: false -
attachmentOrderBy
possible:
id - attachment-id
name - attachment-name
createtime - attachment-createtime
default: name
the order by of attachments -
attachmentOrderDir
possible: asc, desc
default: asc
the ordering direction of attachments -
loadAttachments
possible: true, false
default: false
Load all attachments related to the current version. -
loadLanguageAttachments
possible: true, false
default: false
Load all attachments related to the language (all versions of a document with the same language). This means you will also load outdated attachments. -
loadDocumentAttachments
possible: true, false
default: false
Load all attachments related to the whole document (all versions of a document). This means you will also load outdated attachments or attachments of other languages. -
loadRelatedDocumentIds
possible: true, false
default: false -
loadAdditionalProperties
possible: true, false
default: false -
loadExtensionValues
possible: true, false
default: false -
loadReadConfirmationTimes
possible: true, false
default: false -
loadSnapFlag
possible: true, false
default: false -
loadComments
possible: true, false
default: false -
loadVersionCommentAsHtml
possible: true, false
default: false
Since v2.9.0
Produces
application/json
application/xml
com.matterial.mtr.api.object.Document
- 200 OK
- 400 BAD_REQUEST
- 404 NOT_FOUND
- 500 INTERNAL_SERVER_ERROR
Permission
Login
Sample
GET http://localhost:8080/mtr-backend/api/document/2
Get documents
URL
GET <application-url>/api/document
Query parameter
-
documentId
document-id(s) (multiple), i.e.:
“&documentId=4&documentId=5” -
documentLanguageVersionId
document-language-version-id(s) (multiple), i.e.:
“&documentLanguageVersionId=4&documentLanguageVersionId=5” -
allLanguages
possible: true, false
default: false
return all docs in all languages -
allVersions
possible: true, false
default: false
return all docs in all versions -
languagePrefer
possible: true, false
default: false
return doc in preffered language, otherwise any language.
does only work with “disable rights”! -
languageExclude
possible: true, false
default: false
exclude given language-key.
does only work with “disable rights”! -
languageKey
possible: de, en, fr, it, …
default: de
language key -
showWithCategoriesOnly
possible: true, false
default: false
Show only documents with categories.
since 3.0.0 -
hideWithCategories
possible: true, false
default: false
Hide documents with categories.
since 3.0.0 -
categoryIdsAnd
category-filter (and-related) (multiple), i.e.:
“&categoryIdsAnd=1&categoryIdsAnd=2&categoryIdsAnd=3” -
categoryIdsOr
category-filter (or-related) (multiple), i.e.:
“&categoryIdsOr=1&categoryIdsOr=2&categoryIdsOr=3” -
categoryTypeId
since v2.5.2
catgegory-type-id(s) (multiple), i.e.:
“&categoryTypeId=4&categoryTypeId=5” -
roleRightRoleId
Id of a related role (workgroup or personal role). -
roleRightType
Type of a related roleRight (1 - READ, 2 EDIT). Should normally be used with roleRightRoleId. -
read
true - only read documents
false - only unread documents
unreadSinceAccountCreation - only unread docs since first login
unreadSinceLastLogin - only unread docs since last login -
relatedDocumentId
docs related to this document-id -
showInvalid
true - get also invalid-documents -
showInvalidOnly
true - get only invalid-documents -
showBios
true - get also bio-documents -
showBiosOnly
true - get only bio-documents -
showTemplates
true - get also templates -
showTemplatesOnly
true - get only templates -
showArchived
true - get also archived docs -
showArchivedOnly
true - get only archived docs -
showRemoved
true - get also removed docs -
showRemovedOnly
true - get only removed docs -
showLandscapeOnly
true - get only docs in landscape mode -
hideLandscape
true - do not get docs in landscape mode -
showReadConfirmationActiveOnly
true - get only docs with active read confirmation
Since v2.5.0 -
hideReadConfirmationActive
true - do not get docs in no read confirmation
Since v2.5.0 -
followerAccountId
documents, the given account id follow. this will be OR-related with following by category and following by additional property, if more than one are given. -
following
if true, currently logged-in account follows documents -
categoryFollowerAccountId
documents, the given account id follows by category. this will be OR-related with direct following and following by additional property, if more than one are given. -
categoryFollowing
if true, currently logged-in account follows categories -
additionalPropertyFollowerAccountId
documents, the given account id follows by additional property. this will be OR-related with direct following and following by category, if more than one are given. -
additionalPropertyFollowing
if true, currently logged-in account follows additional property -
markedHelpfulByContactId
id of a contact that marked the document-language-version as helpful -
lastChangedSinceDays
possible: 0, 1, 2, …
last changed within the last count of days -
lastChangedSince
last changed since “timestamp” in seconds, i.e. 1451904693 -
responsibleContactId
contact-id of a responsible -
responsible
if true, currently logged-in account is responsible of documents -
authorshipAccountId
account-id of an “author” (stored in WriteRelation-Table) -
authorship
if true, currently logged-in account is author of documents -
documentExpiresInDays
documents valid end is reached within the next count of days -
documentExpiresOn
documents valid end “timestamp” in seconds -
documentExpires
possible: true, false
document has a “valid end” set -
documentHasArchivedBegin
possible: true, false
document has a “archived begin” set -
showLanguageVersionReviewedOnly
possible: true, false
default: false
show only reviewed documents.
document is “reviewed” (status-bit REVIEWED (4) is set) -
hideLanguageVersionReviewed
possible: true, false
default: false
hide reviewed documents
document is not “reviewed” (status-bit REVIEWED (4) is not set) -
showLanguageVersionReadyOnly
possible: true, false
default: false
show only published documents.
document is “ready” (status-bit READY (1) is set) -
hideLanguageVersionReady
possible: true, false
default: false
hide published documents
document is not “ready” (status-bit READY (1) is not set) -
showLanguageVersionCurrentlyInProcessingOnly
possible: true, false
default: false
show only documents that are currently in processing.
document is “currently in processing” (status-bit CURRENTLY_IN_PROCESSING (2) is set) -
hideLanguageVersionCurrentlyInProcessing
possible: true, false
default: false
hide documents, that are currently in processing.
document is not “currently in processing” (status-bit CURRENTLY_IN_PROCESSING (2) is not set) -
showLanguageVersionReviewRequestedOnly
possible: true, false
default: false
show only review requested documents -
hideLanguageVersionReviewRequested
possible: true, false
default: false
review for document is not requested -
additionalPropertyId
possible: 1, 2, 3, 4, 5, …
id of an additional-property -
additionalPropertyType
possible: 1, 2, 3, 4, 5
type of an additional-property
1 - NEWS
2 - URGENT
3 - HELP_SECTION_DASHBOARD
4 - HELP_SECTION_DOCUMENT_EDITOR
5 - INFO_CENTER -
showSnapOnly
possible: true, false
default: false
show only documents with related open snap-task. -
hideSnap
possible: true, false
default: false
hide documents with related open snap-task. -
mimeTypeId
possible: 1, 2, 3, 4, 5, …
id of a mime type -
mimeType
mime type, liketext/htmlortext/markdown. -
mentionedAccountIdInComment
account-id of a mentioned account within a document-related comment -
mentionedAccountIdInCommentUnread
possible: true, false
default: false
Does only work withmentionedAccountIdInComment > 0.
If true, does only return “unread” comments (which means “unread document” since comment creation, which meanscomment.createTime>document.lastReadTime). -
clipBoard
possible: true, false
default: false
true to get documents from session-clipboard. -
readConfirmationRequested
possible: true, false
default: false
true to get documents I should confirm reading.
Since v2.5.0 -
attachmentExtension
since v2.6.0
or-related extensions of attachments (multiple), i.e.:
“&attachmentExtension=pdf&attachmentExtension=png” -
loadRoleRights
possible: true, false
default: false -
loadCategoriesPublicOnly
possible: true, false
default: false -
loadCategories
possible: true, false
default: false -
loadResponsibles
possible: true, false
default: false -
loadAuthors
possible: true, false
default: false -
loadLastAuthorOnly
possible: true, false
default: false -
loadFollowers
possible: true, false
default: false -
loadAmIFollowing
possible: true, false
default: false
This does only try to load the currently logged-in user as follower. -
loadMarkedAsHelpfulBy
possible: true, false
default: false -
attachmentOrderBy
possible:
id - attachment-id
name - attachment-name
createtime - attachment-createtime
default: name
the order by of attachments -
attachmentOrderDir
possible: asc, desc
default: asc
the ordering direction of attachments -
loadAttachments
possible: true, false
default: false
Load all attachments related to the current version. -
loadLanguageAttachments
possible: true, false
default: false
Load all attachments related to the language (all versions of a document with the same language). This means you will also load outdated attachments. -
loadDocumentAttachments
possible: true, false
default: false
Load all attachments related to the whole document (all versions of a document). This means you will also load outdated attachments or attachments of other languages. -
loadRelatedDocumentIds
possible: true, false
default: false -
loadAdditionalProperties
possible: true, false
default: false -
loadExtensionValues
possible: true, false
default: false -
loadReadConfirmationTimes
possible: true, false
default: false -
loadSnapFlag
possible: true, false
default: false -
loadComments
possible: true, false
default: false -
loadVersionCommentAsHtml
possible: true, false
default: false
Since v2.9.0 -
count
possible: true, false
default: false
additionally loading count of documents -
updateReadTime
possible: de, en, fr, …, all
This i18n-languagekey specifies which of the loaded documents should be updated as read. The default behaviour is that no document is marked as “read”. -
orderBy
possible:
id - document-id
valid - document-valid
archived - document-archived
archivedBeginInSeconds - document-archivedbegin
removed - document-removed
clickCount- document-clickcount
validEndInSeconds - document-validend
createTimeInSeconds - document-createtime
validBeginOrCreateTime - document-validbegin
firstReadTimeAndValidBegin - version-firstreadtime
languageVersionTitle - version-title
languageVersionLanguagePrio - language-prio, version-version
languageVersionVersion - version-version
lastReadTime - version-lastreadtime
languageVersionLastChangeInSeconds - version-lastchange
languageVersionCreateTimeInSeconds - version-createtime
languageVersionStatus - version-status
sumRating - version-rating
firstReadTimeAndLastChange - versionfirstread
mentionedInComment - “documents with unread comment” first/last,
Only works with filtermentionedAccountIdInComment
default: title
the order by -
orderDir
possible: asc, desc
default: asc
the ordering direction - offset
- limit
Produces
application/json
application/xml
ListResult<com.matterial.mtr.api.object.Document>
- 200 OK
- 500 INTERNAL_SERVER_ERROR
Permission
Login
Sample
GET http://localhost:8080/mtr-backend/api/document?limit=1&count=true
Get documents in trash (admin trash)
Get documents in trash without permission check.
URL
GET <application-url>/api/document/trash
Query parameter
-
allLanguages
possible: true, false
default: false
return all docs in all languages -
languagePrefer
possible: true, false
default: false
return doc in preffered language, otherwise any language.
does only work with “disable rights”! -
languageExclude
possible: true, false
default: false
exclude given language-key.
does only work with “disable rights”! -
languageKey
possible: de, en, fr, it, …
default: de
language key -
showWithCategoriesOnly
possible: true, false
default: false
Show only documents with categories.
since 3.0.0 -
hideWithCategories
possible: true, false
default: false
Hide documents with categories.
since 3.0.0 -
categoryIdsAnd
category-filter (and-related) (multiple), i.e.:
“&categoryIdsAnd=1&categoryIdsAnd=2&categoryIdsAnd=3” -
categoryIdsOr
category-filter (or-related) (multiple), i.e.:
“&categoryIdsOr=1&categoryIdsOr=2&categoryIdsOr=3”
Does only work, ifcategoryIdsAndis not set. -
categoryTypeId
since v2.5.2
catgegory-type-id(s) (multiple), i.e.:
“&categoryTypeId=4&categoryTypeId=5” -
roleRightRoleId
Id of a related role (workgroup or personal role). -
roleRightType
Type of a related roleRight (1 - READ, 2 EDIT). Should normally be used with roleRightRoleId. -
read
true - only read documents
false - only unread documents
unreadSinceAccountCreation - only unread docs since first login
unreadSinceLastLogin - only unread docs since last login -
relatedDocumentId
docs related to this document-id -
showInvalid
true - get also invalid-documents -
showInvalidOnly
true - get only invalid-documents -
showBios
true - get also bio-documents -
showBiosOnly
true - get only bio-documents -
showTemplates
true - get also templates -
showTemplatesOnly
true - get only templates -
showArchived
true - get also archived docs -
showArchivedOnly
true - get only archived docs -
showLandscapeOnly
true - get only docs in landscape mode -
hideLandscape
true - do not get docs in landscape mode -
showReadConfirmationActiveOnly
true - get only docs with active read confirmation
Since v2.5.0 -
hideReadConfirmationActive
true - do not get docs in no read confirmation
Since v2.5.0 -
followerAccountId
documents, the given account id follow. this will be OR-related with following by category and following by additional property, if more than one are given. -
following
if true, currently logged-in account follows documents -
categoryFollowerAccountId
documents, the given account id follows by category. this will be OR-related with direct following and following by additional property, if more than one are given. -
categoryFollowing
if true, currently logged-in account follows categories -
additionalPropertyFollowerAccountId
documents, the given account id follows by additional property. this will be OR-related with direct following and following by category, if more than one are given. -
additionalPropertyFollowing
if true, currently logged-in account follows additional property -
markedHelpfulByContactId
id of a contact that marked the document-language-version as helpful -
lastChangedSinceDays
possible: 0, 1, 2, …
last changed within the last count of days -
lastChangedSince
last changed since “timestamp” in seconds, i.e. 1451904693 -
responsibleContactId
contact-id of a responsible -
responsible
if true, currently logged-in account is responsible of documents -
authorshipAccountId
account-id of an “author” (stored in WriteRelation-Table).
Does only work, ifauthorshipis not set. -
authorship
possible: true, false
if true, currently logged-in account is author of documents -
documentExpiresInDays
documents valid end is reached within the next count of days -
documentExpiresOn
documents valid end “timestamp” in seconds -
documentExpires
possible: true, false
document has a “valid end” set -
documentHasArchivedBegin
possible: true, false
document has a “archived begin” set -
showLanguageVersionReviewedOnly
possible: true, false
default: false
show only reviewed documents.
document is “reviewed” (status-bit REVIEWED (4) is set) -
hideLanguageVersionReviewed
possible: true, false
default: false
hide reviewed documents
document is not “reviewed” (status-bit REVIEWED (4) is not set) -
showLanguageVersionReadyOnly
possible: true, false
default: false
show only published documents.
document is “ready” (status-bit READY (1) is set) -
hideLanguageVersionReady
possible: true, false
default: false
hide published documents
document is not “ready” (status-bit READY (1) is not set) -
showLanguageVersionCurrentlyInProcessingOnly
possible: true, false
default: false
show only documents that are currently in processing.
document is “currently in processing” (status-bit CURRENTLY_IN_PROCESSING (2) is set) -
hideLanguageVersionCurrentlyInProcessing
possible: true, false
default: false
hide documents, that are currently in processing.
document is not “currently in processing” (status-bit CURRENTLY_IN_PROCESSING (2) is not set) -
showLanguageVersionReviewRequestedOnly
possible: true, false
default: false
show only review requested documents -
hideLanguageVersionReviewRequested
possible: true, false
default: false
review for document is not requested -
additionalPropertyId
possible: 1, 2, 3, 4, 5, …
id of an additional-property -
additionalPropertyType
possible: 1, 2, 3, 4, 5
type of an additional-property
1 - NEWS
2 - URGENT
3 - HELP_SECTION_DASHBOARD
4 - HELP_SECTION_DOCUMENT_EDITOR
5 - INFO_CENTER -
showSnapOnly
possible: true, false
default: false
show only documents with related open snap-task. -
hideSnap
possible: true, false
default: false
hide documents with related open snap-task. -
mimeTypeId
possible: 1, 2, 3, 4, 5, …
id of a mime type -
mimeType
mime type, liketext/htmlortext/markdown. -
mentionedAccountIdInComment
account-id of a mentioned account within a document-related comment -
mentionedAccountIdInCommentUnread
possible: true, false
default: false
Does only work withmentionedAccountIdInComment > 0.
If true, does only return “unread” comments (which means “unread document” since comment creation, which meanscomment.createTime>document.lastReadTime). -
readConfirmationRequested
possible: true, false
default: false
true to get documents I should confirm reading.
Since v2.5.0 -
attachmentExtension
since v2.6.0
or-related extensions of attachments (multiple), i.e.:
“&attachmentExtension=pdf&attachmentExtension=png” -
loadRoleRights
possible: true, false
default: false -
loadCategoriesPublicOnly
possible: true, false
default: false -
loadCategories
possible: true, false
default: false -
loadResponsibles
possible: true, false
default: false -
loadAuthors
possible: true, false
default: false -
loadLastAuthorOnly
possible: true, false
default: false -
loadFollowers
possible: true, false
default: false -
loadAmIFollowing
possible: true, false
default: false
This does only try to load the currently logged-in user as follower. -
loadMarkedAsHelpfulBy
possible: true, false
default: false -
attachmentOrderBy
possible:
id - attachment-id
name - attachment-name
createtime - attachment-createtime
default: name
the order by of attachments -
attachmentOrderDir
possible: asc, desc
default: asc
the ordering direction of attachments -
loadAttachments
possible: true, false
default: false
Load all attachments related to the current version. -
loadLanguageAttachments
possible: true, false
default: false
Load all attachments related to the language (all versions of a document with the same language). This means you will also load outdated attachments. -
loadDocumentAttachments
possible: true, false
default: false
Load all attachments related to the whole document (all versions of a document). This means you will also load outdated attachments or attachments of other languages. -
loadRelatedDocumentIds
possible: true, false
default: false -
loadAdditionalProperties
possible: true, false
default: false -
loadExtensionValues
possible: true, false
default: false -
loadReadConfirmationTimes
possible: true, false
default: false -
loadSnapFlag
possible: true, false
default: false -
loadComments
possible: true, false
default: false -
count
possible: true, false
default: false
additionally loading count of documents -
orderBy
possible:
id - document-id
valid - document-valid
archived - document-archived
archivedBeginInSeconds - document-archivedbegin
removed - document-removed
clickCount- document-clickcount
validEndInSeconds - document-validend
createTimeInSeconds - document-createtime
validBeginOrCreateTime - document-validbegin
firstReadTimeAndValidBegin - version-firstreadtime
languageVersionTitle - version-title
languageVersionLanguagePrio - language-prio, version-version
languageVersionVersion - version-version
lastReadTime - version-lastreadtime
languageVersionLastChangeInSeconds - version-lastchange
languageVersionCreateTimeInSeconds - version-createtime
languageVersionStatus - version-status
sumRating - version-rating
firstReadTimeAndLastChange - versionfirstread
mentionedInComment - “documents with unread comment” first/last,
Only works with filtermentionedAccountIdInComment
default: title
the order by -
orderDir
possible: asc, desc
default: asc
the ordering direction - offset
- limit
Produces
application/json
application/xml
ListResult<com.matterial.mtr.api.object.Document>
- 200 OK
- 500 INTERNAL_SERVER_ERROR
Permission
SHOW_TRASH
Sample
GET http://localhost:8080/mtr-backend/api/document/trash?limit=1&count=true
Clipboard - Add by category
since 3.0.0
Add documents to clipboard by category. Optionally clear the clipboard before adding new documents. Reminder: DOCUMENT_MAX_CLIP_BOARD_SIZE is the limit for the clipboard.
URL
PUT <application-url>/api/document/clipboard/add/category/{categoryId}
Query parameter
-
clear
Clear the clip board before adding new documents.
Produces
text/plain
Integer - number of documents added to clipboard
- 200 OK
- 400 BAD_REQUEST
- 500 INTERNAL_SERVER_ERROR
Permission
Login
Sample
PUT http://localhost:8080/mtr-backend/api/document/clipboard/add/category/5
Clipboard - Add by category type
since 3.0.0
Add documents to clipboard by category type. Optionally clear the clipboard before adding new documents. Reminder: DOCUMENT_MAX_CLIP_BOARD_SIZE is the limit for the clipboard.
URL
PUT <application-url>/api/document/clipboard/add/category/type/{categoryTypeId}
Query parameter
-
clear
Clear the clip board before adding new documents.
Produces
text/plain
Integer - number of documents added to clipboard
- 200 OK
- 400 BAD_REQUEST
- 500 INTERNAL_SERVER_ERROR
Permission
Login
Sample
PUT http://localhost:8080/mtr-backend/api/document/clipboard/add/category/type/5
Clipboard - Add
Add documents to session clipboard.
URL
PUT <application-url>/api/document/clipboard/add
Consumes
application/json
application/xml
List<com.matterial.mtr.api.object.DocumentClipBoard>
Produces
text/plain
Integer - number of documents added to clipboard
- 200 OK
- 400 BAD_REQUEST
- 500 INTERNAL_SERVER_ERROR
Permission
Login
Sample
PUT http://localhost:8080/mtr-backend/api/document/clipboard/add
Clipboard - Remove
Remove documents from session clipboard.
URL
PUT <application-url>/api/document/clipboard/remove
Consumes
application/json
application/xml
List<com.matterial.mtr.api.object.DocumentClipBoard>
Produces
text/plain
Integer - number of documents removed from clipboard
- 200 OK
- 400 BAD_REQUEST
- 500 INTERNAL_SERVER_ERROR
Permission
Login
Sample
PUT http://localhost:8080/mtr-backend/api/document/clipboard/remove
Clipboard - Clear
clear all documents from session clipboard.
URL
DELETE <application-url>/api/document/clipboard
Produces
text/plain
Integer - number of documents removed from clipboard
- 200 OK
- 400 BAD_REQUEST
- 500 INTERNAL_SERVER_ERROR
Permission
Login
Sample
DELETE http://localhost:8080/mtr-backend/api/document/clipboard
Create snap
This interface creates a document, but compared to normal Create document this one adds:
- checks permission CREATE_SNAP instead of EDIT_DOCUMENT
- always adds all groups marked as initiallyAssigned
- always adds add-prop snap
- always adds a task, with
- task.description = doc.title
- task.assignee = doc.lastManuallyAssignedEditContentRole
- try to publish the snap
URL
POST <application-url>/api/document/snap
Query parameter
-
contextToken
This token is used to identify all temporarily uploaded files (main-file, attachments)
Consumes
application/json
application/xml
com.matterial.mtr.api.object.Document
Produces
application/json
application/xml
com.matterial.mtr.api.object.Document
- 201 CREATED
- 400 BAD_REQUEST
- 500 INTERNAL_SERVER_ERROR
Permission
CREATE_SNAP
Sample
POST http://localhost:8080/mtr-backend/api/document/snap
Create template
This creates a normal document, but:
- Always sets the template-flag
- Checks for
EDIT_DOCUMENT_TEMPLATE-permission (instead ofEDIT_DOCUMENT) - Does not check further document-rights
- Does not add the current user into roleRights
URL
POST <application-url>/api/document/template
Query parameter
-
publishRequest
possible values: unreviewed,reviewed,reviewRequested
request for publishing -
uniqueLockId
A typical client should create a “unique lock id” for each editor. This lockId should be reused each time updating or unlocking the document. If the client does not create such a lockId, it is not possible to further edit the document. -
contextToken
This token is used to identify all temporarily uploaded files (main-file, attachments)
Consumes
application/json
application/xml
com.matterial.mtr.api.object.Document
Produces
application/json
application/xml
com.matterial.mtr.api.object.Document
- 201 CREATED
- 400 BAD_REQUEST
- 500 INTERNAL_SERVER_ERROR
Permission
EDIT_DOCUMENT_TEMPLATE
Sample
POST http://localhost:8080/mtr-backend/api/document/template
Update template
This updates a template like a normal document, but:
- Always sets the template-flag
- Checks for
EDIT_DOCUMENT_TEMPLATE-permission (instead ofEDIT_DOCUMENT) - Does not check further document-rights
- Does not add the current user into roleRights
URL
PUT <application-url>/api/document/template/<documentId>
Path parameter
-
documentId
The id of a specific document
Query parameter
-
publishRequest
possible values: unreviewed,reviewed,reviewRequested
request for publishing -
uniqueLockId
A typical client should create a “unique lock id” for each editor. This lockId should be reused each time updating or unlocking the document. If the client does not create such a lockId, it is not possible to further edit the document. -
contextToken
This token is used to identify all temporarily uploaded files (main-file, attachments) -
ignoreCategories
possible: true, false
default: false
If true update ignores categories. -
ignoreExtensionValues
possible: true, false
default: false
If true update ignores extension values.
Attention: If a new version will be created, the “old” ones from a previous version will not be added automatically. -
ignoreAttachments
possible: true, false
default: false
If true update ignores attachments.
Attention: If a new version will be created, the “old” ones from a previous version will not be added automatically. -
ignoreRoleRights
possible: true, false
default: false
If true update ignores role rights. -
ignoreResponsibles
possible: true, false
default: false
If true update ignores responsibles.
Consumes
application/json
application/xml
com.matterial.mtr.api.object.Document
Produces
application/json
application/xml
com.matterial.mtr.api.object.Document
- 201 CREATED
- 400 BAD_REQUEST
- 500 INTERNAL_SERVER_ERROR
Permission
EDIT_DOCUMENT_TEMPLATE
Sample
PUT http://localhost:8080/mtr-backend/api/document/template/2
Update bio
This updates a template like a normal document, but:
- Always sets the bio-flag
- Checks for no permission (instead of
EDIT_DOCUMENT) - Does not check further document-rights
- Does only set the current user into roleRights and do not allow to update
URL
PUT <application-url>/api/document/bio/<documentId>
Path parameter
-
documentId
The id of a specific document
Query parameter
-
uniqueLockId
A typical client should create a “unique lock id” for each editor. This lockId should be reused each time updating or unlocking the document. If the client does not create such a lockId, it is not possible to further edit the document. -
contextToken
This token is used to identify all temporarily uploaded files (main-file, attachments) -
ignoreCategories
possible: true, false
default: false
If true update ignores categories. -
ignoreExtensionValues
possible: true, false
default: false
If true update ignores extension values.
Attention: If a new version will be created, the “old” ones from a previous version will not be added automatically. -
ignoreAttachments
possible: true, false
default: false
If true update ignores attachments.
Attention: If a new version will be created, the “old” ones from a previous version will not be added automatically. -
ignoreRoleRights
possible: true, false
default: false
If true update ignores role rights. -
ignoreResponsibles
possible: true, false
default: false
If true update ignores responsibles.
Consumes
application/json
application/xml
com.matterial.mtr.api.object.Document
Produces
application/json
application/xml
com.matterial.mtr.api.object.Document
- 201 CREATED
- 400 BAD_REQUEST
- 500 INTERNAL_SERVER_ERROR
Permission
Login
Sample
PUT http://localhost:8080/mtr-backend/api/document/bio/2
Create document
To activate Read Confirmation, you have to:
- Set
Document.readConfirmationActive = true - Set at least one related
RoleRight.readConfirmationRequested = true
URL
POST <application-url>/api/document
Query parameter
-
publishRequest
possible values: unreviewed,reviewed,reviewRequested
request for publishing -
validBeginInSecondsRequest
default: now
request for valid-begin (only used while publishing) -
uniqueLockId
A typical client should create a “unique lock id” for each editor. This lockId should be reused each time updating or unlocking the document. If the client does not create such a lockId, it is not possible to further edit the document. -
contextToken
This token is used to identify all temporarily uploaded files (main-file, attachments)
Consumes
application/json
application/xml
com.matterial.mtr.api.object.Document
Produces
application/json
application/xml
com.matterial.mtr.api.object.Document
- 201 CREATED
- 400 BAD_REQUEST
- 500 INTERNAL_SERVER_ERROR
Permission
EDIT_DOCUMENT
Sample
POST http://localhost:8080/mtr-backend/api/document
Update document
To activate Read Confirmation, you have to:
- Set
Document.readConfirmationActive = true - Set at least one related
RoleRight.readConfirmationRequested = true
URL
PUT <application-url>/api/document/<documentId>
Path parameter
-
documentId
The id of a specific document
Query parameter
-
publishRequest
possible values: unreviewed,reviewed,reviewRequested
request for publishing -
validBeginInSecondsRequest
default: now
request for valid-begin (only used while publishing) -
uniqueLockId
A typical client should create a “unique lock id” for each editor. This lockId should be reused each time updating or unlocking the document. If the client does not create such a lockId, it is not possible to further edit the document. -
contextToken
This token is used to identify all temporarily uploaded files (main-file, attachments) -
ignoreCategories
possible: true, false
default: false
If true update ignores categories. -
ignoreExtensionValues
possible: true, false
default: false
If true update ignores extension values.
Attention: If a new version will be created, the “old” ones from a previous version will not be added automatically. -
ignoreAttachments
possible: true, false
default: false
If true update ignores attachments.
Attention: If a new version will be created, the “old” ones from a previous version will not be added automatically. -
ignoreRoleRights
possible: true, false
default: false
If true update ignores role rights. -
ignoreResponsibles
possible: true, false
default: false
If true update ignores responsibles.
Consumes
application/json
application/xml
com.matterial.mtr.api.object.Document
Produces
application/json
application/xml
com.matterial.mtr.api.object.Document
- 201 CREATED
- 400 BAD_REQUEST
- 500 INTERNAL_SERVER_ERROR
Permission
EDIT_DOCUMENT
Sample
PUT http://localhost:8080/mtr-backend/api/document/2
Unsnap
Unsnap document: Closing related snap-task.
URL
DELETE <application-url>/api/document/<documentId>/language/<languageKey>/snap
Path parameter
-
documentId
The id of a specific document -
languageKey
possible: de, en, fr, it, …
Produces
text/plain
Integer - count
- 200 OK
- 400 BAD_REQUEST
- 500 INTERNAL_SERVER_ERROR
Permission
EDIT_TASK
Sample
DELETE http://localhost:8080/mtr-backend/api/document/8/language/fr/snap
Mark document language version as reviewed
URL
PUT <application-url>/api/document/<documentId>/version/<documentLanguageVersionId>/review
Path parameter
-
documentId
The id of a specific document -
documentLanguageVersionId
Id of the language-version
Produces
text/plain
Integer - count
- 201 CREATED
- 400 BAD_REQUEST
- 403 FORBIDDEN
- 500 INTERNAL_SERVER_ERROR
Permission
Login
Sample
PUT http://localhost:8080/mtr-backend/api/document/2/version/3/review
Decline review of language-version
URL
PUT <application-url>/api/document/<documentId>/version/<documentLanguageVersionId>/reviewdecline
Path parameter
-
documentId
The id of a specific document -
documentLanguageVersionId
Id of the language-version
Produces
text/plain
Integer - count
- 200 OK
- 400 BAD_REQUEST
- 403 FORBIDDEN
- 500 INTERNAL_SERVER_ERROR
Permission
Login
Sample
PUT http://localhost:8080/mtr-backend/api/document/2/version/3/reviewdecline
Decline review of language-version with task
The optional task should get at least the description and the assignedRoleId.
URL
PUT <application-url>/api/document/<documentId>/version/<documentLanguageVersionId>/reviewdecline
Path parameter
-
documentId
The id of a specific document -
documentLanguageVersionId
Id of the language-version
Consumes
application/json
application/xml
com.matterial.mtr.api.object.Task
Produces
text/plain
Integer - count
- 200 OK
- 400 BAD_REQUEST
- 403 FORBIDDEN
- 500 INTERNAL_SERVER_ERROR
Permission
Login
Sample
PUT http://localhost:8080/mtr-backend/api/document/2/version/3/reviewdecline
Confirm read time
Sets the current time as confirmed read time for the current account.
URL
PUT <application-url>/api/document/<documentId>/version/<documentLanguageVersionId>/confirm
Path parameter
-
documentId
The id of a specific document -
documentLanguageVersionId
Id of the language-version
Produces
text/plain
Integer - count
- 200 OK
- 400 BAD_REQUEST
- 403 FORBIDDEN
- 500 INTERNAL_SERVER_ERROR
Permission
Login
Sample
PUT http://localhost:8080/mtr-backend/api/document/2/version/3/confirm
Set additional properties
URL
PUT <application-url>/api/document/<documentId>/additionalproperty
Path parameter
-
documentId
The id of a specific document
Consumes
application/json
application/xml
List<[com.matterial.mtr.api.object.AdditionalProperty](/matterial/#/document/152/en)>
Produces
application/json
application/xml
On success: com.matterial.mtr.api.object.Document
On error: com.matterial.mtr.api.object.DocumentLock
- 200 OK
- 400 BAD_REQUEST
- 500 INTERNAL_SERVER_ERROR
Permission
EDIT_DOCUMENT
Sample
PUT http://localhost:8080/mtr-backend/api/document/42/additionalproperty
Is following (logged-in account follows a document)
URL
GET <application-url>/api/document/<documentId>/follow
Path parameter
-
documentId
The id of a specific document
Query parameter
-
languageKey
possible values: de, en, fr, it, …
The language key
Produces
text/plain
Boolean - true / false
- 200 OK
- 400 BAD_REQUEST
- 500 INTERNAL_SERVER_ERROR
Permission
Login
Sample
GET http://localhost:8080/mtr-backend/api/document/667/follow?languageKey=de
Follow document
If Query-Param accountId is not set at all, the currently logged-in account will be used. Multiple accountIds can be given to set them as followers,
but to assign other accounts as follower the caller has to have edit-permission on this document.
URL
PUT <application-url>/api/document/<documentId>/follow
Path parameter
-
documentId
The id of a specific document
Query parameter
-
languageKey
mandatory: yes!
possible values: de, en, fr, it, …
The language key -
accountId
optional account ids (multiple allowed)
Produces
text/plain
Integer - count
- 200 OK
- 400 BAD_REQUEST
- 500 INTERNAL_SERVER_ERROR
Permission
Login
Sample
PUT http://localhost:8080/mtr-backend/api/document/2/follow?languageKey=de
Follow document (other account)
URL
PUT <application-url>/api/document/<documentId>/follow/byaccount/<accountId>
Path parameter
-
documentId
The id of a specific document -
accountId
account id
Query parameter
-
languageKey
mandatory: yes!
possible values: de, en, fr, it, …
The language key
Produces
text/plain
Integer - count
- 200 OK
- 400 BAD_REQUEST
- 500 INTERNAL_SERVER_ERROR
Permission
Login
Sample
PUT http://localhost:8080/mtr-backend/api/document/2/follow/byaccount/3?languageKey=de
Unfollow document
If Query-Param accountId is not set at all, the currently logged-in account will be used. Multiple accountIds can be given to unset them as followers,
but to unassign other accounts as follower the caller has to have edit-permission on this document.
URL
PUT <application-url>/api/document/<documentId>/unfollow
Path parameter
-
documentId
The id of a specific document
Query parameter
-
languageKey
mandatory: yes!
possible values: de, en, fr, it, …
The language key -
accountId
optional account ids (multiple allowed)
Produces
text/plain
Integer - count
- 200 OK
- 400 BAD_REQUEST
- 500 INTERNAL_SERVER_ERROR
Permission
Login
Sample
PUT http://localhost:8080/mtr-backend/api/document/2/unfollow?languageKey=de
Unfollow document (other account)
URL
PUT <application-url>/api/document/<documentId>/unfollow/byaccount/<accountId>
Path parameter
-
documentId
The id of a specific document -
accountId
account id
Query parameter
-
languageKey
mandatory: yes!
possible values: de, en, fr, it, …
The language key
Produces
text/plain
Integer - count
- 200 OK
- 400 BAD_REQUEST
- 500 INTERNAL_SERVER_ERROR
Permission
Login
Sample
PUT http://localhost:8080/mtr-backend/api/document/2/unfollow/byaccount/3?languageKey=de
Archive document
URL
PUT <application-url>/api/document/<documentId>/archive
Path parameter
-
documentId
The id of a specific document
Query parameter
-
archivedBeginInSecondsRequest
default: now
archive begin
Produces
application/json
application/xml
On success: com.matterial.mtr.api.object.Document
On error: com.matterial.mtr.api.object.DocumentLock
- 200 OK
- 400 BAD_REQUEST
- 500 INTERNAL_SERVER_ERROR
Permission
EDIT_DOCUMENT
Sample
PUT http://localhost:8080/mtr-backend/api/document/2/archive?archivedBeginInSecondsRequest=1502284958
Unarchive document
URL
PUT <application-url>/api/document/<documentId>/unarchive
Path parameter
-
documentId
The id of a specific document
Produces
application/json
application/xml
On success: com.matterial.mtr.api.object.Document
On error: com.matterial.mtr.api.object.DocumentLock
- 200 OK
- 400 BAD_REQUEST
- 500 INTERNAL_SERVER_ERROR
Permission
EDIT_DOCUMENT
Sample
PUT http://localhost:8080/mtr-backend/api/document/2/unarchive
Trash document
URL
PUT <application-url>/api/document/<documentId>/trash
Path parameter
-
documentId
The id of a specific document
Produces
application/json
application/xml
On success: com.matterial.mtr.api.object.Document
On error: com.matterial.mtr.api.object.DocumentLock
- 200 OK
- 400 BAD_REQUEST
- 403 FORBIDDEN - no permission on document or document does not exist
- 409 CONFLICT - invalid lock
- 500 INTERNAL_SERVER_ERROR
Permission
EDIT_DOCUMENT
Sample
PUT http://localhost:8080/mtr-backend/api/document/2/trash
Untrash document
URL
PUT <application-url>/api/document/<documentId>/untrash
Path parameter
-
documentId
The id of a specific document
Produces
application/json
application/xml
On success: com.matterial.mtr.api.object.Document
On error: com.matterial.mtr.api.object.DocumentLock
- 200 OK
- 400 BAD_REQUEST
- 403 FORBIDDEN - no permission on document or document does not exist
- 409 CONFLICT - invalid lock
- 500 INTERNAL_SERVER_ERROR
Permission
EDIT_DOCUMENT || SHOW_TRASH
Sample
PUT http://localhost:8080/mtr-backend/api/document/2/untrash
Finally remove document
URL
DELETE <application-url>/api/document/<documentId>
Path parameter
-
documentId
The id of a specific document
Produces
application/json
application/xml
On success: com.matterial.mtr.api.object.Document
On error: com.matterial.mtr.api.object.DocumentLock
- 200 OK
- 400 BAD_REQUEST
- 403 FORBIDDEN - no permission on document or document does not exist
- 409 CONFLICT - invalid lock
- 500 INTERNAL_SERVER_ERROR
Permission
EDIT_DOCUMENT || SHOW_TRASH
Sample
DELETE http://localhost:8080/mtr-backend/api/document/8
Remove a specific version
Removes the language-version with all its db-relations and the related cas-file. It is only possible to remove versions, that are not “currentlyInProcessing”.
URL
DELETE <application-url>/api/document/<documentId>/version/<documentLanguageVersionId>
Path parameter
-
documentId
The id of a specific document -
documentLanguageVersionId
The id of a specific document-language-version
Produces
application/json
application/xml
On success: com.matterial.mtr.api.object.Document
On error: com.matterial.mtr.api.object.DocumentLock
- 200 OK
- 400 BAD_REQUEST
- 403 FORBIDDEN - no permission on document or document does not exist
- 409 CONFLICT - invalid lock
- 500 INTERNAL_SERVER_ERROR
Permission
EDIT_DOCUMENT
Sample
DELETE http://localhost:8080/mtr-backend/api/document/8/version/25
Remove a specific language
Removes all versions of a document by language-key with all its db-relations and the related cas-files. It is not possible to remove the last language.
URL
DELETE <application-url>/api/document/<documentId>/language/<languageKey>
Path parameter
-
documentId
The id of a specific document -
languageKey
possible: de, en, fr, it, …
Produces
application/json
application/xml
On success: ListResult<com.matterial.mtr.api.object.Document>
On error: com.matterial.mtr.api.object.DocumentLock
- 200 OK
- 400 BAD_REQUEST
- 403 FORBIDDEN - no permission on document or document does not exist
- 409 CONFLICT - invalid lock
- 500 INTERNAL_SERVER_ERROR
Permission
EDIT_DOCUMENT
Sample
DELETE http://localhost:8080/mtr-backend/api/document/8/language/fr
Cleanup trash
URL
DELETE <application-url>/api/document
Query parameter
-
ignoreRemoveTime
possible values: true, fals
default: false
if true, removes all documents in trash
Produces
text/plain
Integer - count of documents placed into removal-queue
- 202 ACCEPTED
- 500 INTERNAL_SERVER_ERROR
Permission
SHOW_TRASH
Sample
DELETE http://localhost:8080/mtr-backend/api/document
Get removal-queue-size
Get the current size of the removal-queue.
URL
GET <application-url>/api/document/removal/queue
Produces
text/plain
Integer - queue-size
- 200 OK
- 500 INTERNAL_SERVER_ERROR
Permission
Login
Sample
GET http://localhost:8080/mtr-backend/api/document/removal/queue
Reconvert document-language-version
Reconverts the main-file of a document-language-version and all of its attachments. This regenerates all pdfs and thumbnails even if they already exists.
URL
PUT <application-url>/api/document/<documentId>/version/<documentLanguageVersionId>/convert
Path parameter
-
documentId
The id of a specific document -
documentLanguageVersionId
Id of the language-version
Produces
text/plain
Integer - count of document-language-versions
- 200 OK
- 500 INTERNAL_SERVER_ERROR
Permission
EDIT_DOCUMENT
Sample
PUT http://localhost:8080/mtr-backend/api/document/2/version/3/convert
Convert all document-language-versions
(Re)converts the main-file of all document-language-version and all of their attachments. If “regenerate=true” this regenerates all pdfs and thumbnails even if they already exists.
URL
PUT <application-url>/api/document/convert
Query parameter
-
regenerate
possible values: true, false
default: false
if true, this regenerates all pdfs and thumbnails even if they already exists
Produces
text/plain
Integer - count of document-language-versions
- 200 OK
- 500 INTERNAL_SERVER_ERROR
Permission
ADMINISTRATE_ALL
Sample
PUT http://localhost:8080/mtr-backend/api/document/convert?regenerate=true
Get main-file by document-id
Load the main file of the document in markdown format..
Using the loadHtml, loadPdf and loadThumbnail parameters, you can load the desired format instead of the original format.
URL
GET <application-url>/api/document/<documentId>/file
Path parameter
-
documentId
The id of a specific document
Query parameter
-
languageKey
possible values: de, en, fr, it, …
default: de -
markdownToHtml
Deprecated as of v2.2.0: UseloadHtmlinstead
possible values: true, false
default: false
Requesting content ashtml, if true. Otherwise this returnsmarkdown. -
loadHtml
possible values: true, false
default: false
Requesting content ashtml, if true. Otherwise this returnsmarkdown.
This might result in a conversion, depending on what content-type it has. -
loadPdf
possible values: true, false
default: false
get pdf -
loadThumbnail
possible values: true, false
default: false
get thumbnail -
resolveCompounds
possible values: true, false
default: false
This parameter is only relevant if the mime type of the main file is text/html. If set to true, compound links will be resolved.
Produces
File as stream
- 200 OK
- 500 INTERNAL_SERVER_ERROR
Permission
Login
Sample
GET http://localhost:8080/mtr-backend/api/document/2/file?languageKey=de
Get main-file by document-id and document-language-version-id
URL
GET <application-url>/api/document/<documentId>/version/<documentLanguageVersionId>/file
Path parameter
-
documentId
The id of a specific document -
documentLanguageVersionId
document-language-version-id
Query parameter
-
markdownToHtml
Deprecated as of v2.2.0: UseloadHtmlinstead
possible values: true, false
default: false
Requesting content ashtml, if true. Otherwise this returnsmarkdown. -
loadHtml
possible values: true, false
default: false
Requesting content ashtml, if true. Otherwise this returnsmarkdown.
This might result in a conversion, depending on what content-type it has. -
loadPdf
possible values: true, false
default: false
get pdf -
loadThumbnail
possible values: true, false
default: false
get thumbnail -
resolveCompounds
possible values: true, false
default: false
This parameter is only relevant if the mime type of the main file is text/html. If set to true, compound links will be resolved.
Produces
File as stream
- 200 OK
- 204 NO CONTENT
- 404 NOT FOUND
- 500 INTERNAL_SERVER_ERROR
Permission
Login
Sample
GET http://localhost:8080/mtr-backend/api/document/2/version/5/file
Compare main-files by document-language-version-ids
Compare two version of html-main-files by languageVersionId and results in a html-file which are marked with special classes (added/removed).
URL
GET <application-url>/api/document/compare/version/<oldDocumentLanguageVersionId>/<newDocumentLanguageVersionId>/file
Path parameter
-
oldDocumentLanguageVersionId
The old document-language-version-id -
newDocumentLanguageVersionId
The new document-language-version-id
Produces
File as stream
- 200 OK
- 404 NOT FOUND
- 500 INTERNAL_SERVER_ERROR
Permission
SHOW_DOCUMENT_VERSIONS_AND_COMPARE
Sample
GET http://localhost:8080/mtr-backend/api/document/compare/version/5/6/file
Get attachments
URL
GET <application-url>/api/document/<documentId>/attachment
Path parameter
-
documentId
The id of a specific document
Query parameter
-
documentLanguageVersionId
document-language-version-id -
languageKey
possible: de, en, fr, it, …
default: de
language key -
orderBy
possible:
id - attachment-id
name - attachment-name
createtime - attachment-createtime
default: name
the order by -
orderDir
possible: asc, desc
default: asc
the ordering direction - offset
- limit
Produces
application/json
application/xml
List<com.matterial.mtr.api.object.Attachment>
- 200 OK
- 500 INTERNAL_SERVER_ERROR
Permission
Login
Sample
GET http://localhost:8080/mtr-backend/api/document/1/attachment
Get attachment by document-id, document-language-version-id, attachment-id
Loads the attachment in the desired format.
In case the attachment is an image, three sizes are available (the size=t and the parameter loadThumbnail have the same effect).
In case the file is a pdf or a Microsoft Office or OpenOffice format, a pdf can be loaded by setting the parameter loadPdf=true.
In case the desired file format cannot be generated, the original file format will be returned.
URL
GET <application-url>/api/document/<documentId>/version/<documentLanguageVersionId>/attachment/<attachmentId>
Path parameter
-
documentId
The id of a specific document -
documentLanguageVersionId
document-language-version-id -
attachmentId
attachment-id
Query parameter
-
size
possible values: s, l, t
s - small (400px width)
l - large (720px width)
t - thumbnail (200px width) -
loadPdf
possible values: true, false
default: false
get pdf -
loadThumbnail
possible values: true, false
default: false
get thumbnail -
forceAttachment
possible values: true, false
default: false
force ContentDisposition-Header: attachment
Produces
File as stream
- 200 OK
- 204 NO CONTENT
- 404 NOT FOUND
- 500 INTERNAL_SERVER_ERROR
Permission
Login
Sample
GET http://localhost:8080/mtr-backend/api/document/90/version/3390/attachment/251
Get attachment by document-id, attachment-id
Loading attachment without languageVersionId
URL
GET <application-url>/api/document/<documentId>/attachment/<attachmentId>
Path parameter
-
documentId
The id of a specific document -
attachmentId
attachment-id
Query parameter
-
size
possible values: s, l, t
s - small (400px width)
l - large (720px width)
t - thumbnail (200px width) -
loadPdf
possible values: true, false
default: false
get pdf -
loadThumbnail
possible values: true, false
default: false
get thumbnail -
forceAttachment
possible values: true, false
default: false
force ContentDisposition-Header: attachment
Produces
File as stream
- 200 OK
- 204 NO CONTENT
- 404 NOT FOUND
- 500 INTERNAL_SERVER_ERROR
Permission
Login
Sample
GET http://localhost:8080/mtr-backend/api/document/90/version/3390/attachment/251
Execute batch action on clipboard
Execute batch actions defined in Batch Actions on whole clipboard.
URL
PUT <application-url>/api/document/batchaction/{actionCode}
Path parameter
-
actionCode
The action, that should be executed.
Defined in Batch Actions.
Consumes
application/json
application/xml
com.matterial.mtr.api.object.BatchActionAdditionalData
Produces
text/plain
Boolean - always true, because this executes the batch action asynchronously
- 200 OK
- 500 INTERNAL_SERVER_ERROR
Permission
Login
Sample
PUT http://localhost:8080/mtr-backend/api/document/batchaction/1