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

  • RECEIVE annotation

    Operation IDpublish

    Available only on servers:

    Accepts one of the following messages:

    • #0Get annotation

      Get annotation by Id

      object

      Payload object

      Examples

    • #1Update annotation

      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 id

      Get annotation by document id

      object

      Payload object

      Examples

    • #3Export annotation by document id

      Export annotation by document id

      object

      Payload object

      Examples

  • SEND annotation

    Operation IDsubscribe

    Available only on servers:

    Accepts one of the following messages:

    • #0Update annotation

      Update annotation by Id

      array<any>

      List of Annotation DB Objects

      Examples

    • #1Export annotation

      Export annotation by document id

      object

      Payload object

      Examples

  • RECEIVE collab

    Operation IDpublish

    Available only on servers:

    Accepts the following message:

    Update collaboration

    Update collaboration by Id

    object

    Payload object

    Examples

  • SEND collab

    Operation IDsubscribe

    Available only on servers:

    Accepts one of the following messages:

    • #0Refresh collaboration

      Refresh collaboration by Id

      object

      Collaboration DB Object

      Examples

    • #1Start collaboration indicator

      Start collaboration indicator with hash

      object

      Payload object

      Examples

  • RECEIVE comment

    Operation IDpublish

    Available only on servers:

    Accepts one of the following messages:

    • #0Get comment

      Get comment by Id

      object

      Payload object

      Examples

    • #1Update comment

      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 id

      Get comment by document id

      object

      Payload object

      Examples

    • #3Export comment by document id

      Export comment by document id

      object

      Payload object

      Examples

  • SEND comment

    Operation IDsubscribe

    Available only on servers:

    Accepts one of the following messages:

    • #0Export comment

      Export comment by document id

      object

      Payload object

      Examples

    • #1Refresh comments

      Refresh comment by Id

      array<any>

      List of DB Comment Objects

      Examples

  • RECEIVE document

    Operation IDpublish

    Available only on servers:

    Accepts one of the following messages:

    • #0Get document

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

      object

      Payload object

      Examples

    • #1Get all documents available by user

      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 document

      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 hash

      Get document by hash (triggers documentRefresh)

      object

      Payload object

      Examples

    • #4Get document data

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

      object

      Payload object

      Examples

    • #5Publish document

      Publish document

      object

      Payload object

      Examples

    • #6Subscribe to a document

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

      object

      Payload object

      Examples

    • #7Unsubscribe from a document

      Don't receive updates for a document anymore

      object

      Payload object

      Examples

  • SEND document

    Operation IDsubscribe

    Available only on servers:

    Accepts one of the following messages:

    • #0Refresh document

      Refresh document

      array<any>

      List of DB document objects

      Examples

    • #1Receive document file

      Receive requested document file

      object

      Payload object

      Examples

    • #2Published document

      Info about the published document after documentPublish

      object

      Payload object

      Examples

  • RECEIVE log

    Operation IDpublish

    Available only on servers:

    Accepts one of the following messages:

    • #0Add log

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

      object

      Payload object

      Examples

    • #1Get all logs

      Get all logs (only for admin)

      object

      Payload object

      Examples

  • SEND log

    Operation IDsubscribe

    Available only on servers:

    Accepts the following message:

    All logs

    Receive requested logs

    array<any>

    List of Log DB Objects

    Examples

  • RECEIVE service

    Operation IDpublish

    Available only on servers:

    Accepts one of the following messages:

    • #0Connect service

      Connect client to service

      object

      Payload object

      Examples

    • #1Disconnect service

      Disconnect client from service

      object

      Payload object

      Examples

    • #2Send request to a service

      Send a typical request to a available service

      object

      Payload object

      Examples

    • #3Send command to a service

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

      object

      Payload object

      Examples

  • SEND service

    Operation IDsubscribe

    Available only on servers:

    Accepts the following message:

    Refresh data of a service in frontend

    Send information to frontend to refresh data of a service

    object

    Payload object

    Examples

  • RECEIVE setting

    Operation IDpublish

    Available only on servers:

    Accepts one of the following messages:

    • #0Get all settings

      Get all settings overwritten by user settings

      Examples

    • #1Get navigation elements for dashboard

      Get navigation elements showing in dashboard

      Examples

    • #2Set setting

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

      object

      Payload object

      Examples

    • #3Get all settings

      Get all global settings (only for admin)

      Examples

    • #4Save global settings

      Save global settings (only for admin)

      array<object>

      Payload object

      Examples

  • SEND setting

    Operation IDsubscribe

    Available only on servers:

    Accepts one of the following messages:

    • #0Refresh settings

      Refresh settings

      array<any>

      List of DB settings objects

      Examples

    • #1Navigation elements

      Dashboard navigation elements

      object

      Payload object

      Examples

    • #2All settings

      All settings

      array<any>

      List of DB settings objects

      Examples

  • RECEIVE statistic

    Operation IDpublish

    Available only on servers:

    Accepts one of the following messages:

    • #0Add stats

      Add stats entry

      object

      Payload object

      Examples

    • #1Get stats by user

      Get stats by user

      object

      Payload object

      Examples

    • #2Get all stats

      Get all stats

      Examples

  • SEND statistic

    Operation IDsubscribe

    Available only on servers:

    Accepts one of the following messages:

    • #0All stats by user

      All stats by user

      array<any>

      List of Stats DB Objects

      Examples

    • #1All stats

      All stats

      array<any>

      List of Stats DB Objects

      Examples

  • RECEIVE study

    Operation IDpublish

    Available only on servers:

    Accepts one of the following messages:

    • #0Get study

      Get study by Id

      object

      Payload object

      Examples

    • #1Get all studies

      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 hash

      Get study by hash

      object

      Payload object

      Examples

    • #3Update study

      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 study

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

      object

      Payload object

      Examples

    • #5Publish study

      Create a new study and return the study hash

      object

      Study object

      Examples

  • SEND study

    Operation IDsubscribe

    Available only on servers:

    Accepts one of the following messages:

    • #0Study started response

      Study started response with study session id

      object

      Payload object

      Examples

    • #1Study error response

      Study error response if hash request fails

      object

      Payload object

      Examples

    • #2Refresh studies

      Refresh studies

      array<object>

      Payload object

      Examples

    • #3Study published response

      Study published response with study hash

      object

      Payload object

      Examples

  • RECEIVE studySession

    Operation IDpublish

    Available only on servers:

    Accepts one of the following messages:

    • #0Get study session

      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 sessions

      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 hash

      Get study session by hash

      object

      Payload object

      Examples

    • #3Update study session

      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

  • SEND studySession

    Operation IDsubscribe

    Available only on servers:

    Accepts one of the following messages:

    • #0Study session error response

      Study session error response if hash request fails

      object

      Payload object

      Examples

    • #1Refresh study sessions

      Refresh study sessions

      array<object>

      Payload object

      Examples

  • RECEIVE tag

    Operation IDpublish

    Available only on servers:

    Accepts one of the following messages:

    • #0Get tag

      Get tag by Id

      object

      Payload object

      Examples

    • #1Get all tags

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

      Examples

    • #2Get tag set

      Get tag set by Id

      object

      Payload object

      Examples

    • #3Get all tag sets

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

      Examples

    • #4Save tag set

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

      object

      Payload object

      Examples

    • #5Publish tag set

      Publish tag set by Id

      object

      Payload object

      Examples

  • SEND tag

    Operation IDsubscribe

    Available only on servers:

    Accepts one of the following messages:

    • #0Published tag set

      Info about the published tag set after tagSetPublish

      object

      Payload object

      Examples

    • #1Refresh tags

      Refresh tags

      array<any>

      List of DB Tag Objects

      Examples

    • #2Refresh tag sets

      Refresh tag sets

      array<any>

      List of DB Tag Set Objects

      Examples

  • RECEIVE upload

    Operation IDpublish

    Available only on servers:

    Accepts the following message:

    Upload file

    Upload file

    object

    Payload object

    Examples

  • SEND upload

    Operation IDsubscribe

    Available only on servers:

    Accepts the following message:

    Upload result

    Upload result

    object

    Payload object

    Examples

  • RECEIVE user

    Operation IDpublish

    Available only on servers:

    Accepts the following message:

    Get all users

    Get all users (only for admin)

    Examples

  • SEND user

    Operation IDsubscribe

    Available only on servers:

    Accepts the following message:

    All user data

    Update all user data

    object

    Payload object

    Examples

