This is the websocket backend API. It is used to communicate between frontend and backend.
Backend websocket server
Accepts one of the following messages:
Get annotation by Id
Payload object
{
"annotationId": 0
}
Update annotation by id, Payload can have additional fields which wants to be set, Draft will be set to false!
Annotation DB Object
{
"annotationId": 0,
"tagId": 0,
"deleted": true
}
Get annotation by document id
Payload object
{
"documentId": 0
}
Export annotation by document id
Payload object
{
"documentId": 0
}
Accepts one of the following messages:
Update annotation by Id
List of Annotation DB Objects
[]
Export annotation by document id
Payload object
{
"success": true,
"documentId": 0,
"objs": []
}
Accepts the following message:
Update collaboration by Id
Payload object
{
"collabId": 0,
"deleted": true
}
Accepts one of the following messages:
Refresh collaboration by Id
Collaboration DB Object
{
"collabId": 0,
"collabHash": "string",
"deleted": true
}
Start collaboration indicator with hash
Payload object
{
"collabId": 0,
"collabHash": "string"
}
Accepts one of the following messages:
Get comment by Id
Payload object
{
"commentId": 0
}
Update comment by Id (adding if commentId is not set, deleting if deleted is set to true)
Payload object
{
"commentId": 0,
"text": "string",
"deleted": true,
"tags": [
"string"
]
}
Get comment by document id
Payload object
{
"documentId": 0
}
Export comment by document id
Payload object
{
"documentId": 0
}
Accepts one of the following messages:
Export comment by document id
Payload object
{
"success": true,
"documentId": 0,
"objs": []
}
Refresh comment by Id
List of DB Comment Objects
[]
Accepts one of the following messages:
Get document by document id (triggers documentRefresh and documentFile for pdfs)
Payload object
{
"documentId": 0
}
Get all documents (only for admin) otherwise selected by user, only documentRefresh is triggered
Payload object, if userId is set, only documents of this user are returned (only for admin)
{
"userId": 0
}
Update document (if documentId is not set, a new document is created)
Payload object, document object with entries to update
{
"documentId": 0,
"deleted": true
}
Get document by hash (triggers documentRefresh)
Payload object
{
"documentHash": "string"
}
Get document data by document id (all data except file, e.g. annotations, comments, etc.)
Payload object
{
"documentId": 0
}
Publish document
Payload object
{
"documentId": 0
}
Receive updates for a document (e.g. annotations, comments)
Payload object
{
"documentId": 0
}
Don't receive updates for a document anymore
Payload object
{
"documentId": 0
}
Accepts one of the following messages:
Refresh document
List of DB document objects
[]
Receive requested document file
Payload object
{
"document": {},
"file": {}
}
Info about the published document after documentPublish
Payload object
{
"success": true,
"message": "string"
}
Accepts one of the following messages:
Add log (Env-Var LOGGING_ALLOW_FRONTEND must be set to "true")
Payload object
{
"level": "string",
"message": "string",
"meta": {}
}
Get all logs (only for admin)
Payload object
{
"limit": 0
}
Accepts the following message:
Receive requested logs
List of Log DB Objects
[]
Accepts one of the following messages:
Connect client to service
Payload object
{
"service": "string",
"data": {}
}
Disconnect client from service
Payload object
{
"service": "string",
"data": {}
}
Send a typical request to a available service
Payload object
{
"service": "string",
"data": {}
}
Send a command to a available service (can be used to trigger additional commands to a service)
Payload object
{
"service": "string",
"command": "string",
"data": {}
}
Accepts the following message:
Send information to frontend to refresh data of a service
Payload object
{
"service": "string",
"type": "string",
"data": {}
}
Accepts one of the following messages:
Get all settings overwritten by user settings
Get navigation elements showing in dashboard
Set setting as user (overwrites global setting, but not set it as global setting)
Payload object
{
"key": "string",
"value": "string"
}
Get all global settings (only for admin)
Save global settings (only for admin)
Payload object
[
{
"key": "string",
"value": "string"
}
]
Accepts one of the following messages:
Refresh settings
List of DB settings objects
[]
Dashboard navigation elements
Payload object
{
"groups": [
{}
],
"elements": [
{}
]
}
All settings
List of DB settings objects
[]
Accepts one of the following messages:
Add stats entry
Payload object
{
"action": "string",
"data": {}
}
Get stats by user
Payload object
{
"userId": 0
}
Get all stats
Accepts one of the following messages:
All stats by user
List of Stats DB Objects
[]
All stats
List of Stats DB Objects
[]
Accepts one of the following messages:
Get study by Id
Payload object
{
"studyId": 0
}
Get all studies (if user is admin, all studies will be returned or only studies of the user if userId is set)
Payload object
{
"userId": 0
}
Get study by hash
Payload object
{
"studyHash": "string"
}
Update study by Id (if study id is not set, a new study will be created)
Payload object (only the properties which should be updated are required)
{
"studyId": 0,
"deleted": true
}
Start study by Id (create a new study session and return studySessionId)
Payload object
{
"studyId": 0
}
Create a new study and return the study hash
Study object
{}
Accepts one of the following messages:
Study started response with study session id
Payload object
{
"success": true,
"studySessionId": 0
}
Study error response if hash request fails
Payload object
{
"message": "string",
"studyHash": "string"
}
Refresh studies
Payload object
[
{}
]
Study published response with study hash
Payload object
{
"success": true,
"message": "string",
"studyHash": "string"
}
Accepts one of the following messages:
Get study by sessionId or studyId
only one of the properties is required (studySessionId will be used if both are set)
{
"studySessionId": 0,
"studyId": 0
}
Get all study sessions (if user is admin, all study sessions will be returned or only study sessions of the user if userId is set)
Payload object
{
"userId": 0
}
Get study session by hash
Payload object
{
"studySessionHash": "string"
}
Update study session by Id (if study session id is not set, a new study session will be created, but withtout hash response - use studyStart instead)
Payload object (only the properties which should be updated are required)
{
"studySessionId": 0,
"deleted": true
}
Accepts one of the following messages:
Study session error response if hash request fails
Payload object
{
"message": "string",
"studySessionHash": "string"
}
Refresh study sessions
Payload object
[
{}
]
Accepts one of the following messages:
Get tag by Id
Payload object
{
"tagId": 0
}
Get all tags (only for admin) otherwise only the tags of the user
Get tag set by Id
Payload object
{
"tagSetId": 0
}
Get all tag sets (only for admin) otherwise only the tag sets of the user
Save tag set (if tagSetId is set, the tag set will be updated)
Payload object
{
"tagSetId": 0,
"tagSet": {},
"tags": [
{}
]
}
Publish tag set by Id
Payload object
{
"tagSetId": 0
}
Accepts one of the following messages:
Info about the published tag set after tagSetPublish
Payload object
{
"success": true,
"message": "string"
}
Refresh tags
List of DB Tag Objects
[]
Refresh tag sets
List of DB Tag Set Objects
[]
Accepts the following message:
Upload file
Payload object
{
"type": "string",
"name": "string",
"file": {}
}
Accepts the following message:
Upload result
Payload object
{
"success": true,
"documentId": 0
}
Accepts the following message:
Get all users (only for admin)
Accepts the following message:
Update all user data
Payload object
{
"success": true,
"users": []
}
Get annotation by Id
Payload object
Update annotation by id, Payload can have additional fields which wants to be set, Draft will be set to false!
Annotation DB Object
Get annotation by document id
Payload object
Export annotation by document id
Payload object
Update annotation by Id
List of Annotation DB Objects
Export annotation by document id
Payload object
Update collaboration by Id
Payload object
Refresh collaboration by Id
Collaboration DB Object
Start collaboration indicator with hash
Payload object
Get comment by Id
Payload object
Update comment by Id (adding if commentId is not set, deleting if deleted is set to true)
Payload object
Get comment by document id
Payload object
Export comment by document id
Payload object
Export comment by document id
Payload object
Refresh comment by Id
List of DB Comment Objects
Get document by document id (triggers documentRefresh and documentFile for pdfs)
Payload object
Get all documents (only for admin) otherwise selected by user, only documentRefresh is triggered
Payload object, if userId is set, only documents of this user are returned (only for admin)
Update document (if documentId is not set, a new document is created)
Payload object, document object with entries to update
Get document by hash (triggers documentRefresh)
Payload object
Get document data by document id (all data except file, e.g. annotations, comments, etc.)
Payload object
Publish document
Payload object
Receive updates for a document (e.g. annotations, comments)
Payload object
Don't receive updates for a document anymore
Payload object
Refresh document
List of DB document objects
Receive requested document file
Payload object
Info about the published document after documentPublish
Payload object
Add log (Env-Var LOGGING_ALLOW_FRONTEND must be set to "true")
Payload object
Get all logs (only for admin)
Payload object
Receive requested logs
List of Log DB Objects
Connect client to service
Payload object
Disconnect client from service
Payload object
Send a typical request to a available service
Payload object
Send a command to a available service (can be used to trigger additional commands to a service)
Payload object
Send information to frontend to refresh data of a service
Payload object
Get all settings overwritten by user settings
Set setting as user (overwrites global setting, but not set it as global setting)
Payload object
Get all global settings (only for admin)
Save global settings (only for admin)
Payload object
All settings
List of DB settings objects
Refresh settings
List of DB settings objects
Add stats entry
Payload object
Get all stats
All stats
List of Stats DB Objects
Get stats by user
Payload object
All stats by user
List of Stats DB Objects
Get study by Id
Payload object
Get all studies (if user is admin, all studies will be returned or only studies of the user if userId is set)
Payload object
Get study by hash
Payload object
Update study by Id (if study id is not set, a new study will be created)
Payload object (only the properties which should be updated are required)
Start study by Id (create a new study session and return studySessionId)
Payload object
Create a new study and return the study hash
Study object
Study started response with study session id
Payload object
Study error response if hash request fails
Payload object
Refresh studies
Payload object
Study published response with study hash
Payload object
Get study by sessionId or studyId
only one of the properties is required (studySessionId will be used if both are set)
Get all study sessions (if user is admin, all study sessions will be returned or only study sessions of the user if userId is set)
Payload object
Get study session by hash
Payload object
Update study session by Id (if study session id is not set, a new study session will be created, but withtout hash response - use studyStart instead)
Payload object (only the properties which should be updated are required)
Study session error response if hash request fails
Payload object
Refresh study sessions
Payload object
Get tag by Id
Payload object
Get tag set by Id
Payload object
Get all tag sets (only for admin) otherwise only the tag sets of the user
Get all tags (only for admin) otherwise only the tags of the user
Save tag set (if tagSetId is set, the tag set will be updated)
Payload object
Publish tag set by Id
Payload object
Refresh tag sets
List of DB Tag Set Objects
Refresh tags
List of DB Tag Objects
Info about the published tag set after tagSetPublish
Payload object
Upload file
Payload object
Upload result
Payload object
Get all users (only for admin)
Update all user data
Payload object
id of a user
id of the document
id of the tag
id of the tag set
id of the annotation
id of the comment
id of the collaboration
type of the collaboration target
id of the collaboration target
unique hash of the collaboration
unique hash of a document
id of a study
unique hash of a study
id of a study session
unique hash of a study session