Netless

Netless

  • JavaScript
  • Android
  • iOS
  • Server
  • FAQ
  • GitHub
  • πŸ‡¨πŸ‡³ δΈ­ζ–‡

β€ΊServer API

Overview

  • Introduction

Server API

  • Request specification
  • Whiteboard basics API
  • Get cover API
  • Scene management API
  • Document to Picture
  • Document to Web Page
  • Postman configuration file

Whiteboard basics API

Main API

create whiteboard room

POST /room

  • header parameter
FieldTypeDescription
tokenstring{{token}}
  • body parameter
FieldTypeDescription
namestringWhiteboard name
limitnumberSetting it to 0 is not restricted, it is recommended to set it to 0: the room is not restricted and it is restricted from business.
modestringv2 version parameters; Room type: persistent,historied
  • Room type:

There are two modes of the room: persistent room and replayable room. The room mode must be specified when it is created, and once determined, it cannot be modified. Different modes have the following characteristics:

ModePersistentReplayabledescription
Persistent Room (default)-persistentβœ“βœ˜Even if the room will be permanent, unless manually deleted by calling the API.
Playable Room-historiedβœ“βœ“Same as "Persistent Room". And everything in the room will be recorded automatically for playback.
  • body example
{
    "name":"Whiteboard name",
    "limit":0,
}
  • response
{
    "code": 200,
    "msg": {
        "room": {
            "id": 650,
            "name": "console-room",
            "limit": 0,
            "teamId": 1,
            "adminId": 1,
            "mode": "persistent",
            "template": "meeting",
            "region": "cn",
            "uuid": "Here is the room uuid",
            "updatedAt": "2019-01-15T09:12:05.974Z",
            "createdAt": "2019-01-15T09:12:05.974Z"
        },
        "hare": "{\"uuid\":\"uuid\",\"teamId\":\"1\",\"mode\":\"persistent\",\"region\":\"cn\",\"isBan\":false,\"beginTimestamp\":1547543526200,\"endTimestamp\":1547543526200,\"endFrameId\":0,\"usersMaxCount\":100,\"survivalDuration\":30000,\"chunkFramesCount\":700,\"snapshotIdInterval\":80}",
        "roomToken": "Here is the room roomToken",
        "code": 201
    }
}

Get specific whiteboard room Token

GET /room/{{uuid}}/roomtoken

  • header parameter
FieldTypeDescription
tokenstring{{token}}
  • query parameter
FieldTypeDescription
uuidstringWhiteboard Unique Identifier

In the response of this request, in the msg field, the required roomToken field can be obtained.

** Click to view: get the roomtoken interface in the old version **

POST /room/join?uuid={{uuid}}

  • header parameter
FieldTypeDescription
tokenstring{{token}}
  • query parameter
FieldTypeDescription
uuidstringWhiteboard unique identifier

In the response of this request, in the msg field, the required roomToken field can be obtained.

New and old version interfaces are valid and consistent at the same time, only the urls are different

Whiteboard information

Get whiteboard list

GET /room?offset={{offset}}&limit={{limit}}

  • header parameter
FieldTypeDescription
tokenstring{{token}}
  • query parameter
FieldTypeDescription
offsetnumberFind the whiteboard (counting from 1)
limitnumberGet the number of whiteboards each time

Get specific whiteboard details

GET /room/id?uuid={{uuid}}

  • header parameter
FieldTypeDescription
tokenstring{{token}}
  • query parameter
FieldTypeDescription
uuidstringWhiteboard unique identifier
  • response
{
    "code": 200,
    "msg": {
        "id": 11600,
        "teamId": 1,
        "adminId": 1,
        "uuid": "Here is uuid",
        "name": "unnamed",
        "limit": 0,
        "current": 0,
        "enable": true,
        "playable": false,
        "videoready": false,
        "mode": null,
        "region": "cn",
        "template": null,
        "createdAt": "2018-08-20T14:57:13.000Z",
        "updatedAt": "2018-08-26T05:56:36.000Z"
    }
}

Get the number of specific whiteboard pages

GET /room/scenes/count?roomuuid={{uuid}}

  • header parameter
FieldTypeDescription
tokenstring{{token}}
  • query parameter
FieldTypeDescription
roomuuidstringWhiteboard unique identifier

Whiteboard management

Disable and restore whiteboard

POST /banRoom

After using this API, all users will be kicked out of the room, and the room join operation cannot be performed in the client SDK. The disabled whiteboard can be played back.

  • header parameter
FieldTypeDescription
tokenstring{{token}}
  • body parameter
FieldTypeDescription
banbooleantrue to disable; false to restore
uuidstringWhiteboard unique identifier
Last updated on 2/21/2020 by 伍双
← Request specificationGet cover API β†’
  • Main API
    • create whiteboard room
    • Get specific whiteboard room Token
  • Whiteboard information
    • Get whiteboard list
    • Get specific whiteboard details
    • Get the number of specific whiteboard pages
  • Whiteboard management
    • Disable and restore whiteboard
Netless
Let's interactive.
Product
ConsoleHomepageDemoGithub
Company
Join usServicePrivacy
Contact
support@netless.linkCommunity
Copyright Β© 2020 Netless