Backend Socket.io description 1.0.0

This is the websocket backend API. It is used to communicate between frontend and backend.

Servers

  • http://localhost:3001wssbroker

    Backend websocket server

Operations

  • PUB annotation

    Accepts one of the following messages:

    • #0Get annotationannotationGet

      Get annotation by Id

      object

      Payload object

      Examples

    • #1Update annotationannotationUpdate

      Update annotation by id, Payload can have additional fields which wants to be set, Draft will be set to false!

      object

      Annotation DB Object

      Examples

    • #2Get annotation by document idannotationGetByDocument

      Get annotation by document id

      object

      Payload object

      Examples

    • #3Export annotation by document idannotationExportByDocument

      Export annotation by document id

      object

      Payload object

      Examples

  • SUB annotation

    Accepts one of the following messages:

    • #0Update annotationannotationRefresh

      Update annotation by Id

      array<any>

      List of Annotation DB Objects

      Examples

    • #1Export annotationannotationExport

      Export annotation by document id

      object

      Payload object

      Examples

  • PUB collab

    Accepts the following message:

    Update collaborationcollabUpdate

    Update collaboration by Id

    object

    Payload object

    Examples

  • SUB collab

    Accepts one of the following messages:

    • #0Refresh collaborationcollabRefresh

      Refresh collaboration by Id

      object

      Collaboration DB Object

      Examples

    • #1Start collaboration indicatorcollabStart

      Start collaboration indicator with hash

      object

      Payload object

      Examples

  • PUB comment

    Accepts one of the following messages:

    • #0Get commentcommentGet

      Get comment by Id

      object

      Payload object

      Examples

    • #1Update commentcommentUpdate

      Update comment by Id (adding if commentId is not set, deleting if deleted is set to true)

      object

      Payload object

      Examples

    • #2Get comment by document idcommentGetByDocument

      Get comment by document id

      object

      Payload object

      Examples

    • #3Export comment by document idcommentExportByDocument

      Export comment by document id

      object

      Payload object

      Examples

  • SUB comment

    Accepts one of the following messages:

    • #0Export commentcommentExport

      Export comment by document id

      object

      Payload object

      Examples

    • #1Refresh commentscommentRefresh

      Refresh comment by Id

      array<any>

      List of DB Comment Objects

      Examples

  • PUB document

    Accepts one of the following messages:

    • #0Get documentdocumentGet

      Get document by document id (triggers documentRefresh and documentFile for pdfs)

      object

      Payload object

      Examples

    • #1Get all documents available by userdocumentGetAll

      Get all documents (only for admin) otherwise selected by user, only documentRefresh is triggered

      object

      Payload object, if userId is set, only documents of this user are returned (only for admin)

      Examples

    • #2Update documentdocumentUpdate

      Update document (if documentId is not set, a new document is created)

      object

      Payload object, document object with entries to update

      Examples

    • #3Get document by hashdocumentGetByHash

      Get document by hash (triggers documentRefresh)

      object

      Payload object

      Examples

    • #4Get document datadocumentGetData

      Get document data by document id (all data except file, e.g. annotations, comments, etc.)

      object

      Payload object

      Examples

    • #5Publish documentdocumentPublish

      Publish document

      object

      Payload object

      Examples

    • #6Subscribe to a documentdocumentSubscribe

      Receive updates for a document (e.g. annotations, comments)

      object

      Payload object

      Examples

    • #7Unsubscribe from a documentdocumentUnsubscribe

      Don't receive updates for a document anymore

      object

      Payload object

      Examples

  • SUB document

    Accepts one of the following messages:

    • #0Refresh documentdocumentRefresh

      Refresh document

      array<any>

      List of DB document objects

      Examples

    • #1Receive document filedocumentFile

      Receive requested document file

      object

      Payload object

      Examples

    • #2Published documentdocumentPublished

      Info about the published document after documentPublish

      object

      Payload object

      Examples

  • PUB log

    Accepts one of the following messages:

    • #0Add loglog

      Add log (Env-Var LOGGING_ALLOW_FRONTEND must be set to "true")

      object

      Payload object

      Examples

    • #1Get all logslogGetAll

      Get all logs (only for admin)

      object

      Payload object

      Examples

  • SUB log

    Accepts the following message:

    All logslogAll

    Receive requested logs

    array<any>

    List of Log DB Objects

    Examples

  • PUB service

    Accepts one of the following messages:

    • #0Connect serviceserviceConnect

      Connect client to service

      object

      Payload object

      Examples

    • #1Disconnect serviceserviceDisconnect

      Disconnect client from service

      object

      Payload object

      Examples

    • #2Send request to a serviceserviceRequest

      Send a typical request to a available service

      object

      Payload object

      Examples

    • #3Send command to a serviceserviceCommand

      Send a command to a available service (can be used to trigger additional commands to a service)

      object

      Payload object

      Examples

  • SUB service

    Accepts the following message:

    Refresh data of a service in frontendserviceRefresh

    Send information to frontend to refresh data of a service

    object

    Payload object

    Examples

  • PUB setting

    Accepts one of the following messages:

    • #0Get all settingssettingGetAll

      Get all settings overwritten by user settings

      Examples

    • #1Get navigation elements for dashboardsettingGetNavigation

      Get navigation elements showing in dashboard

      Examples

    • #2Set settingsettingSet

      Set setting as user (overwrites global setting, but not set it as global setting)

      object

      Payload object

      Examples

    • #3Get all settingssettingGetData

      Get all global settings (only for admin)

      Examples

    • #4Save global settingssettingSave

      Save global settings (only for admin)

      array<object>

      Payload object

      Examples

  • SUB setting

    Accepts one of the following messages:

    • #0Refresh settingssettingRefresh

      Refresh settings

      array<any>

      List of DB settings objects

      Examples

    • #1Navigation elementssettingNavigation

      Dashboard navigation elements

      object

      Payload object

      Examples

    • #2All settingssettingData

      All settings

      array<any>

      List of DB settings objects

      Examples

  • PUB statistic

    Accepts one of the following messages:

    • #0Add statsstats

      Add stats entry

      object

      Payload object

      Examples

    • #1Get stats by userstatsGetByUser

      Get stats by user

      object

      Payload object

      Examples

    • #2Get all statsstatsGetAll

      Get all stats

      Examples

  • SUB statistic

    Accepts one of the following messages:

    • #0All stats by userstatsDataByUser

      All stats by user

      array<any>

      List of Stats DB Objects

      Examples

    • #1All statsstatsData

      All stats

      array<any>

      List of Stats DB Objects

      Examples

  • PUB study

    Accepts one of the following messages:

    • #0Get studystudyGet

      Get study by Id

      object

      Payload object

      Examples

    • #1Get all studiesstudyGetAll

      Get all studies (if user is admin, all studies will be returned or only studies of the user if userId is set)

      object

      Payload object

      Examples

    • #2Get study by hashstudyGetByHash

      Get study by hash

      object

      Payload object

      Examples

    • #3Update studystudyUpdate

      Update study by Id (if study id is not set, a new study will be created)

      object

      Payload object (only the properties which should be updated are required)

      Examples

    • #4Start studystudyStart

      Start study by Id (create a new study session and return studySessionId)

      object

      Payload object

      Examples

    • #5Publish studystudyPublish

      Create a new study and return the study hash

      object

      Study object

      Examples

  • SUB study

    Accepts one of the following messages:

    • #0Study started responsestudyStarted

      Study started response with study session id

      object

      Payload object

      Examples

    • #1Study error responsestudyError

      Study error response if hash request fails

      object

      Payload object

      Examples

    • #2Refresh studiesstudyRefresh

      Refresh studies

      array<object>

      Payload object

      Examples

    • #3Study published responsestudyPublished

      Study published response with study hash

      object

      Payload object

      Examples

  • PUB studySession

    Accepts one of the following messages:

    • #0Get study sessionstudySessionGet

      Get study by sessionId or studyId

      object

      only one of the properties is required (studySessionId will be used if both are set)

      Examples

    • #1Get all study sessionsstudySessionGetAll

      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)

      object

      Payload object

      Examples

    • #2Get study session by hashstudySessionGetByHash

      Get study session by hash

      object

      Payload object

      Examples

    • #3Update study sessionstudySessionUpdate

      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)

      object

      Payload object (only the properties which should be updated are required)

      Examples

  • SUB studySession

    Accepts one of the following messages:

    • #0Study session error responsestudySessionError

      Study session error response if hash request fails

      object

      Payload object

      Examples

    • #1Refresh study sessionsstudySessionRefresh

      Refresh study sessions

      array<object>

      Payload object

      Examples

  • PUB tag

    Accepts one of the following messages:

    • #0Get tagtagGet

      Get tag by Id

      object

      Payload object

      Examples

    • #1Get all tagstagGetAll

      Get all tags (only for admin) otherwise only the tags of the user

      Examples

    • #2Get tag settagSetGet

      Get tag set by Id

      object

      Payload object

      Examples

    • #3Get all tag setstagSetGetAll

      Get all tag sets (only for admin) otherwise only the tag sets of the user

      Examples

    • #4Save tag settagSetUpdate

      Save tag set (if tagSetId is set, the tag set will be updated)

      object

      Payload object

      Examples

    • #5Publish tag settagSetPublish

      Publish tag set by Id

      object

      Payload object

      Examples

  • SUB tag

    Accepts one of the following messages:

    • #0Published tag settagSetPublished

      Info about the published tag set after tagSetPublish

      object

      Payload object

      Examples

    • #1Refresh tagstagRefresh

      Refresh tags

      array<any>

      List of DB Tag Objects

      Examples

    • #2Refresh tag setstagSetRefresh

      Refresh tag sets

      array<any>

      List of DB Tag Set Objects

      Examples

  • PUB upload

    Accepts the following message:

    Upload fileuploadFile

    Upload file

    object

    Payload object

    Examples

  • SUB upload

    Accepts the following message:

    Upload resultuploadResult

    Upload result

    object

    Payload object

    Examples

  • PUB user

    Accepts the following message:

    Get all usersuserGetData

    Get all users (only for admin)

    Examples

  • SUB user

    Accepts the following message:

    All user datauserData

    Update all user data

    object

    Payload object

    Examples