Messages

  • #1Get annotationannotationGet

    Get annotation by Id

    Message IDannotationGet
    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!

    Message IDannotationUpdate
    object

    Annotation DB Object

  • #3Get annotation by document idannotationGetByDocument

    Get annotation by document id

    Message IDannotationGetByDocument
    object

    Payload object

  • #4Export annotation by document idannotationExportByDocument

    Export annotation by document id

    Message IDannotationExportByDocument
    object

    Payload object

  • #5Update annotationannotationRefresh

    Update annotation by Id

    Message IDannotationRefresh
    array<any>

    List of Annotation DB Objects

  • #6Export annotationannotationExport

    Export annotation by document id

    Message IDannotationExport
    object

    Payload object

  • #7Update collaborationcollabUpdate

    Update collaboration by Id

    Message IDcollabUpdate
    object

    Payload object

  • #8Refresh collaborationcollabRefresh

    Refresh collaboration by Id

    Message IDcollabRefresh
    object

    Collaboration DB Object

  • #9Start collaboration indicatorcollabStart

    Start collaboration indicator with hash

    Message IDcollabStart
    object

    Payload object

  • #10Get commentcommentGet

    Get comment by Id

    Message IDcommentGet
    object

    Payload object

  • #11Update commentcommentUpdate

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

    Message IDcommentUpdate
    object

    Payload object

  • #12Get comment by document idcommentGetByDocument

    Get comment by document id

    Message IDcommentGetByDocument
    object

    Payload object

  • #13Export comment by document idcommentExportByDocument

    Export comment by document id

    Message IDcommentExportByDocument
    object

    Payload object

  • #14Export commentcommentExport

    Export comment by document id

    Message IDcommentExport
    object

    Payload object

  • #15Refresh commentscommentRefresh

    Refresh comment by Id

    Message IDcommentRefresh
    array<any>

    List of DB Comment Objects

  • #16Get documentdocumentGet

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

    Message IDdocumentGet
    object

    Payload object

  • #17Get all documents available by userdocumentGetAll

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

    Message IDdocumentGetAll
    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)

    Message IDdocumentUpdate
    object

    Payload object, document object with entries to update

  • #19Get document by hashdocumentGetByHash

    Get document by hash (triggers documentRefresh)

    Message IDdocumentGetByHash
    object

    Payload object

  • #20Get document datadocumentGetData

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

    Message IDdocumentGetData
    object

    Payload object

  • #21Publish documentdocumentPublish

    Publish document

    Message IDdocumentPublish
    object

    Payload object

  • #22Subscribe to a documentdocumentSubscribe

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

    Message IDdocumentSubscribe
    object

    Payload object

  • #23Unsubscribe from a documentdocumentUnsubscribe

    Don't receive updates for a document anymore

    Message IDdocumentUnsubscribe
    object

    Payload object

  • #24Refresh documentdocumentRefresh

    Refresh document

    Message IDdocumentRefresh
    array<any>

    List of DB document objects

  • #25Receive document filedocumentFile

    Receive requested document file

    Message IDdocumentFile
    object

    Payload object

  • #26Published documentdocumentPublished

    Info about the published document after documentPublish

    Message IDdocumentPublished
    object

    Payload object

  • #27Add loglog

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

    Message IDlog
    object

    Payload object

  • #28Get all logslogGetAll

    Get all logs (only for admin)

    Message IDlogGetAll
    object

    Payload object

  • #29All logslogAll

    Receive requested logs

    Message IDlogAll
    array<any>

    List of Log DB Objects

  • #30Connect serviceserviceConnect

    Connect client to service

    Message IDserviceConnect
    object

    Payload object

  • #31Disconnect serviceserviceDisconnect

    Disconnect client from service

    Message IDserviceDisconnect
    object

    Payload object

  • #32Send request to a serviceserviceRequest

    Send a typical request to a available service

    Message IDserviceRequest
    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)

    Message IDserviceCommand
    object

    Payload object

  • #34Refresh data of a service in frontendserviceRefresh

    Send information to frontend to refresh data of a service

    Message IDserviceRefresh
    object

    Payload object

  • #35Get all settingssettingGetAll

    Get all settings overwritten by user settings

    Message IDsettingGetAll
  • #36Get navigation elements for dashboardsettingGetNavigation

    Get navigation elements showing in dashboard

    Message IDsettingGetNavigation
  • #37Set settingsettingSet

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

    Message IDsettingSet
    object

    Payload object

  • #38Get all settingssettingGetData

    Get all global settings (only for admin)

    Message IDsettingGetData
  • #39Save global settingssettingSave

    Save global settings (only for admin)

    Message IDsettingSave
    array<object>

    Payload object

  • #40All settingssettingData

    All settings

    Message IDsettingData
    array<any>

    List of DB settings objects

  • #41Navigation elementssettingNavigation

    Dashboard navigation elements

    Message IDsettingNavigation
    object

    Payload object

  • #42Refresh settingssettingRefresh

    Refresh settings

    Message IDsettingRefresh
    array<any>

    List of DB settings objects

  • #43Add statsstats

    Add stats entry

    Message IDstats
    object

    Payload object

  • #44Get all statsstatsGetAll

    Get all stats

    Message IDstatsGetAll
  • #45All statsstatsData

    All stats

    Message IDstatsData
    array<any>

    List of Stats DB Objects

  • #46Get stats by userstatsGetByUser

    Get stats by user

    Message IDstatsGetByUser
    object

    Payload object

  • #47All stats by userstatsDataByUser

    All stats by user

    Message IDstatsDataByUser
    array<any>

    List of Stats DB Objects

  • #48Get studystudyGet

    Get study by Id

    Message IDstudyGet
    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)

    Message IDstudyGetAll
    object

    Payload object

  • #50Get study by hashstudyGetByHash

    Get study by hash

    Message IDstudyGetByHash
    object

    Payload object

  • #51Update studystudyUpdate

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

    Message IDstudyUpdate
    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)

    Message IDstudyStart
    object

    Payload object

  • #53Publish studystudyPublish

    Create a new study and return the study hash

    Message IDstudyPublish
    object

    Study object

  • #54Study started responsestudyStarted

    Study started response with study session id

    Message IDstudyStarted
    object

    Payload object

  • #55Study error responsestudyError

    Study error response if hash request fails

    Message IDstudyError
    object

    Payload object

  • #56Refresh studiesstudyRefresh

    Refresh studies

    Message IDstudyRefresh
    array<object>

    Payload object

  • #57Study published responsestudyPublished

    Study published response with study hash

    Message IDstudyPublished
    object

    Payload object

  • #58Get study sessionstudySessionGet

    Get study by sessionId or studyId

    Message IDstudySessionGet
    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)

    Message IDstudySessionGetAll
    object

    Payload object

  • #60Get study session by hashstudySessionGetByHash

    Get study session by hash

    Message IDstudySessionGetByHash
    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)

    Message IDstudySessionUpdate
    object

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

  • #62Study session error responsestudySessionError

    Study session error response if hash request fails

    Message IDstudySessionError
    object

    Payload object

  • #63Refresh study sessionsstudySessionRefresh

    Refresh study sessions

    Message IDstudySessionRefresh
    array<object>

    Payload object

  • #64Get tagtagGet

    Get tag by Id

    Message IDtagGet
    object

    Payload object

  • #65Get tag settagSetGet

    Get tag set by Id

    Message IDtagSetGet
    object

    Payload object

  • #66Get all tag setstagSetGetAll

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

    Message IDtagSetGetAll
  • #67Get all tagstagGetAll

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

    Message IDtagGetAll
  • #68Save tag settagSetUpdate

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

    Message IDtagSetUpdate
    object

    Payload object

  • #69Publish tag settagSetPublish

    Publish tag set by Id

    Message IDtagSetPublish
    object

    Payload object

  • #70Refresh tag setstagSetRefresh

    Refresh tag sets

    Message IDtagSetRefresh
    array<any>

    List of DB Tag Set Objects

  • #71Refresh tagstagRefresh

    Refresh tags

    Message IDtagRefresh
    array<any>

    List of DB Tag Objects

  • #72Published tag settagSetPublished

    Info about the published tag set after tagSetPublish

    Message IDtagSetPublished
    object

    Payload object

  • #73Upload fileuploadFile

    Upload file

    Message IDuploadFile
    object

    Payload object

  • #74Upload resultuploadResult

    Upload result

    Message IDuploadResult
    object

    Payload object

  • #75Get all usersuserGetData

    Get all users (only for admin)

    Message IDuserGetData
  • #76All user datauserData

    Update all user data

    Message IDuserData
    object

    Payload object

Schemas

  • userId
    integer

    id of a user

  • documentId
    integer

    id of the document

  • tagId
    integer

    id of the tag

  • tagSetId
    integer

    id of the tag set

  • annotationId
    integer

    id of the annotation

  • commentId
    integer

    id of the comment

  • collabId
    integer

    id of the collaboration

  • collabTargetType
    string

    type of the collaboration target

  • collabTargetId
    integer

    id of the collaboration target

  • collabHash
    string

    unique hash of the collaboration

  • documentHash
    string

    unique hash of a document

  • studyId
    integer

    id of a study

  • studyHash
    string

    unique hash of a study

  • studySessionId
    integer

    id of a study session

  • studySessionHash
    string

    unique hash of a study session