Skip to content
This repository has been archived by the owner on Aug 10, 2024. It is now read-only.
mister-proger edited this page Dec 15, 2023 · 15 revisions

Welcome to the documentation on the external API of RTCD servers!

All documentation on the development and work with RTCD servers lies in three categories. The first is the commands that the server receives from clients directly during communication. The second is the notification commands that the server receives from external servers. The third is an internal API for working with repositories and/or notifying central servers.

If you wish to contribute to the development, please also supplement the corresponding table.

Start

Entry point

  • WebSockets -> ws://<?>?<KEY 1>=<VALUE 1>&<KEY 2>=<VALUE 2>&<...>

Parameters

  • id: INT64 - user ID to log in
  • token: STRING - token for user authorization

Status statuses

Status Reason Reaction
1000 Forced shutdown command was received from client -
1001 Client agent terminates connection forcibly
Server is shutting down
-
Request CC server reason for failure and alternative connection point
1400 User agent has created incorrect connection string Check client application version and server compatibility version
1403 Client specified incorrect data in header when connecting to server Request user's identification data
1406 Client connection string was compiled correctly, but parameters passed to it are not enough Check client application version and server compatibility version

Common commands template

<COMMAND CODE>%<CONTROL HASH>%<DATA>

  • COMMAND CODE - HEX-character string identifying task that command is going to perform
  • CONTROL HASH - certain set of characters by which client who sent command should be able to recognize response
  • DATA - command parameters in form of JSON-string

Basic commands (incoming)

Command category Target of command Full intentions of command HEX-code of intentions Description Required arguments Optional arguments Current version and last applied commit
Administration Channels 1-011-00-1-1 B3 Creates new channel with selected parameters title - STRING: title of channel being created description - STRING: description for channel being created Not released
Administration Channels 1-011-00-1-0 B2 Deletes specified channel channel - INT64: ID of channel to delete reason - STRING: reason for channel deletion Not released
Administration Channels 1-011-01-00-01 2D1 Changes external channel settings key - STRING: what value should be changed
value - STRING: new value
- Not released
System Channels 1-011-00-0-1 B1 Requests server to add channel to active listening channel - INT64: ID of channel to add to active listening - Not released
System Channels 1-011-00-0-0 B0 Requests server to remove channel from active listening channel - INT64: ID of channel to remove from active listening - Not released
User Channels 1-011-10-01-11-1 5CF Create new message in channels channel - INT64: ID of channel to create new message in channel
type - STRING: type of message to send
alias - UUID: displays a message on behalf of the user
text - STRING: message type
answer - TIMESTAMP: ID of message to which response is being sent
media - INT64[][]: attaching files to message in form of media
files - INT64[]: attaching files to message
Not released
User Channels 1-011-10-01-11-0-000 2E70 Forward specified message to channel Not implemented
User Channels 1-011-10-01-11-0-001 2E71 Forward specified post to channel Not implemented
User Channels 1-011-10-01-11-0-010 2E72 Forward specified thread to channel Not implemented
User Channels 1-011-10-01-11-0-011 2E73 Forward specified media-document to channel Not implemented
User Channels 1-011-10-01-11-0-100 2E74 Forward specified security-message to channel Not implemented
User Channels 1-011-10-01-00 2E4 Delete specified message from channel Not implemented
User Channels 1-011-10-01-10 2E6 Overwrites specified message in channel channel - INT64: ID of channel of edited message
message - TIMESTAMP
answer - TIMESTAMP: ID of message to which response is being sent
media - INT64[][]: attaching files to message in form of media
files - INT64[]: attaching files to message
Not released
User Channels 1-011-10-00-1 171 Add user to channel ivitation - STRING: URI of channel to join - Not released
User Channels 1-011-10-00-0 170 Remove user from channel channel - INT64: ID of channel to leave - Not released

Basic commands (Outgoing)

Command category Target of command Full intentions of command HEX-code of intentions Description Arguments Current version and last applied commit
System Connection 1-000-00-00 80 Notifies of connection status change - Not implemented
System Client errors 1-000-01-000 108 Notifies client of incorrect intentions are indicated in command - Not implemented
System Client errors 1-000-01-001 109 The server recognized the intents, but client specified incorrect data in command parameters - Not implemented
System Client errors 1-000-01-010 10A Notification when client tries to access prohibited data - Not implemented
System Client errors 1-000-01-011 10B Notifies client when he tried to access any data without having appropriate permissions - Not implemented
System Server errors 1-000-10-00 88 Server recognized and tried to process command, but it does not have appropriate functionality - Not implemented
System Server errors 1-000-10-01 89 Internal server error - Not implemented
Administration Channels 1-011-00-1-0 B2 Specified channel has been deleted - Not implemented
Communication Channels 1-011-01-00-00-1-11 1687 Not implemented
Communication Channels 1-011-01-00-00-1-10 1686 Not implemented
Communication Channels 1-011-01-00-00-1-01 1685 Not implemented
Communication Channels 1-011-01-00-00-1-00 1684 Not implemented
Communication Channels 1-011-01-00-00-0-1 B41 Not implemented
Communication Channels 1-011-01-00-00-0-0 B40 Not implemented
Communication Channels 1-011-01-00-01 2D1 Not implemented
Communication Channels 1-011-01-01-00 2D4 Not implemented
Communication Channels 1-011-01-01-01 2D5 Not implemented
Communication Channels 1-011-01-01-10 2D6 Not implemented
Communication Channels 1-011-01-01-11 2D7 Not implemented
Clone this wiki locally