Messages

  • #1Get annotationannotationGet

    Get annotation by Id

    object

    Payload object

  • #2Update annotationannotationUpdate

    Update annotation by id, Payload can have additional fields which wants to be set, Draft will be set to false!

    object

    Annotation DB Object

  • #3Get annotation by document idannotationGetByDocument

    Get annotation by document id

    object

    Payload object

  • #4Export annotation by document idannotationExportByDocument

    Export annotation by document id

    object

    Payload object

  • #5Update annotationannotationRefresh

    Update annotation by Id

    array<any>

    List of Annotation DB Objects

  • #6Export annotationannotationExport

    Export annotation by document id

    object

    Payload object

  • #7Update collaborationcollabUpdate

    Update collaboration by Id

    object

    Payload object

  • #8Refresh collaborationcollabRefresh

    Refresh collaboration by Id

    object

    Collaboration DB Object

  • #9Start collaboration indicatorcollabStart

    Start collaboration indicator with hash

    object

    Payload object

  • #10Get commentcommentGet

    Get comment by Id

    object

    Payload object

  • #11Update commentcommentUpdate

    Update comment by Id (adding if commentId is not set, deleting if deleted is set to true)

    object

    Payload object

  • #12Get comment by document idcommentGetByDocument

    Get comment by document id

    object

    Payload object

  • #13Export comment by document idcommentExportByDocument

    Export comment by document id

    object

    Payload object

  • #14Export commentcommentExport

    Export comment by document id

    object

    Payload object

  • #15Refresh commentscommentRefresh

    Refresh comment by Id

    array<any>

    List of DB Comment Objects

  • #16Get documentdocumentGet

    Get document by document id (triggers documentRefresh and documentFile for pdfs)

    object

    Payload object

  • #17Get all documents available by userdocumentGetAll

    Get all documents (only for admin) otherwise selected by user, only documentRefresh is triggered

    object

    Payload object, if userId is set, only documents of this user are returned (only for admin)

  • #18Update documentdocumentUpdate

    Update document (if documentId is not set, a new document is created)

    object

    Payload object, document object with entries to update

  • #19Get document by hashdocumentGetByHash

    Get document by hash (triggers documentRefresh)

    object

    Payload object

  • #20Get document datadocumentGetData

    Get document data by document id (all data except file, e.g. annotations, comments, etc.)

    object

    Payload object

  • #21Publish documentdocumentPublish

    Publish document

    object

    Payload object

  • #22Subscribe to a documentdocumentSubscribe

    Receive updates for a document (e.g. annotations, comments)

    object

    Payload object

  • #23Unsubscribe from a documentdocumentUnsubscribe

    Don't receive updates for a document anymore

    object

    Payload object

  • #24Refresh documentdocumentRefresh

    Refresh document

    array<any>

    List of DB document objects

  • #25Receive document filedocumentFile

    Receive requested document file

    object

    Payload object

  • #26Published documentdocumentPublished

    Info about the published document after documentPublish

    object

    Payload object

  • #27Add loglog

    Add log (Env-Var LOGGING_ALLOW_FRONTEND must be set to "true")

    object

    Payload object

  • #28Get all logslogGetAll

    Get all logs (only for admin)

    object

    Payload object

  • #29All logslogAll

    Receive requested logs

    array<any>

    List of Log DB Objects

  • #30Connect serviceserviceConnect

    Connect client to service

    object

    Payload object

  • #31Disconnect serviceserviceDisconnect

    Disconnect client from service

    object

    Payload object

  • #32Send request to a serviceserviceRequest

    Send a typical request to a available service

    object

    Payload object

  • #33Send command to a serviceserviceCommand

    Send a command to a available service (can be used to trigger additional commands to a service)

    object

    Payload object

  • #34Refresh data of a service in frontendserviceRefresh

    Send information to frontend to refresh data of a service

    object

    Payload object

  • #35Get all settingssettingGetAll

    Get all settings overwritten by user settings

  • #36Get navigation elements for dashboardsettingGetNavigation

    Get navigation elements showing in dashboard

  • #37Set settingsettingSet

    Set setting as user (overwrites global setting, but not set it as global setting)

    object

    Payload object

  • #38Get all settingssettingGetData

    Get all global settings (only for admin)

  • #39Save global settingssettingSave

    Save global settings (only for admin)

    array<object>

    Payload object

  • #40All settingssettingData

    All settings

    array<any>

    List of DB settings objects

  • #41Navigation elementssettingNavigation

    Dashboard navigation elements

    object

    Payload object

  • #42Refresh settingssettingRefresh

    Refresh settings

    array<any>

    List of DB settings objects

  • #43Add statsstats

    Add stats entry

    object

    Payload object

  • #44Get all statsstatsGetAll

    Get all stats

  • #45All statsstatsData

    All stats

    array<any>

    List of Stats DB Objects

  • #46Get stats by userstatsGetByUser

    Get stats by user

    object

    Payload object

  • #47All stats by userstatsDataByUser

    All stats by user

    array<any>

    List of Stats DB Objects

  • #48Get studystudyGet

    Get study by Id

    object

    Payload object

  • #49Get all studiesstudyGetAll

    Get all studies (if user is admin, all studies will be returned or only studies of the user if userId is set)

    object

    Payload object

  • #50Get study by hashstudyGetByHash

    Get study by hash

    object

    Payload object

  • #51Update studystudyUpdate

    Update study by Id (if study id is not set, a new study will be created)

    object

    Payload object (only the properties which should be updated are required)

  • #52Start studystudyStart

    Start study by Id (create a new study session and return studySessionId)

    object

    Payload object

  • #53Publish studystudyPublish

    Create a new study and return the study hash

    object

    Study object

  • #54Study started responsestudyStarted

    Study started response with study session id

    object

    Payload object

  • #55Study error responsestudyError

    Study error response if hash request fails

    object

    Payload object

  • #56Refresh studiesstudyRefresh

    Refresh studies

    array<object>

    Payload object

  • #57Study published responsestudyPublished

    Study published response with study hash

    object

    Payload object

  • #58Get study sessionstudySessionGet

    Get study by sessionId or studyId

    object

    only one of the properties is required (studySessionId will be used if both are set)

  • #59Get all study sessionsstudySessionGetAll

    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)

    object

    Payload object

  • #60Get study session by hashstudySessionGetByHash

    Get study session by hash

    object

    Payload object

  • #61Update study sessionstudySessionUpdate

    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)

    object

    Payload object (only the properties which should be updated are required)

  • #62Study session error responsestudySessionError

    Study session error response if hash request fails

    object

    Payload object

  • #63Refresh study sessionsstudySessionRefresh

    Refresh study sessions

    array<object>

    Payload object

  • #64Get tagtagGet

    Get tag by Id

    object

    Payload object

  • #65Get tag settagSetGet

    Get tag set by Id

    object

    Payload object

  • #66Get all tag setstagSetGetAll

    Get all tag sets (only for admin) otherwise only the tag sets of the user

  • #67Get all tagstagGetAll

    Get all tags (only for admin) otherwise only the tags of the user

  • #68Save tag settagSetUpdate

    Save tag set (if tagSetId is set, the tag set will be updated)

    object

    Payload object

  • #69Publish tag settagSetPublish

    Publish tag set by Id

    object

    Payload object

  • #70Refresh tag setstagSetRefresh

    Refresh tag sets

    array<any>

    List of DB Tag Set Objects

  • #71Refresh tagstagRefresh

    Refresh tags

    array<any>

    List of DB Tag Objects

  • #72Published tag settagSetPublished

    Info about the published tag set after tagSetPublish

    object

    Payload object

  • #73Upload fileuploadFile

    Upload file

    object

    Payload object

  • #74Upload resultuploadResult

    Upload result

    object

    Payload object

  • #75Get all usersuserGetData

    Get all users (only for admin)

  • #76All user datauserData

    Update all user data

    object

    Payload object

Schemas

  • userId
    integer
    uid: userId

    id of a user

  • documentId
    integer
    uid: documentId

    id of the document

  • tagId
    integer
    uid: tagId

    id of the tag

  • tagSetId
    integer
    uid: tagSetId

    id of the tag set

  • annotationId
    integer
    uid: annotationId

    id of the annotation

  • commentId
    integer
    uid: commentId

    id of the comment

  • collabId
    integer
    uid: collabId

    id of the collaboration

  • collabTargetType
    string
    uid: collabTargetType

    type of the collaboration target

  • collabTargetId
    integer
    uid: collabTargetId

    id of the collaboration target

  • collabHash
    string
    uid: collabHash

    unique hash of the collaboration

  • documentHash
    string
    uid: documentHash

    unique hash of a document

  • studyId
    integer
    uid: studyId

    id of a study

  • studyHash
    string
    uid: studyHash

    unique hash of a study

  • studySessionId
    integer
    uid: studySessionId

    id of a study session

  • studySessionHash
    string
    uid: studySessionHash

    unique hash of a study session