arctos-SDK For developsarctos-SDK For develops
Home
Okuma
arctos
Contact
  • English
  • 繁體中文
Home
Okuma
arctos
Contact
  • English
  • 繁體中文
  • Guide

    • get-started
  • Spec

    • Peer to Peer Direct
    • Relay based
  • Api

    • Overview
    • Auth
    • Task
    • Business
    • Room
      • createRoom
      • removeRoom
      • getRoomList
      • getRoomInfo
      • addRoomParticipants
      • deleteRoomParticipants
      • handleRoomParticipantsRequest
      • updateRoomInfo
      • triggerRoomCustomEvent
  • Peer to Peer Direct

    • overview
    • installization
    • features

      • initial_setting
      • room
      • camera
      • conference
      • microphone
      • speaker
      • share_screen
      • paint_board
      • recording
      • layout
  • Relay based

    • overview
    • installization
    • features

      • initial_setting
      • camera
      • microphone
      • speaker
      • share_screen
      • paint_board
      • share_message
      • switch_template
      • video_filters

Room

createRoom

Create a new meeting room. Only switch and admin roles can create meeting rooms.

/images/skip-forward_brown.svg /api/room/do_add
/images/transfers_orange.svg POST

Request:

{
    "name": "Urology: Dr. Li's Online Consultation",
    "description": "Dr. Li's Morning Consultation"
}
ParameterMeaningTypeRequiredDefault valueDescription
HEADERS
AuthorizationAfter logging in, the server returns an Authorization token.stringYBearerUsed for authentication
BODY
namestringYMeeting room name
descriptionstringNMeeting room description

Response:

{
    "status": 1,
    "message": "",
    "data": {
        "roomId": "xp4z6dani",
        "name": "Urology: Dr. Li's Online Consultation",
        "description": "Dr. Li's Morning Consultation",
        "createdAt": "2024-06-23T06:00:52.330Z",
        "host": {
            "id": "1",
            "displayName": "Chen Xiaoling"
        }
    }
}
ParameterMeaningTypeExistedDefault valueDescription
BODY
statusresponse statusstringY0: fail 1: success 2: warning
messagemessagestringYError messages should be shown when there are errors.
dataReturn InformationobjectYRoom information
roomIdstringYCreated meeting room ID
namestringYMeeting room name
descriptionstringYMeeting room description
createdAtstringYCreation time
data.hostReturn host infoobjectY
idstringYHost ID (i.e., userId)
displayNamestringYHost display name
carrierIdstringYHost's Carrier ID
carrierAddressstringYHost's Carrier Address

Error code:

CodeStatusErrorMessage
2001success
0error message
404Resource Not Found
403Access to the requested resource is not allowed

removeRoom

Close the specified meeting room. admin can close any meeting room, switch can only close the meeting room where they are the host.

/images/skip-forward_brown.svg /api/room/do_del
/images/transfers_orange.svg POST

Request:

{
    "roomId": "a37fsupzg"
}
ParameterMeaningTypeRequiredDefault valueDescription
HEADERS
AuthorizationAfter logging in, the server returns an Authorization token.stringYBearerUsed for authentication
BODY
roomIdstringYMeeting room ID

Response:

{
    "status": 1,
    "message": "Room closed",
    "data": null
}
ParameterMeaningTypeExistedDefault valueDescription
BODY
statusresponse statusstringY0: fail
1: success
2: warning
messagemessagestringYError messages should be shown when there are errors.
dataReturn InformationobjectY

Error code:

CodeStatusErrorMessage
2001Room closed
0error message
0Room not found
2Failed to publish MQTT message
404Resource Not Found
403Access to the requested resource is not allowed

getRoomList

Get a list of all meeting rooms.

👉 This API is for ease of development and should not be included in the SDK. Instead, it should be integrated by third-party applications to obtain basic room information.
/images/skip-forward_brown.svg /api/room/get_list
/images/transfers_orange.svg POST

Request:

{
    
}
ParameterMeaningTypeRequiredDefault valueDescription
HEADERS
AuthorizationAfter logging in, the server returns an Authorization token.stringYBearerUsed for authentication
BODY

Response:

  • status (number): 1 indicates success, 0 indicates failure, 2 indicates warning
  • message (string): Prompt message
  • data (array) : List of meeting rooms, each room contains roomId, name, description, createdAt, host

Error code:

HTTP Status CodeStatusMessageDescription
2001""Request successful

getRoomInfo

Get detailed information about the meeting room. The information returned varies depending on the user's role. Hosts and administrators can see all information, participants can see information about other participants but not about applicants. Applicants can only see basic information about the room and the host. Non-room members can only see basic information about the room and the host.

/images/skip-forward_brown.svg /api/room/get_info
/images/transfers_orange.svg POST

Request:

{
    "roomId": "a37fsupzg"
}
ParameterMeaningTypeRequiredDefault valueDescription
HEADERS
AuthorizationAfter logging in, the server returns an Authorization token.stringYBearerUsed for authentication
BODY
roomIdstringYMeeting room ID

Response:

  • status (number): 1 indicates success, 0 indicates failure, 2 indicates warning
  • message (string): Prompt message
  • data (object):
    • roomId (string): Meeting room ID
    • name (string): Meeting room name
    • description (string): Meeting room description
    • createdAt (string): Creation time
    • status (string): Meeting room status, host_joined or created
    • host:
      • id (string): Host ID
      • displayName (string): Host display name
      • carrierId (string): Host's Carrier ID
      • carrierAddress (string): Host's Carrier Address
    • participants (array): List of participants, each participant contains id, displayName, joinedAt
    • applicants (array): List of applicants, each applicant contains id, displayName, appliedAt

