Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

room webhooks doc update #2118

Merged
merged 17 commits into from
Apr 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 11 additions & 1 deletion docs/server-side/v2/api-reference/Rooms/create-via-api.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -55,10 +55,20 @@ curl --location --request POST 'https://api.100ms.live/v2/rooms' \
| large_room <br/> | `boolean` | Enable this flag if the requirement is to support more than 2500 peers in the room. You are also required to update to latest SDKs to support this functionality. By default, this value is set to `false`. Learn more about it in the [large room creation guide](/server-side/v2/how-to-guides/create-large-rooms). | No | | No |
| size <br/> | `int` | This value is used to define the maximum number of peers expected to be joining the given room. Following are the acceptable ranges: <br/> <br/> With `large_room: false`, Minimum `size` = 0; Maximum `size` = 2500 <br/> <br/> With `large_room: true`, Minimum `size` = 0; Maximum `size` = 20000 | No |
| max_duration_seconds <br/> | `int` | This value is used to define the maximum duration in seconds for a room session. Following are the acceptable ranges: <br/> Minimum `max_duration_seconds` = 120 <br/> Maximum `max_duration_seconds` = 43200 <br/> <br/> | No |
| webhook <br/> | `object` | Object of type `webhook`. This object encapsulates information pertaining to webhooks including URL and headers.<br/>It is designed for use in scenarios when there is a need to receive room events at a designated endpoint. <br/><br/>For further details, please refer to the [webhook arguments](#webhook-arguments) section.

> **Warning:** If you create a room with the name of an existing room, the same room will be updated with the new configuration passed in the request payload. <br/> For example, if the existing room was assigned to **'template-ABC'** earlier and in the request payload you've used **'template-DEF'**, then **'template-DEF'** will be assigned to the existing room.

## recording_info arguments
## webhook arguments

| Name | Type | Description | Required |
| :---------- | :--------- | :--------------------------------------------------------------------------------------------------- | :-------- |
| url | `string` | Specifies the URL for the webhook. | Yes |
| headers | `object` | Defines custom HTTP request headers (in the form of key-value pairs) that should be applied to HTTP requests targeting the specified URL. | No |

> **Note:** If you set webhooks on a room, then the workspace level webhooks (if set) won't be used.

## recording info arguments

> **Note**: This object enables recording and configuring storage during room creation. But we recommend configuring it at a template level through the [Dashboard](https://dashboard.100ms.live/dashboard), where the config validator can help with validating inputs proactively.

Expand Down
1 change: 1 addition & 0 deletions docs/server-side/v2/api-reference/Rooms/object.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ nav: 2.2
| size | Indicates the maximum number of peers who can join the given room |
| max_duration_seconds | Indicates the maximum running duration (in seconds) for the given room session before it ends automatically. |
| polls | Array of poll ids that this room will have. |
| webhook <br/> | Object of type `webhook`. This object encapsulates information pertaining to webhooks including URL and headers.<br/>It is designed for use in scenarios when there is a need to receive room events at a designated endpoint. <br/><br/>For further details, please refer to the [webhook arguments](/server-side/v2/Rooms/create-via-api#webhook-arguments) section.

## Postman collection

Expand Down
17 changes: 15 additions & 2 deletions docs/server-side/v2/api-reference/Rooms/update-a-room.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,13 @@ curl --location --request POST 'https://api.100ms.live/v2/rooms/<room_id>' \
},
"region": "us",
"max_duration_seconds": 10000,
"polls": ["631b2654f771854d9bf633dg", "631b2654f771854d9bf633dh"]
"polls": ["631b2654f771854d9bf633dg", "631b2654f771854d9bf633dh"],
"webhook: {
"url": "https://example-webhook.com/webhook",
"headers": {
"my-custom-header": "value"
}
}
}'
```

Expand Down Expand Up @@ -72,7 +78,13 @@ curl --location --request POST 'https://api.100ms.live/v2/rooms/<room_id>' \
"created_at": "2022-09-14T04:54:57.707Z",
"updated_at": "2022-09-26T12:17:48.37Z",
"customer": "627cda54ff688c037a39291b",
"polls": ["631b2654f771854d9bf633dg", "631b2654f771854d9bf633dh"]
"polls": ["631b2654f771854d9bf633dg", "631b2654f771854d9bf633dh"],
"webhook": {
"url": "https://example-webhook.com/webhook",
"headers": {
"my-custom-header": "value"
}
}
}
```

Expand All @@ -90,5 +102,6 @@ curl --location --request POST 'https://api.100ms.live/v2/rooms/<room_id>' \
| size <br/> | `int` | This value is used to define the maximum number of peers expected to be joining the given room. Following are the acceptable ranges: <br/> <br/> With `large_room: false`, Minimum `size` = 0; Maximum `size` = 2500 <br/> <br/> With `large_room: true`, Minimum `size` = 0; Maximum `size` = 20000 | No |
| max_duration_seconds <br/> | `int` | This value is used to define the maximum duration in seconds for a room session. Following are the acceptable ranges: <br/> Minimum `max_duration_seconds` = 120 <br/> Maximum `max_duration_seconds` = 43200 <br/> <br/> | No |
| polls | `array` | Array of poll ids that this room will have. | No |
| webhook <br/> | `object` | Object of type `webhook`. This object encapsulates information pertaining to webhooks including URL and headers.<br/>It is designed for use in scenarios when there is a need to receive room events at a designated endpoint. <br/><br/>For further details, please refer to the [webhook arguments](/server-side/v2/Rooms/create-via-api#webhook-arguments) section.


Loading