Skip to main content

Room management

Create a room (POST)

Call this API to create a live room.

Prototype

  • Method: POST
  • Access point: https://api.netless.link/v5/rooms

Request header

Pass in the following parameters in the request header:

ParameterData typeRequired/OptionalDescription
tokenstringRequiredThe SDK token, which can be obtained through one of the following methods:
  • Get a test-purpose SDK token from Agora Console. See Get security credentials for your whiteboard project.
  • Call the RESTful API. See Generate an SDK token.
  • Use code samples. See Generate a token from your app server.
  • regionstringRequiredSpecifies a data center to process the request:
  • us-sv: Silicon Valley, US, which provides services to North America and South America.
  • sg: Singapore, which provides services to Singapore, East Asia, and Southeast Asia.
  • in-mum: Mumbai, India, which provides services to India.
  • gb-lon: London, England, which provides services to Europe.
  • cn-hz: Hangzhou, China, which provides services to the areas not covered by other data centers.
  • Request body

    ParameterData typeRequired/OptionalDescription
    isRecordbooleanOptionalThis function is not supported yet. This parameter is false by defaut for us-sv, sg, in-mum, gb-lon region.
    limitintegerOptionalThe maximum number of users with a writer or admin token who can be in the room at the same time. If you set this to 0, there is no maximum. Agora recommends setting it to 0.

    Request example


    _9
    POST /v5/rooms
    _9
    Host: api.netless.link
    _9
    token: NETLESSSDK_YWs9xxxxxxZGM2MjRi
    _9
    region: us-sv
    _9
    Content-Type: application/json
    _9
    _9
    {
    _9
    "isRecord": false
    _9
    }

    HTTP response

    For details about all possible response status codes, see the status code table.

    If the status code is 201, the request is successful. The response returns the status code and corresponding parameters.

    The following is a response example for a successful request:


    _11
    "status": 201,
    _11
    "body":
    _11
    {
    _11
    "uuid": "4a5xxxxx6b",
    _11
    "teamUUID": "RMxxxxx5aw",
    _11
    "appUUID": "i54xxxxx1AQ",
    _11
    "isRecord": false,
    _11
    "isBan": false,
    _11
    "createdAt": "2021-01-18T06:56:29.432Z",
    _11
    "limit": 0
    _11
    }

    Description of parameters in the response:

    ParameterData typeDescription
    uuidstringThe room UUID, which is the unique identifier of a room.
    teamUUIDstringThe unique identifier of the Agora Console account that creates the whiteboard project.
    appUUIDstringThe unique identifier of the whiteboard project.
    isRecordbooleanWhether recording is enabled for the room:
  • true: Enabled.
  • false: Not enabled.
  • isBanbooleanWhether the room is disabled:
  • true: Disabled.
  • false: Not disabled.
  • createdAtstringThe UTC time when the room was created.
    limitintegerThe maximum number of users with a writer or admin token who can be in the room at the same time. If you set it to 0, there is no maximum.

    If the status code is not 201, the request fails. The response body includes a message field that describes the reason for the failure.

    Get room information (GET)

    Call this API to get information about a room.

    Prototype

    • Method: GET
    • Access point: https://api.netless.link/v5/rooms/{uuid}

    Request header

    Pass in the following parameters in the request header:

    ParameterData typeRequired/OptionalDescription
    tokenstringRequiredA SDK token or room token with the writer or admin role. To get a SDK token, you can:
  • Get a test-purpose SDK token from Agora Console. See Get security credentials for your whiteboard project.
  • Call the RESTful API. See Generate an SDK token.
  • Use code samples. See Generate a token from your app server.
  • regionstringRequiredSpecifies a data center to process the request:
  • us-sv: Silicon Valley, US, which provides services to North America and South America.
  • sg: Singapore, which provides services to Singapore, East Asia, and Southeast Asia.
  • in-mum: Mumbai, India, which provides services to India.
  • gb-lon: London, England, which provides services to Europe.
  • cn-hz: Hangzhou, China, which provides services to the areas not covered by other data centers.
  • Request path

    The following parameters are required in the URL:

    ParameterData typeRequired/OptionalDescription
    uuidstringRequiredThe room UUID, which is the unique identifier of a room. You can get it by calling the RESTful API to create a room or calling the RESTful API to get room information.

    Request example


    _5
    GET /v5/rooms/a7exxxxxxa69
    _5
    Host: api.netless.link
    _5
    region: us-sv
    _5
    Content-Type: application/json
    _5
    token: NETLESSSDK_YWs9xxxxxxM2MjRi

    HTTP response

    For details about all possible response status codes, see the status code table.

    If the status code is 200, the request is successful. The response returns the status code and corresponding parameters.

    The following is a response example for a successful request:


    _11
    "status": 200,
    _11
    "body":
    _11
    {
    _11
    "uuid": "4axxxxx96b",
    _11
    "teamUUID": "RMmxxxxx5aw",
    _11
    "appUUID": "i5xxxxx1AQ",
    _11
    "isRecord": false,
    _11
    "isBan": false,
    _11
    "createdAt": "2021-01-18T06:56:29.432Z",
    _11
    "limit": 0
    _11
    }

    Description of parameters in the response:

    ParameterData typeDescription
    uuidstringThe room UUID, which is the unique identifier of a room.
    teamUUIDstringThe unique identifier of the Agora Console account that creates the whiteboard project.
    appUUIDstringThe unique identifier of the whiteboard project.
    isRecordbooleanWhether recording is enabled for the room:
  • true: Enabled.
  • false: Not enabled.
  • isBanbooleanWhether the room is disabled:
  • true: Disabled.
  • false: Not disabled.
  • createdAtstringThe UTC time when the room was created.
    limitintegerThe maximum number of users with a writer or admin token who can be in the room at the same time. If you set it to 0, there is no maximum.

    If the status code is not 200, the request fails. The response body includes a message field that describes the reason for the failure.

    Get a room list (GET)

    Call this API to get a list of rooms.

    Prototype

    • Method: GET
    • Access point: https://api.netless.link/v5/rooms

    Request header

    Pass in the following parameters in the request header:

    ParameterData typeRequired/OptionalDescription
    tokenstringRequiredA SDK token or room token with the writer or admin role. To get a SDK token, you can:
  • Get a test-purpose SDK token from Agora Console. See Get security credentials for your whiteboard project.
  • Call the RESTful API. See Generate an SDK token.
  • Use code samples. See Generate a token from your app server.
  • regionstringRequiredSpecifies a data center to process the request:
  • us-sv: Silicon Valley, US, which provides services to North America and South America.
  • sg: Singapore, which provides services to Singapore, East Asia, and Southeast Asia.
  • in-mum: Mumbai, India, which provides services to India.
  • gb-lon: London, England, which provides services to Europe.
  • cn-hz: Hangzhou, China, which provides services to the areas not covered by other data centers.
  • Query parameters

    You can choose to pass in the following query parameters:

    ParameterData typeRequired/OptionalDescription
    beginUUIDstringOptionalThe UUID of the room you want to start querying from.
    limitintegerOptionalThe maximum number of rooms on the list. The range is (0,1000]. If you do not set this parameter, the default maximum is 100 rooms.

    Request example


    _5
    GET /v5/rooms/?beginUUID=0e6exxxxxx4d95&limit=2
    _5
    Host: api.netless.link
    _5
    region: us-sv
    _5
    Content-Type: application/json
    _5
    token: NETLESSSDK_YWs9QlxxxxxxM2MjRi

    HTTP response

    For details about all possible response status codes, see the status code table.

    If the status code is 200, the request is successful. The response returns the status code and corresponding parameters.

    The following is a response example for a successful request:


    _22
    "status": 200,
    _22
    "body":
    _22
    [
    _22
    {
    _22
    "uuid": "0e6exxxxxxd95",
    _22
    "teamUUID": "RMmxxxxxxaw",
    _22
    "appUUID": "vVxxxxzJF-A",
    _22
    "isRecord": false,
    _22
    "isBan": false,
    _22
    "createdAt": "2020-12-20T14:02:54.846Z",
    _22
    "limit": 0
    _22
    },
    _22
    {
    _22
    "uuid": "1d4xxxxxxca69",
    _22
    "teamUUID": "RMmxxxxxx5aw",
    _22
    "appUUID": "vVsxxxxzJF-A",
    _22
    "isRecord": false,
    _22
    "isBan": false,
    _22
    "createdAt": "2020-12-20T14:10:29.265Z",
    _22
    "limit": 0
    _22
    }
    _22
    ]

    Description of parameters in the response:

    ParameterData typeDescription
    uuidstringThe room UUID, which is the unique identifier of a room.
    teamUUIDstringThe unique identifier of the Agora Console account that creates the whiteboard project.
    appUUIDstringThe unique identifier of the whiteboard project.
    isRecordbooleanWhether recording is enabled for the room:
  • true: Enabled.
  • false: Not enabled.
  • isBanbooleanWhether the room is disabled:
  • true: Disabled.
  • false: Not disabled.
  • createdAtstringThe UTC time when the room was created.
    limitintegerThe maximum number of users with a writer or admin token who can be in the room at the same time.. If you set it to 0, there is no maximum.``

    If the status code is not 200, the request fails. The response body includes a message field that describes the reason for the failure.``

    Disable a room (PATCH)

    Refer to the following information to disable or cancel disabling a room.

    Note that when you disable a room, the users in the room will be removed and no users will be able to join the room.

    If you want to cancel disabling the room, call the RESTful API again and set isBan to false.

    Prototype

    • Method: PATCH
    • Access point: https://api.netless.link/v5/rooms/{uuid}

    Request header

    Pass in the following parameters in the request header:

    ParameterData typeRequired/OptionalDescription
    tokenstringRequiredA SDK token or room token with the admin role. To get a SDK token, you can:
  • Get a test-purpose SDK token from Agora Console. See Get security credentials for your whiteboard project.
  • Call the RESTful API. See Generate an SDK token.
  • Use code samples. See Generate a token from your app server.
  • regionstringRequiredSpecifies a data center to process the request:
  • us-sv: Silicon Valley, US, which provides services to North America and South America.
  • sg: Singapore, which provides services to Singapore, East Asia, and Southeast Asia.
  • in-mum: Mumbai, India, which provides services to India.
  • gb-lon: London, England, which provides services to Europe.
  • cn-hz: Hangzhou, China, which provides services to the areas not covered by other data centers.
  • Request path

    The following parameters are required in the URL:

    ParameterData typeRequired/OptionalDescription
    uuidstringRequiredThe room UUID, which is the unique identifier of a room. You can get it by calling the RESTful API to create a room or calling the RESTful API to get room information.

    Request body

    ParameterData typeRequired/OptionalDescription
    isBanbooleanRequiredWhether the room is disabled:
  • true: Disabled.
  • false: (Default) Not disabled.
  • Request example


    _9
    PATCH /v5/rooms/0e6exxxxxx4d95
    _9
    Host: api.netless.link
    _9
    region: us-sv
    _9
    Content-Type: application/json
    _9
    token: NETLESSSDK_YWs9xxxxxx5ZGM2MjRi
    _9
    _9
    {
    _9
    "isBan": true
    _9
    }

    HTTP response

    For details about all possible response status codes, see the status code table.

    If the status code is 201, the request is successful. The response returns the status code and corresponding parameters.

    The following is a response example for a successful request:


    _11
    "status": 201,
    _11
    "body":
    _11
    {
    _11
    "uuid": "0e6xxxxxx95",
    _11
    "teamUUID": "RMxxxxxaw",
    _11
    "appUUID": "vVxxxxxJF-A",
    _11
    "isRecord": false,
    _11
    "isBan": true,
    _11
    "createdAt": "2020-12-20T14:02:54.846Z",
    _11
    "limit": 0
    _11
    }

    Description of parameters in the response:

    ParameterData typeDescription
    ParameterData typeDescription
    uuidstringThe room UUID, which is the unique identifier of a room.
    teamUUIDstringThe unique identifier of the Agora Console account that creates the whiteboard project.
    appUUIDstringThe unique identifier of the whiteboard project.
    isRecordbooleanWhether recording is enabled for the room:
  • true: Enabled.
  • false: Not enabled.
  • isBanbooleanWhether the room is disabled:
  • true: Disabled.
  • false: Not disabled.
  • createdAtstringThe UTC time when the room was created.
    limitintegerThe maximum number of users with a writer or admin token who can be in the room at the same time. If you set it to 0, there is no maximum.

    If the status code is not 201, the request fails. The response body includes a message field that describes the reason for the failure.

    Page Content