HTTP Status Code and Return Message:

HTTP Status CodeStatusMessageDescription
2001""Request successful
2000"Room not found"Room not found
4030"Forbidden"Insufficient permissions

addRoomParticipants

Apply to join the specified meeting room. After a successful application, return the basic information of the room and the host.

/images/skip-forward_brown.svg /api/room/participants/do_add
/images/transfers_orange.svg POST

Request:

ParameterMeaningTypeRequiredDefault valueDescription
HEADERS
AuthorizationAfter logging in, the server returns an Authorization token.stringYBearerUsed for authentication
BODY
roomIdstringYMeeting room ID
carrierIdstringYApplicant's Carrier ID
carrierAddressstringYApplicant's Carrier Address

Response:

  • status (number): 1 indicates success, 0 indicates failure, 2 indicates warning
  • message (string): Prompt message
  • data (object, optional): Basic room information and host information
    • roomId (string): Meeting room ID
    • name (string): Meeting room name
    • description (string): Meeting room description
    • createdAt (string): Creation time
    • status (string): Meeting room status, host_joined or created
    • host:
      • id (string): Host ID
      • displayName (string): Host display name

HTTP Status Code and Return Message:

HTTP Status CodeStatusMessageDescription
2001"Application to join room submitted"Request successful
2000"Already a participant, an applicant, or host already joined"Already a participant, applicant, or host already joined
4030"Forbidden"Insufficient permissions
2000"Room not found"Room not found
2002"Failed to publish MQTT message"Failed to publish MQTT message

deleteRoomParticipants

Leave the specified meeting room. The host leaving will close the meeting room. Hosts and administrators can remove participants and provide a reason for removal. If an applicant uses this method, it is equivalent to withdrawing the application to join the meeting room.

/images/skip-forward_brown.svg /api/room/participants/do_del
/images/transfers_orange.svg POST

Request:

ParameterMeaningTypeRequiredDefault valueDescription
HEADERS
AuthorizationAfter logging in, the server returns an Authorization token.stringYBearerUsed for authentication
BODY
roomIdstringYMeeting room ID
participantIdstringID of the participant to be removed, not needed if leaving by oneself
messagestringYReason for removal

Response:

  • status (number): 1 indicates success, 0 indicates failure, 2 indicates warning
  • message (string): Prompt message
  • data (object, optional): Updated room information

HTTP Status Code and Return Message:

HTTP Status CodeStatusMessageDescription
2001"Successfully left the room"Successfully left the room
2000"Not a participant or applicant in the room"Not a participant or applicant in the room
2000"Participant not found in the room"Participant not found
4030"Forbidden"Insufficient permissions
2001"Host left and room closed"Host left and room closed
2002"Failed to publish MQTT message"Failed to publish MQTT message

handleRoomParticipantsRequest

Handle requests to join the meeting room. Only hosts and administrators can handle applications.

/images/skip-forward_brown.svg /api/room/participants/handle_request
/images/transfers_orange.svg POST

Request:

ParameterMeaningTypeRequiredDefault valueDescription
HEADERS
AuthorizationAfter logging in, the server returns an Authorization token.stringYBearerUsed for authentication
BODY
roomIdstringYMeeting room ID
applicantIdstringYApplicant ID
acceptbooleanYWhether to accept the application
messagestringReason for rejection

Response:

  • status (number): 1 indicates success, 0 indicates failure, 2 indicates warning
  • message (string): Prompt message
  • data (object, optional): Updated room information

HTTP Status Code and Return Message:

HTTP Status CodeStatusMessageDescription
2001"Request handled"Request handled
2000"Applicant not found"Applicant not found
4030"Forbidden"Insufficient permissions
2000"Room not found"Room not found
2002"Failed to publish MQTT message"Failed to publish MQTT message

updateRoomInfo

Update the information of the meeting room. Only hosts and administrators can update the information of the meeting room.

/images/skip-forward_brown.svg /api/room/update_info
/images/transfers_orange.svg POST

Request:

ParameterMeaningTypeRequiredDefault valueDescription
HEADERS
AuthorizationAfter logging in, the server returns an Authorization token.stringYBearerUsed for authentication
BODY
roomIdstringYMeeting room ID
namestringYNew meeting room name
descriptionstringYNew meeting room description
carrierIdstringYHost's new Carrier ID
carrierAddressstringYHost's new Carrier Address

Response:

  • status (number): 1 indicates success, 0 indicates failure, 2 indicates warning
  • message (string): Prompt message
  • data (object, optional): Updated room information

HTTP Status Code and Return Message:

HTTP Status CodeStatusMessageDescription
2001"Room info updated"Room information updated
4030"Forbidden"Insufficient permissions
2000"Room not found"Room not found
2002"Failed to publish MQTT message"Failed to publish MQTT message

triggerRoomCustomEvent

Host publishes custom MQTT messages to everyone, which can be used to publish application-specific messages such as starting recording, activating whiteboard, etc.

/images/skip-forward_brown.svg api/room/custom_event
/images/transfers_orange.svg POST

Request:

ParameterMeaningTypeRequiredDefault valueDescription
HEADERS
AuthorizationAfter logging in, the server returns an Authorization token.stringYBearerUsed for authentication
BODY
roomIdstringYMeeting room ID
eventMessagestringYCustom message to be published

Response:

  • status (number): 1 indicates success, 0 indicates failure, 2 indicates warning
  • message (string): Prompt message

HTTP Status Code and Return Message:

HTTP Status CodeStatusMessageDescription
2001"Custom event published"Message published
4030"Forbidden"Insufficient permissions
2002"Failed to publish MQTT message"Failed to publish MQTT message
2000"Room not found"Room not found
Prev
Business