Setting up space and room parameters#

Space settings#

updateSpace request is used to change space settings with spaceId (see Creating a space) passed as a part of the URL. The following attributes can be set up for the space in the body of the request:

  • name - the space name,

  • description - description of the space,

  • logo - a link to the logo picture for the space,

  • isPublic - access modifier for the space.

As a result of the successful request there will be the space settings updated according to the given request parameters.

Parameters name and isPublic are mandatory for the request. isPublic can take two values - true or false. In case of isPublic: false access to all space rooms is granted only to the space creator or moderator. In case of isPublic: true access is granted to all users. Complete request specification can be found in Swagger.

Example of updateSpace request:

PUT https://moodhood.online/v1/spaces/60d55c0eb9ef88ab17b0aabb

where 60d55c0eb9ef88ab17b0aabb is the space identifier.

{
  "isPublic": true,
  "name": "Some test space",
  "description": "Space where my team will have all future calls",
  "logo": "https://server.com/images/someimage.png"
}

Code example for cURL:

curl --location --request PUT 'https://moodhood-api.livedigital.space/v1/spaces/60d55c0eb9ef88ab17b0aabb' \
--header 'Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiI2MmFiNWE4NGIwY2U2ZWUzMWIwOTk3YjMiLCJhdWQiOiJ1c2VyIiwidHlwZSI6ImFjY2Vzc1Rva2VuIiwiY0lkIjoiNjJhMDlmYzcwMmY4NmNlMzdhOTM4NmYxIiwianRpIjoiZXZ5ZlJWRWsyRGozVFFsYzF5UnBLIiwic2duIjoiYjgxMTBmOGZiNiIsImlhdCI6MTY1NTc1ODAwMiwiZXhwIjoxNjU2MzYyODAyfQ.hzXW-dHJD0TUtLY22yefmZogvSanEbb70zRo4Kku98A' \
--header 'Content-Type: application/json' \
--data-raw '{
 "isPublic": true,
 "name": "Some test space",
 "description": "Space where my team will have all future calls",
 "Logo": "https://server.com/images/png-clipart-myspace-logo.png"
}'

Space settings are changed and server returns status code 200 for the successful request.

Room settings#

updateRoom request is used to change the room settings, where roomId (see Creating a room) and spaceId (see Creating a space) of the space that room belongs to, are passed as a part of the URL. The following attributes can be set up for the room in the body of the request:

  • name - name for the room,

  • isScreensharingAllowed - is it allowed or not to share the screen during the broadcasting in the room,

  • isChatAllowed - is chat for users available or not,

  • isPublic - access modifier for the space,

  • type - room type, which can be a lesson or webinar.

Two types of room are available:

  • lesson - for lessons, where users can turn on camera, microphone, and share their screen,

  • webinar - for webinars, where only room creator or moderator can go on the air, and other users can only watch and listen.

Complete request specification can be found in Swagger.

As a result of the successful request there will be the room settings updated according to the given request parameters.

Example of updateRoom request:

PUT https://moodhood.online/v1/spaces/60d55c0eb9ef88ab17b0aabb/rooms/62b0e25e3dc082dc7502d273

where 60d55c0eb9ef88ab17b0aabb is the space identifier and 62b0e25e3dc082dc7502d273 is the room identifier.

{
  "name": "string",
  "isPublic": true,
  "isScreensharingAllowed": true,
  "isChatAllowed": true,
  "type": "lesson"
}

Code example for cURL:

curl --location --request PUT 'https://moodhood.online/v1/spaces/62b0e24a81ad6df4bb583c58/rooms/62b0e25e3dc082dc7502d273' \
--header 'Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiI2MmFiNWE4NGIwY2U2ZWUzMWIwOTk3YjMiLCJhdWQiOiJ1c2VyIiwidHlwZSI6ImFjY2Vzc1Rva2VuIiwiY0lkIjoiNjJhMDlmYzcwMmY4NmNlMzdhOTM4NmYxIiwianRpIjoiZXZ5ZlJWRWsyRGozVFFsYzF5UnBLIiwic2duIjoiYjgxMTBmOGZiNiIsImlhdCI6MTY1NTc1ODAwMiwiZXhwIjoxNjU2MzYyODAyfQ.hzXW-dHJD0TUtLY22yefmZogvSanEbb70zRo4Kku98A' \
--header 'Content-Type: application/json' \
--data-raw '{
 "name": "string",
 "isPublic": true,
 "isScreensharingAllowed": true,
 "isChatAllowed": true,
 "type": "lesson"
}'

The room settings are changed and server returns status code 200 for the successful request.